P0-2: mark done in backlog
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user