-
-
Notifications
You must be signed in to change notification settings - Fork 24
chore: Update dependencies and fix security vulnerabilities #149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
bed820f
7758750
30866ac
9c5cd14
7baa5e7
a4817a8
18a2aa9
f497656
cdc085b
b6ade3b
ec274fb
a8970eb
463624d
78c6bc8
ac6d48e
763d746
a9a5443
dcd5846
3fd1a7c
cd43c9e
a7000eb
103071f
709c036
404a918
18c3f12
ee9f2ae
9ced05a
c6b8d51
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,17 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: "npm" # See documentation for possible values | ||
| directory: "/" # Location of package manifests | ||
| - package-ecosystem: "npm" | ||
| directory: "/" | ||
| schedule: | ||
| interval: "daily" | ||
| interval: "weekly" | ||
| target-branch: "main" | ||
| open-pull-requests-limit: 10 | ||
| groups: | ||
| eslint: | ||
| patterns: | ||
| - "eslint" | ||
| - "@eslint/js" | ||
| rollup: | ||
| patterns: | ||
| - "rollup" | ||
| - "@rollup/*" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,16 @@ | ||
| FROM keymetrics/pm2:16-alpine | ||
| COPY . /usr/src/app | ||
| FROM node:22-alpine | ||
|
|
||
| WORKDIR /usr/src/app | ||
|
|
||
| # Copy package.json and package-lock.json first for better caching | ||
| COPY package*.json ./ | ||
| RUN npm install --no-cache --production | ||
|
|
||
| # Copy the rest of the application | ||
| COPY . . | ||
|
|
||
| # Expose the port the app runs on | ||
| EXPOSE 8080 | ||
| CMD [ "pm2-runtime", "start", "pm2.json" ] | ||
|
|
||
| # Run the application using npm start | ||
| CMD ["npm", "start"] | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,79 +1,61 @@ | ||||||
|  | ||||||
|
|
||||||
|  | ||||||
| [](https://badge.fury.io/js/cryptalk) | ||||||
|  | ||||||
| [](https://app.codacy.com/gh/runbgp/cryptalk/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) | ||||||
| [](LICENSE.md) | ||||||
| [](https://www.codacy.com/gh/Hexagon/cryptalk/dashboard?utm_source=github.com&utm_medium=referral&utm_content=Hexagon/cryptalk&utm_campaign=Badge_Grade) | ||||||
|
|
||||||
| # Cryptalk | ||||||
|
|
||||||
| Cyptalk is a HTML5/Node.js based, client side (E2EE) encrypted instant chat | ||||||
| **Cryptalk** is a client-side (E2EE) encrypted instant chat application built on HTML5 and Node.js. | ||||||
|
|
||||||
| This project is a fork of [Hexagon's Cryptalk](https://github.com/Hexagon/cryptalk) and is actively maintained. It has been updated to support Node.js 22 and includes the latest packages. | ||||||
|
|
||||||
| ## Features | ||||||
|
|
||||||
| * Client side AES-256-CBC encryption/decryption (the server is just a messenger) | ||||||
| * 256 bit key derived from your passphrase using PBKDF2 | ||||||
| * Messages torched after a configurable delay, default is 600s. | ||||||
| * Simple setup using npm, Docker or Heroku | ||||||
| * Messages torched after a configurable delay (default is 600s) | ||||||
| * Simple setup using Docker or Heroku | ||||||
| * Notification sounds (mutable) | ||||||
| * Native popup notifications | ||||||
| * Configurable page title | ||||||
| * Nicknames, optional. | ||||||
| * Quick-links using http://server/#Room:Passphrase, optional and insecure | ||||||
| * Nicknames (optional) | ||||||
| * Quick-links using http://server/#Room:Passphrase (optional and insecure) | ||||||
|
|
||||||
| ## Installing | ||||||
| ## Deployment | ||||||
|
|
||||||
| ### Docker setup | ||||||
| ### Docker | ||||||
|
|
||||||
| To run latest cryptalk with docker, exposed on host port 80, simply run the following command to pull it from docker hub | ||||||
| To run latest cryptalk with Docker, exposed on host port 80, simply run the following command to pull it from GitHub Container registry: | ||||||
|
|
||||||
| ```bash | ||||||
| sudo docker run -d --restart=always -p 80:8080 hexagon/cryptalk | ||||||
| sudo docker run -d --restart=unless-stopped -p 80:8080 ghcr.io/runbgp/cryptalk | ||||||
| ``` | ||||||
|
|
||||||
| ### Heroku setup | ||||||
| ### Heroku | ||||||
|
|
||||||
| Click the button below | ||||||
|
|
||||||
| [](https://heroku.com/deploy?template=https://github.com/hexagon/cryptalk) | ||||||
| [](https://heroku.com/deploy?template=https://github.com/runbgp/cryptalk) | ||||||
|
|
||||||
| ### Docker setup without using docker hub | ||||||
| ### Docker build | ||||||
|
|
||||||
| Clone this repo, enter the new directory. | ||||||
|
|
||||||
| Build image | ||||||
| Build the image | ||||||
| ```bash | ||||||
| docker build . --tag="hexagon/cryptalk" | ||||||
| docker build . --tag="runbgp/cryptalk" | ||||||
| ``` | ||||||
|
|
||||||
| Run container, enable start on boot, expose to port 80 at host | ||||||
| ```bash | ||||||
| sudo docker run -d --restart=always -p 80:8080 hexagon/cryptalk | ||||||
| sudo docker run -d --restart=always -p 80:8080 runbgp/cryptalk | ||||||
| ``` | ||||||
|
|
||||||
| Browse to ```http://<ip-of-server>/``` | ||||||
|
|
||||||
| Done! | ||||||
|
|
||||||
| ### npm setup | ||||||
|
|
||||||
| Install node.js, exact procedure is dependant on platform and distribution. | ||||||
|
|
||||||
| Install the app from npm | ||||||
| ```bash | ||||||
| npm install cryptalk -g | ||||||
| ```` | ||||||
|
|
||||||
| Then issue the following to start the app | ||||||
|
|
||||||
| ```bash | ||||||
| cryptalk | ||||||
| ``` | ||||||
|
|
||||||
| Browse to ```http://localhost:8080``` | ||||||
|
|
||||||
| Done! | ||||||
|
|
||||||
| ## Usage | ||||||
|
|
||||||
| ``` | ||||||
|
|
@@ -114,11 +96,11 @@ to prevent browsers from keeping history or cache. | |||||
|
|
||||||
| ## Development | ||||||
|
|
||||||
| Install node.js (development require >=12.0), exact procedure is dependant on platform and distribution. | ||||||
| Install node.js (development requires >=18.0), exact procedure is dependant on platform and distribution. | ||||||
|
||||||
| Install node.js (development requires >=18.0), exact procedure is dependant on platform and distribution. | |
| Install Node.js (development requires >=22.0.0), exact procedure is dependant on platform and distribution. |
Large diffs are not rendered by default.
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import js from '@eslint/js'; | ||
| import globals from 'globals'; | ||
|
|
||
| export default [ | ||
| js.configs.recommended, | ||
| { | ||
| languageOptions: { | ||
| ecmaVersion: 2020, | ||
| sourceType: 'module', | ||
| globals: { | ||
| ...globals.browser, | ||
| ...globals.node, | ||
| ...globals.commonjs, | ||
| ...globals.amd | ||
| } | ||
| }, | ||
| rules: { | ||
| 'indent': ['error', 'tab'], | ||
| 'linebreak-style': 0, | ||
| 'quotes': ['error', 'single'], | ||
| 'semi': ['error', 'always'], | ||
| 'eqeqeq': ['error', 'always'], | ||
| 'no-undef': ['warn'], | ||
| 'no-console': ['warn'] | ||
| }, | ||
| ignores: [ | ||
| 'client/public/js/cryptalk.min.js', | ||
| 'node_modules/**' | ||
| ] | ||
| } | ||
| ]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because this Dockerfile does not specify a non-root
USER, thenpm startprocess runs as root inside the container, which significantly increases the impact of any remote code execution or container breakout vulnerability. An attacker who gains code execution in the app would immediately have root in the container, making it easier to access host resources or other services if the container or runtime is misconfigured. Consider running the app as a dedicated unprivileged user (for example the built-innodeuser) beforeCMD ["npm", "start"]or enforcing a non-root user at runtime.