From 70bb9902dcb277259316bbfee416a1f0ba553d19 Mon Sep 17 00:00:00 2001 From: Diego Resendez Date: Sun, 16 Aug 2026 12:38:20 -0500 Subject: [PATCH] ci: scope the publish audit gate to what actually ships AGENTS.md states the rule and ci.yml implements it: npm audit --omit=dev blocks, everything else reports. stage.yml and release.yml ran a bare npm audit, so a dev-only advisory could hold a publish. That drift stopped work twice. The nanoid advisory reached the tree through tsup -> postcss -> nanoid, a build-tooling path that ships to nobody, and fixing it was a precondition for a release it could not affect. The full audit still runs with continue-on-error, so nothing goes unseen. Signed-off-by: Diego Resendez --- .github/workflows/release.yml | 5 +++++ .github/workflows/stage.yml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e43dc89..733e6e4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,12 @@ jobs: registry-url: 'https://registry.npmjs.org' - run: npm install -g npm@latest # npm >= 11.5.1 is required for OIDC trusted publishing - run: npm ci + # Same scoped gate as ci.yml: only what we ship blocks a publish. With `reflect-metadata` + # as the sole runtime dependency, a blocking advisory here is rare and genuinely reaches + # users; a build-tooling one never does. The full audit still reports. + - run: npm audit --omit=dev - run: npm audit + continue-on-error: true # `npm publish` runs prepublishOnly (lint + complexity + typecheck + test + build) first. # No NODE_AUTH_TOKEN — npm exchanges the OIDC id-token for a short-lived publish token. # A prerelease (26.7.0-beta.N) publishes under its channel tag (beta/alpha/rc) so `latest` diff --git a/.github/workflows/stage.yml b/.github/workflows/stage.yml index 993ed1c..6b1bc36 100644 --- a/.github/workflows/stage.yml +++ b/.github/workflows/stage.yml @@ -18,7 +18,12 @@ jobs: with: node-version: '22' - run: npm ci + # Same scoped gate as ci.yml: only what we ship blocks a publish. A `tsup` advisory + # reaches nobody, and holding a release candidate for one is how staging stalls on work + # that has nothing to do with the package. The full audit still reports. + - run: npm audit --omit=dev - run: npm audit + continue-on-error: true - name: Validate release candidate run: npm run prepublishOnly - name: Publish prerelease to Verdaccio