Skip to content

fix(ci): the dashboard's advisory gate counts what the bundle holds (ADR-0111) - #554

Merged
7schmiede merged 1 commit into
mainfrom
fix/ui-audit-shipped
Nov 17, 2026
Merged

7schmiede merged 1 commit into
mainfrom
fix/ui-audit-shipped

Conversation

@7schmiede

Copy link
Copy Markdown
Member

What and why

The release workflow of v0.49.0 failed at the dashboard's advisory gate (npm audit --omit=dev, run 44135547053): GHSA-fc5q-39xc-vjpf for picomatch, every version, no fix yet. picomatch reaches npm's runtime tree only because vue-router 5 lists picomatch, vite and unplugin as dependencies for its build plugin; none of them has code in the bundle the hub embeds. npm cannot tell the two apart.

  • ui/vite.config.ts: a build-only plugin writes ui/bundle-packages.json, the packages whose modules Rollup puts into the bundle, plus every installed workbox-* (the service worker is bundled by workbox separately) and the declared dependencies (vue ships as @vue/*).
  • ui/scripts/audit-shipped.mjs: fails (exit 1) for an advisory of a package on that list; exit 2 without the list or without readable npm audit --json; everything else printed as "not shipped".
  • ci.yml (warning) and release.yml (required) run it after the build; docs/releasing.md names it; ADR-0111.

Review card

Approved by the owner in the conversation on 2026-11-17: points 2–4, and point 1 in its second form (1′) after the first form proved not to hold (it was based on npm ls without node_modules installed).

# Category Point Beats Reversing costs
1′ trust "Shipped" is a package with code in the built bundle, listed by a Vite plugin in ui/bundle-packages.json at npm run build; the gate refuses an advisory only for a package on that list; no list fails the gate. Counting npm ls --omit=dev; a hand-kept exception list Low
2 trust No readable answer from npm fails the check. Letting through on a tool error Low
3 contract CI and the release run the same ui/scripts/audit-shipped.mjs; docs/releasing.md names it. Two rules drifting apart Low
4 term v0.49.0 stays unpublished; the same content is released as 0.49.1 (changelog [0.49.1] with a line on 0.49.0); FORWARD_SINCE stays 0.49.0. Deleting and re-setting the tag —

Decided while building: an entry npm marks only "through" another package (vue-router) does not count even when it ships; the package the advisory is for is checked itself.

Verified (Windows)

  • Without the list: exit 2. After npm run build: the list holds @vue/*, pinia, vue, vue-router, workbox-*; the gate passes with picomatch and its dependents as "not shipped".
  • Red probe: picomatch added to the list by hand → exit 1, "shipped: picomatch * GHSA-fc5q-39xc-vjpf (high)".
  • npm run typecheck, npm test.

The release of 0.49.1 follows in its own pull request.

🤖 Generated with Claude Code

…ADR-0111)

The release of v0.49.0 failed at `npm audit --omit=dev`: an advisory for
picomatch (every version, no fix yet) reached the dashboard's runtime tree
because vue-router 5 lists picomatch, vite and unplugin as dependencies for
its build plugin. None of them has code in the bundle.

The build now lists the packages with code in the bundle
(`ui/bundle-packages.json`, plus every `workbox-*` package for the service
worker and the declared dependencies), and `ui/scripts/audit-shipped.mjs`
fails only for an advisory of a package on that list. No list, or no
readable answer from npm, fails it. CI (a warning) and the release
(required) run the same script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@7schmiede
7schmiede merged commit 50ead05 into main Nov 17, 2026
28 checks passed
@7schmiede
7schmiede deleted the fix/ui-audit-shipped branch November 17, 2026 17:41
@7schmiede 7schmiede mentioned this pull request Nov 17, 2026
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.

1 participant