security(phase-2): CI audit gate, secret scan, dep review, Dockerfile hardening, per-token salt, multer@2
2.1 — npm audit --audit-level=high --omit=dev in CI for root, hub/gateway, hub/bridge 2.2 — TruffleHog secret-scanning job (full history, --only-verified) in CI 2.3 — New dependency-review.yml: actions/dependency-review-action@v4, fail-on-severity: high on PRs 2.4 — Dockerfile: base image pinned to node:20.19.0-alpine3.21; non-root user 'knowtation'; npm ci replaces npm install for reproducible lock-file-exact installs 2.5 — AES-256-GCM token encryption: random 16-byte salt per token embedded in ciphertext (format: saltB64.ivB64.tagB64.encB64); legacy 3-part ciphertexts return null → existing stored tokens trigger graceful "prompt reconnect" path already in loadTokens 2.6 — multer upgraded 1.4.5-lts.2 → 2.1.1; added sanitizeUploadFilename() helper that strips path components (path.basename), replaces non-[a-zA-Z0-9._-] with _, and truncates to 200 chars before any disk write
Tests: 41 new unit tests in test/phase2-security.test.mjs; 1347 total passing (1306 + 41)
0 comments
muse hub commit comment sha256:f84e44f24f432c2ab82aae7cc2ae1011b33a8c7b32a4b004d86a2f0bdb8e974a --body "your comment"
No comments yet. Be the first to start the discussion.