From 8072c076e22591264cf4478804bdbadf29f96559 Mon Sep 17 00:00:00 2001 From: Hermes Date: Sat, 8 Aug 2026 03:27:48 -0700 Subject: [PATCH] P0-2: mark done in backlog --- DC-PRODUCTION-GRADE-BACKLOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DC-PRODUCTION-GRADE-BACKLOG.md b/DC-PRODUCTION-GRADE-BACKLOG.md index 382218c..a75206d 100644 --- a/DC-PRODUCTION-GRADE-BACKLOG.md +++ b/DC-PRODUCTION-GRADE-BACKLOG.md @@ -6,7 +6,7 @@ If an item is too big for one tick, implement a sub-part, push that, and note pr ## P0 — Security & Correctness - [x] **P0-1: npm audit fix** — Done (commit 3a0a5bc, grade A). Resolved 3 high CVEs via minimatch 9.0.9 in webdav transitive. 4 remaining vulns are semver-major-only (sharp→0.35.3, dockerode→5.0.1, nodemailer→9.0.5, uuid→11.1.1) — deferred per backlog note. All 1498 jest tests pass. URN urn:ump:hlju4hixg3tijbghncigm5gesoemupuczrzmkykumh7xbgkq3d2q. -- [ ] **P0-2: Command injection in ca.js:210** — Password interpolated into shell string `execSync(\`openssl pkcs12 ... -password "pass:${password}"\`)`. Replace with `execFileSync('openssl', [...args, '-password', \`pass:${password}\`])` (no shell). File: `routes/ca.js` lines 200-215. +- [x] **P0-2: Command injection in ca.js:210** — Done (commit 66e4460, grade A). Replaced `execSync(\`openssl pkcs12 ... -password "pass:${password}"\`)` with `execFileSync('openssl', [..., '-password', \`pass:${password}\`])`. No shell parsing. All 1498 tests pass. - [ ] **P0-3: Unvalidated req.body in backup config** — `routes/backups.js:487` passes raw `req.body` to `backupManager.updateConfig()`. Replace with explicit destructure of known fields: `const { backups, defaultRetention } = req.body || {}`. - [ ] **P0-4: Asset upload buffer size check** — `routes/config/assets.js:33` decodes base64 without checking buffer size. Add `if (buffer.length > 5 * 1024 * 1024) throw new ValidationError('File too large (max 5MB)')` after the `Buffer.from` call. Also restrict MIME regex to `png|jpeg|svg+xml|webp|ico|x-icon`. - [ ] **P0-5: Error message leaking internals** — `routes/apps/restore.js:296` returns `err.message` directly to client via `errorResponse(res, 500, err.message)`. Replace with generic message `"Restore failed"` and log the actual error server-side.