nanocoder
nanocoder copied to clipboard
[Bug] The release security audit passes even though production dependencies have high and critical advisories
Summary
pnpm run test:audit always exits 0, so the release workflow never fails on known vulnerabilities. The same audit without --ignore-unfixable exits 1.
Steps to reproduce
pnpm install --frozen-lockfileonmain.- Run
pnpm audit --prod --audit-level=high; echo "exit $?". - Run
pnpm run test:audit; echo "exit $?".
Expected behaviour
test:audit fails while production dependencies have high or critical advisories that already have a patched version.
Actual behaviour
$ pnpm audit --prod --audit-level=high
44 vulnerabilities found
Severity: 3 low | 24 moderate | 16 high (1 ignored) | 1 critical
exit 1
$ pnpm run test:audit # pnpm audit --audit-level=high --ignore-unfixable
No new vulnerabilities were ignored
exit 0
All 16 high and critical advisories list a patched version. Examples:
undici8.10.2 is locked and the advisory is fixed in 8.12.2 (published 2026-10-15).@modelcontextprotocol/sdk1.30.0 is locked and the advisory is fixed in 1.31.0 (published 2026-09-28).proxy-addris fixed in 2.0.8.
Setting --config.minimumReleaseAge=0 did not change the result. The numbers depend on the live advisory data and will change over time.
Environment
Windows 11, Node v22.22.3, pnpm 11.0.9, Nanocoder 1.31.0 (main at 948a4e74)
Suggested fix
package.json:49: remove--ignore-unfixablefromtest:audit.- List any advisory you accept by ID in
auditConfig.ignoreGhsasinpnpm-workspace.yaml, with a comment saying why. .github/workflows/release.yml:96already runspnpm test:audit, so no change is needed there.- Merge the existing bump PRs: #1923 (undici), #1807 and #1614 (MCP SDK).
Hi @addyCooks , I'd like to work on this! Here is my plan:
- Fix
package.json: Remove--ignore-unfixablefromtest:auditso it properly fails on high/critical vulnerabilities (pnpm audit --audit-level=high). - Update affected dependencies:
- Bump
undicito^8.12.2(supersedes #1923) - Bump
@modelcontextprotocol/sdkto^1.32.1(supersedes #1807 / #1614) - Resolve
proxy-addr(>= 2.0.8) viaoverridesinpnpm-workspace.yamlif needed
- Bump
- Whitelist unavoidable advisories: Add any accepted/dev-only GHSAs (like AVA's transitive
minimatch) toauditConfig.ignoreGhsasinpnpm-workspace.yamlwith rationale comments. - Verify: Ensure
pnpm run test:auditexits 0 when clean and exits 1 on unhandled vulnerabilities; runpnpm run test:all. - Changeset: Add a patch changeset with
pnpm changeset.
please do assign the issue