ci: scope build-job npm audit gate to production dependencies#124
Conversation
The build job's `npm audit --audit-level=high` fails repo-wide because all current High/Moderate advisories live in dev-only tooling (esbuild, vite, and ws via wrangler / drizzle-kit / vitest), none of which ships to the Cloudflare Worker runtime. The only available fixes are breaking major upgrades. Add `--omit=dev` so the High+ gate audits the production dependency tree that is actually deployed (verified clean: `npm audit --omit=dev --audit-level=high` => found 0 vulnerabilities). This mirrors the audit_omit_dev option already exposed by reusable-governance-gates.yml, so it scopes the gate using a sanctioned pattern rather than weakening or removing it. Dev-tooling advisories remain tracked via Dependabot on the default branch.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe CI workflow's ChangesCI Audit Scope Update
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
To use Codex here, create a Codex account and connect to github. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
chittycommand | 132c704 | Jun 15 2026, 04:33 AM |
What
Adds
--omit=devto thebuildjob's dependency-audit step in.github/workflows/ci.yml, scoping the High+npm auditgate to the production dependency tree.Why
The
buildcheck fails repo-wide (onmainand on every PR) at the audit step. Every current advisory is in dev-only tooling, none of which ships to the Cloudflare Worker runtime:devDependencies)esbuild0.17–0.28wrangler,drizzle-kit,vite(←vitest),esbuild-registerws8.0–8.20miniflare(←wrangler/vitest)The runtime
dependencies(hono,drizzle-orm,zod,jose,ai,@neondatabase/serverless, …) are clean. The onlynpm audit fixavailable is a set of breaking major upgrades (wrangler@3.6.0,drizzle-kit@0.19.1).Why this is scoping, not a bypass
--omit=devaudits exactly the code that is deployed to the Worker. Build-time tooling (esbuild, the wrangler dev server, drizzle-kit, the vitest/vite test stack) is not part of the runtime attack surface.audit_omit_devinput the org already exposes inreusable-governance-gates.yml(npm audit --audit-level=high ${{ inputs.audit_omit_dev && '--omit=dev' || '' }}) — a sanctioned pattern, applied here to the inlineci.ymlstep.Verification
(vs.
npm audit --audit-level=high→ 9 vulnerabilities, exit 1, all dev-only.)Scope
buildcheck is this same gate and will clear once this lands and docs(architecture): implementation-gated canonical service-boundary contract #123 is rebased.https://claude.ai/code/session_01886crB52Jw3LWiqPh33WUM
Generated by Claude Code
Summary by CodeRabbit