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.4 KiB
1.4 KiB
issue, title, severity, domain, labels, status, created, source
| issue | title | severity | domain | labels | status | created | source | |||
|---|---|---|---|---|---|---|---|---|---|---|
| 101 | Backend: config loads .env.development unconditionally regardless of NODE_ENV | medium | Security |
|
open | 2026-05-30 | Full Codebase Audit 2026-05-30 |
Backend: config loads .env.development unconditionally regardless of NODE_ENV
Severity: medium Domain: Security Labels: security, backend, configuration
Description
backend/src/shared/config/index.ts:4 loads .env.development unconditionally. In a production environment where NODE_ENV=production, this still reads and applies .env.development values, overriding injected production secrets with development values. Paired with .dockerignore whitelisting this file (ISSUE-075), it means dev secrets are active in prod images.
Options
- Load
.env.<NODE_ENV>conditionally, never fall back to dev file in production. - Only load dotenv when not in production (rely on injected env in prod).
- Load env-specific file and fail fast if required vars are missing.
Recommendation
Load the env-file matching NODE_ENV (or none in production) and never default to .env.development. Pair with ISSUE-075.
Affected Files
backend/src/shared/config/index.ts:4