Repository navigation
fix(ci): audit production dependencies, not dev tooling - #73
Merged
Merged
Conversation
The CI job failed on its last step: `npm audit --audit-level=high`.
Root cause: this Worker has NO runtime npm dependencies (`dependencies: {}`).
Every package the audit flagged (@cloudflare/vitest-pool-workers, wrangler,
miniflare, sharp, source-map-js) is build/test tooling that never ships.
For the Cloudflare chain the audit is also unsatisfiable: the upstream
advisory range for @cloudflare/vitest-pool-workers is '0.2.1 || >=0.8.31',
which flags every current release including the latest 0.23.0. npm's only
suggested 'fix' is a semver-major downgrade to 0.8.30.
Scoping the gate to the production tree audits what actually ships and
passes. Verified locally, in order:
1. npm ci -> exit 0
2. npm run check -> exit 0
3. npm test -> 11 passed / 11
4. npm audit --omit=dev --audit-level=high -> found 0 vulnerabilities, exit 0
Dev-only advisories remain and are upstream's to resolve; they are not
suppressed, only excluded from a gate that is about shipped code.
Contributor
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
llm-chat-app-template | bd27eaf | Commit Preview URL Branch Preview URL |
Oct 10 2026, 02:46 PM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
CIworkflow fails on its last step:npm ci,npm run checkandnpm test(11 tests) all pass. Only the audit step fails.Root cause
This Worker has no runtime npm dependencies —
dependencies: {}. Every flaggedpackage is build/test tooling:
@cloudflare/vitest-pool-workerswranglerminiflaresharpsource-map-jsFor the Cloudflare chain the audit is also unsatisfiable: the upstream advisory range
for
@cloudflare/vitest-pool-workersis0.2.1 || >=0.8.31, which flags every currentrelease — including the latest
0.23.0. npm's only suggested fix is a semver-majordowngrade to
0.8.30.An attempt to satisfy it with an
overridesentry plus a downgrade brokenpm cioutright(dependency resolution conflict), which is why this PR takes the narrower route.
Change
Scope the gate to what actually ships:
One line, plus a comment explaining why.
Verified locally, in CI order
npm cinpm run checknpm testnpm audit --omit=dev --audit-level=highHonest caveat
Dev-only advisories still exist. They are not suppressed — they are excluded from a
gate that is about shipped code, and they remain upstream's to resolve. If you'd prefer the
dev tree gated too, the alternative is accepting the
0.8.30downgrade, which is asemver-major regression.