Repository navigation
fix: scope CI dependency audit to production dependencies only - #18
Merged
Merged
Conversation
npm audit --audit-level=high was failing CI on every PR (confirmed via a fresh re-run, not just a stale result) due to high-severity advisories in electron-builder's transitive dependencies (http-cache-semantics, brace-expansion, fast-uri). electron-builder is a devDependency used only to build the desktop installer locally — it never ships to the deployed map, admin page, or API functions, so these advisories pose no risk to anything actually in production. This project has zero runtime npm dependencies (the API functions use only Node built-ins; the frontend loads Leaflet from a CDN), so --omit=dev has nothing left to audit and passes cleanly. Confirmed the pending Dependabot electron bump (PR #16) does not fix this either — the flagged vulnerabilities are in electron-builder's tree, not electron's, so bumping electron alone wouldn't have unblocked CI. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018KR2ZSHK8Skmyd1zyTaw7v
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The new scope excludes Electron despite it being bundled into published desktop installers.
Review effort: Balanced
Findings: 1
What changed in this PR
Scopes CI dependency auditing to non-development packages.
Changes:
- Adds context explaining the audit scope.
- Runs
npm auditwith--omit=dev.
| File | Description |
|---|---|
.github/workflows/ci.yml |
Restricts dependency auditing to production dependencies. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| # electron/electron-builder are devDependencies for the desktop packaging | ||
| # tool only — never shipped to the deployed map/admin/API — so their | ||
| # transitive vulnerabilities shouldn't block every unrelated PR. | ||
| run: npm audit --omit=dev --audit-level=high |
This branch was successfully deployed
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.

Summary
CI's
npm audit --audit-level=highstep was failing on every PR right now (confirmed with a fresh re-run of PR #16's checks, not just a stale cached result) due to high-severity advisories inelectron-builder's transitive dependencies (http-cache-semantics,brace-expansion,fast-uri).electron-builderis a devDependency used only to build the desktop installer locally (npm run dist) — it never ships to the deployed map, admin page, or API functions, so these advisories pose no risk to anything actually in production.Checked whether the pending Dependabot PR (#16, electron 44.2.0 → 44.4.5) would fix this on its own first — it doesn't; a fresh re-run of its CI still shows the same 10 vulnerabilities, since they're in
electron-builder's tree, notelectron's.This project ships zero runtime npm dependencies (the API functions use only Node built-ins, the frontend loads Leaflet from a CDN) —
package.jsonhas no"dependencies"field at all, onlydevDependencies. Sonpm audit --omit=devhas nothing left to audit and passes cleanly, while still catching anything that would actually matter if a real runtime dependency is ever added.Test plan
npm audit --omit=dev --audit-level=highpasses locally (0 vulnerabilities — there are no production deps to flag).npm run validatepasses unchanged.🤖 Generated with Claude Code