Full-codebase-audit 2026-05-30 outputs: - Audit report: 09 - Audits/Full Codebase Audit - 2026-05-30.md - 81 issue files ISSUE-055..135 (decisions + 1 skipped no-brainer). - Scanner docs from scratch (was zero): architecture, data model, API ref, payment flow, operations runbook + repo README. - Doc-sync updates across API reference, data models, flows, design system. - Secret Rotation Runbook (08 - Operations) for the exposed credentials. - Reusable workflow guide (07 - Development) + .claude/workflows/full-codebase-audit.js. Issues remain status:open intentionally — the code fixes are uncommitted-then-committed working-tree changes per repo and aren't "resolved" until merged/deployed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1.5 KiB
1.5 KiB
issue, title, severity, domain, labels, status, created, source
| issue | title | severity | domain | labels | status | created | source | |||
|---|---|---|---|---|---|---|---|---|---|---|
| 135 | Backend: uploads directory served without authentication — documents guessable by filename | low | File Management |
|
open | 2026-05-30 | Full Codebase Audit 2026-05-30 |
Backend: uploads directory served without authentication — documents guessable by filename
Severity: low Domain: File Management Labels: security, backend, authorization
Description
backend/src/app.ts:465 serves the uploads/ directory as static files without any authentication middleware. Anyone who knows or guesses a filename can download it directly. This affects sensitive documents (ID uploads, delivery evidence) as well as public assets (avatars).
Additionally, fileController.ts:146-148 copies files with verbatim original filenames, which are often predictable (e.g. passport.jpg).
Options
- Serve sensitive docs through an authenticated route with ownership checks; keep avatars public.
- Require signed/expiring URLs for all uploads.
- Move uploads to object storage with access policies.
Recommendation
Route document downloads through an authenticated, ownership-checked handler (keep public assets like avatars open); consider signed URLs for sensitive files.
Affected Files
backend/src/app.ts:465backend/src/services/file/fileController.ts:146-148
References
- Full Codebase Audit 2026-05-30 — DEC-80