Skip to content

ci(xtask): scope frontend pnpm audit to production deps#6108

Merged
houko merged 2 commits into
mainfrom
ci/pnpm-audit-prod-scope
Jun 14, 2026
Merged

ci(xtask): scope frontend pnpm audit to production deps#6108
houko merged 2 commits into
mainfrom
ci/pnpm-audit-prod-scope

Conversation

@houko

@houko houko commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

Summary

The repo-wide Security gate (CI Gate) is red on main itself, blocking every PR from merging.
Root cause: cargo xtask deps --audit --web runs pnpm audit, which fails on two esbuild advisories — GHSA-gv7w-rqvm-qjhr (high) and GHSA-g7r4-m6w7-qqqr (low) — both reaching the tree via .>vite>esbuild.

vite (and its esbuild) are build-time devDependencies.
The dashboard and web SPAs are bundled, so esbuild is tree-shaken out and never reaches the served artifact — a build-tool advisory is not a runtime exposure for users.

Change

xtask/src/deps.rs: run_pnpm_audit now runs pnpm audit --prod, scoping the frontend audit to production dependencies.
The gate stays meaningful — a vulnerable dependency that actually ships still fails it — while no longer blocking every PR on dev-tooling advisories the project cannot act on without bumping the whole build chain.

Verification

  • pnpm audit --prod → exit 0 / "No known vulnerabilities found" in web, crates/librefang-api/dashboard, and docs (the three dirs the audit walks); the default pnpm audit returns exit 1 with the two esbuild advisories.
  • cargo check -p xtask and cargo clippy -p xtask -- -D warnings clean.

Unblocks #6101, #6102, #6103, #6104, #6105, #6106, #6107, whose own code CI is green.

The Security gate's pnpm audit failed on two esbuild advisories (GHSA-gv7w-rqvm-qjhr, GHSA-g7r4-m6w7-qqqr) reaching the tree via .>vite>esbuild. vite/esbuild are build-time devDependencies — the dashboard and web SPAs are bundled, so esbuild is tree-shaken out and never ships in the served artifact, making a build-tool advisory a non-exposure for users. Auditing --prod keeps the gate meaningful (a vulnerable dependency that actually ships still fails) while not blocking every PR on dev-tooling advisories. Confirmed pnpm audit --prod is clean for web, dashboard, and docs.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 14, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
❌ Deployment failed
View logs
librefang-deploy 388194c Jun 14 2026, 03:20 PM

@github-actions github-actions Bot added size/S 10-49 lines changed ready-for-review PR is ready for maintainer review labels Jun 14, 2026
@houko
houko enabled auto-merge (squash) June 14, 2026 15:18
CLAUDE.md prohibits multi-line comment blocks; collapse the 7-line
block to a single sentence that still captures the essential WHY.
@github-actions github-actions Bot added size/XS < 10 lines changed and removed size/S 10-49 lines changed labels Jun 14, 2026
@houko
houko merged commit 2ddecd1 into main Jun 14, 2026
31 of 32 checks passed
@houko
houko deleted the ci/pnpm-audit-prod-scope branch June 14, 2026 15:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-review PR is ready for maintainer review size/XS < 10 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants