Skip to content

Fix high/critical audit findings and add CI dependency-audit gate - #13

Merged
torreyatcitty merged 1 commit into
mainfrom
security/audit-fixes-and-ci-gate
Jul 22, 2026
Merged

Fix high/critical audit findings and add CI dependency-audit gate#13
torreyatcitty merged 1 commit into
mainfrom
security/audit-fixes-and-ci-gate

Conversation

@torreyatcitty

Copy link
Copy Markdown
Contributor

Summary

Security team requirement: dependency audits at the high level must pass in CI. This PR fixes the fixable high/critical findings (audit was 5 high + 4 critical) and adds the gate.

Dependency fixes

  • http-proxy-middleware ^1.0.3^3.0.6 (high, GHSA-c7qv-q95q-8v27). Nothing in scripts/config imports it directly, and the existing resolutions entry already forced every nested copy to 3.0.7 — yarn 1 resolutions just don't apply to direct deps, so the direct dependency was stuck at vulnerable 1.3.1. This aligns it with what already runs.
  • websocket-driver → ^0.7.5 via resolutions (critical, GHSA-xv26-6w52-cph6, via webpack-dev-server → sockjs). Patch-level bump, same pattern as the existing resolutions. (Supersedes the open dependabot branch for the same advisory.)

Full production yarn build passes after the upgrades.

Allowlisted advisories (cannot be fixed by upgrade)

Documented with justifications in scripts/audit-allowlist.json; printed in every CI run:

  • GHSA-v7cw-rxgx-j29p, compound-components "malware" (critical) — false positive. Our dependency is a pinned-commit git URL to Compound-Foundation/compound-components; the advisory targets a name-squatted package on the public npm registry, and yarn audit matches by name only. ⚠️ The squatting itself is worth reporting to the security team as a dependency-confusion attempt.
  • GHSA-2p57-rm9w-gvfp, ip SSRF (high) — no patched release of ip exists (the advisory covers every version). Dev-only via webpack-dev-server v3's local dev server; not in the production build. Goes away entirely if/when webpack-dev-server is upgraded to v4+ (which dropped ip), noted in the allowlist entry.

CI gate

  • .github/workflows/audit.yml — checkout + node, then node scripts/audit-check.js. No yarn install needed (audit runs off the lockfile), so the job takes seconds.
  • scripts/audit-check.js — parses yarn audit --json and fails on any non-allowlisted high/critical advisory. A wrapper is required because yarn 1's --level high only filters the printed report; its exit code still reflects low/moderate findings (this repo has ~180, which the gate intentionally ignores).

Test plan

  • yarn build (production build) passes with the upgraded dependencies
  • node scripts/audit-check.js exits 0, printing the two allowlisted advisories with justifications
  • Failure path: with the allowlist removed, exits 1 listing both advisories
  • Dependency Audit workflow green on this PR

🤖 Generated with Claude Code

Upgrades:
- http-proxy-middleware ^1.0.3 -> ^3.0.6 (GHSA-c7qv-q95q-8v27, high).
  Nothing imports it directly and the existing resolutions entry already
  forced nested copies to 3.0.7; this aligns the direct dependency.
- websocket-driver -> ^0.7.5 via resolutions (GHSA-xv26-6w52-cph6,
  critical, via webpack-dev-server > sockjs).

Two advisories cannot be fixed by upgrade and are allowlisted with
justifications in scripts/audit-allowlist.json:
- GHSA-v7cw-rxgx-j29p (compound-components): false positive; our dep is
  a pinned git URL, the advisory targets a name-squatted npm package.
- GHSA-2p57-rm9w-gvfp (ip): no patched release exists; dev-only via
  webpack-dev-server v3. Removable by upgrading to webpack-dev-server 4+.

The new audit workflow runs scripts/audit-check.js, which parses
`yarn audit --json` and fails on any non-allowlisted high/critical
advisory (yarn 1's --level flag does not gate its exit code).

Production build verified passing after the upgrades.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@torreyatcitty
torreyatcitty merged commit 1d32c4e into main Jul 22, 2026
2 checks passed
@torreyatcitty
torreyatcitty deleted the security/audit-fixes-and-ci-gate branch July 22, 2026 16:24
torreyatcitty added a commit that referenced this pull request Jul 22, 2026
New advisories published after the audit gate merged in #13. All four
packages were already force-deduped to a single version by the
existing resolutions block, so these are same-major bumps of what the
build already runs:

- tar ^7.5.16 -> ^7.5.19 (GHSA-23hp-3jrh-7fpw critical DoS,
  GHSA-8x88-c5mf-7j5w high infinite loop)
- js-yaml ^4.1.1 -> ^4.3.0 (GHSA-52cp-r559-cp3m high quadratic CPU)
- brace-expansion ^2.0.2 -> ^2.1.2 (GHSA-3jxr-9vmj-r5cp high
  exponential expansion)
- fast-uri ^3.1.4 added (GHSA-v2hh-gcrm-f6hx, GHSA-4c8g-83qw-93j6
  high host confusion)

Audit gate exits 0 again; production build verified passing.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants