fix: resolve 17 dependency CVEs flagged by Vanta - #2
Conversation
Seals the vulnerable transitive versions behind pnpm overrides. The only runtime-reachable finding is undici (bundled into dist/main.js via @actions/http-client); the other 14 are build-tooling only. undici is pinned to the 6.x CJS line -- 7.x is ESM-only and would break the CommonJS action bundle. minimatch, brace-expansion, glob and js-yaml are pinned per major line so each consumer keeps a compatible API surface. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
On the red CodeQL checkThe failing CodeQL check is not a regression from this PR — it is misattributed. Both open alerts predate this branch:
Alert #2 ( Heads-up:
|
Summary
Clears all 17 overdue Vanta findings on the
setup-sentry-clicode repository (SLA deadline 2026-09-07, first detected 2026-08-24). All 17 are HIGH severity and all are transitive — this repo declares only three direct runtime dependencies.Only 1 of the 17 is runtime-reachable.
tsupis configured withnoExternal: [/.*/], so runtime deps are bundled into the shippeddist/main.js; the other 14 packages are build tooling that never ships.undicilodashbracesglobminimatchjs-yamlpostcssrollupbrace-expansionApproach: overrides, not direct-dependency bumps
Every vulnerable package is transitive, so the fix is a
pnpm.overridesblock rather than manifest bumps. Two constraints drove the exact pins:undiciis capped at the 6.x line deliberately.@actions/http-client@2.2.0requestsundici@^5.25.4, and the 5.x line tops out at 5.29.0 — still inside the< 6.24.0vulnerable range, so no 5.x release fixes this. Reaching a patched version requires an override. undici 7+ is ESM-only, and this action builds CJS (format: ['cjs'],runs: node24), so 6.28.1 is the newest version that is both patched and CJS-consumable.I first tried bumping
@actions/core/io/tool-cacheto latest (3.x/3.x/4.x) instead — that pulls@actions/http-client@4→undici@^6.23.0and would be the cleaner fix. It does not work here: those versions are ESM-only andtsc --noEmitfails with 5×TS1479("CommonJS module whose imports will produce require() calls; the referenced file is an ECMAScript module"). Migrating the action to ESM is a real change with its own risk, so it is left out of a security patch. That upgrade is the natural follow-up and would let theundicioverride be dropped.minimatch,brace-expansion,globandjs-yamlare pinned per major line, because three different consumers need three different majors and a blanket>=override crosses breaking boundaries. A first attempt with unboundedminimatch: ">=9.0.7"resolved everything to 10.2.6 and brokepnpm depcheckwithTypeError: (0, _minimatch.default) is not a function— minimatch 10 dropped the default export thatdepcheck@1.4.7relies on. Per-major pins (minimatch@3→ 3.1.3,minimatch@7→ 7.4.8,minimatch@9→ 9.0.7) keep every consumer on a compatible API.Exact versions rather than ranges keep this reproducible and prevent silent drift back across a major boundary.
Verification
pnpm@8was used throughout sopnpm-lock.yamlstays atlockfileVersion: '6.0'— CI pinspnpm/action-setup@v3to version 8, and a v9 lockfile would breakpnpm install --frozen-lockfile.typecheck,lint,depcheck,build.pnpm install --frozen-lockfile→ "Lockfile is up to date".depcheckandtypecheckpass on unmodifiedmain, so no pre-existing failure is being masked.node dist/main.jswithINPUT_VERSION=2.57.0downloaded sentry-cli through@actions/tool-cache, installed it, and the binary reportssentry-cli 2.57.0.GITHUB_ENVreceivedSENTRY_URL/SENTRY_ORG/SENTRY_PROJECTandGITHUB_PATHthe install dir.dist/main.jsis rebuilt and committed, since that is the artifact the action actually runs.Notes for the reviewer
integrationCI job targetsubuntu-20.04,macos-11,macos-12andwindows-2019runners, all of which GitHub has retired — that job cannot currently run. Not addressed here.🤖 Generated with Claude Code