Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
5.8 KiB
phase, plan, subsystem, tags, requires, provides, affects, tech-stack, key-files, key-decisions, patterns-established, requirements-completed, duration, completed
| phase | plan | subsystem | tags | requires | provides | affects | tech-stack | key-files | key-decisions | patterns-established | requirements-completed | duration | completed | ||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 16-ci-dependency-audit-and-security-checks | 03 | infra |
|
|
|
|
|
|
|
|
|
2min | 2026-06-13 |
Phase 16 Plan 03: eslint-plugin-security Static Lint Gate Summary
eslint-plugin-security@3.0.1 folded into the existing pnpm lint gate as 14 blocking error-level rules; detect-object-injection disabled globally for Drizzle/TS-generic FPs; pnpm lint green
Performance
- Duration: 2 min
- Started: 2026-06-13T09:21:47Z
- Completed: 2026-06-13T09:24:29Z
- Tasks: 2
- Files modified: 5
Accomplishments
- eslint-plugin-security@3.0.1 installed to root devDependencies (exact pin)
- Flat config extended: new security block (
files: apps/**/*.{ts,tsx}) with...pluginSecurity.configs.recommendedspread, placed beforeprettierConfig(which stays last) - Triaged 4 total violations: 2 detect-non-literal-fs-filename (inline suppressions with justification), 2 detect-object-injection (globally disabled with justification comment)
pnpm lintexits 0 with--max-warnings 0across both apps; ESLint pin unchanged at 9.39.4
Task Commits
- Task 1: Install eslint-plugin-security and fold it into the flat config -
826a23a(chore) - Task 2: Triage security-rule violations until pnpm lint is green -
59e49ec(chore)
Files Created/Modified
eslint.config.js— addedpluginSecurityimport + security config block (section 5, before prettierConfig); detect-object-injection globally disabled with justificationpackage.json— eslint-plugin-security@3.0.1 added to root devDependenciespnpm-lock.yaml— lockfile updated to reflect new packageapps/api/src/index.ts— inlineeslint-disable-next-linefordetect-non-literal-fs-filenameonrealpathSync(process.argv[1])apps/api/tests/broker/expand.test.ts— inlineeslint-disable-next-linefordetect-non-literal-fs-filenameon test-fixturereadFileSync
Decisions Made
- Version choice: Pinned eslint-plugin-security@3.0.1 (not 4.0.1) — 4.0.1 was published the same day as phase research (freshness concern); 3.0.1 is stable and flat-config compatible with ESLint 9.39.4.
- detect-object-injection disabled globally: After running lint and auditing all 2 hits: both were
ranks[i] > ranks[i - 1]numeric loop index comparisons in tests — not user-controlled keys. Disabling the single highest-noise rule globally while keeping the remaining 14 rules at error. Matches RESEARCH triage Option A recommendation. - detect-non-literal-fs-filename: inline suppressions at 2 sites: Not disabled globally because only 2 hits exist and both are clearly false positives. Site-level suppression is the minimal-change approach that keeps the rule active for any future truly dynamic
fs.*calls.
Deviations from Plan
None — plan executed exactly as written. Triage decision to disable detect-object-injection globally vs. annotating sites (Option A vs. B per RESEARCH) was explicitly delegated to the executor; Option A was chosen after confirming all hits were numeric loop indices.
Issues Encountered
None. Only 4 lint violations found (2 rules, 2 sites each), far fewer than the "dozens" anticipated for Drizzle ORM bracket access — the codebase does not have heavy obj[key] usage in API source files.
Threat Surface Scan
No new network endpoints, auth paths, file access patterns, or schema changes introduced. This plan adds only dev-tooling configuration.
Known Stubs
None.
User Setup Required
None — no external service configuration required. The security lint fold is automatic via pnpm lint (existing CI step).
Next Phase Readiness
- Plan 16-04 (gitleaks secret scanning) is ready to proceed
- Plan 16-05 (CI documentation) will reference this plan's D-03 fold — the lint step already enforces it; no new ci.yml job step needed for the security lint
Phase: 16-ci-dependency-audit-and-security-checks Completed: 2026-06-13