ci: add qa-npm-signatures workflow#22459
Open
GirlBossRush wants to merge 1 commit into
Open
Conversation
Adds a dedicated CI workflow that runs `npm audit signatures` against
each workspace lockfile (root, web, website, lifecycle/aws).
`npm audit signatures` verifies that every package in the lockfile has
a valid Sigstore provenance attestation from the npm registry, catching
the cases where a published version is tampered with after the fact or
where a package's signature suddenly disappears between resolution and
audit. It is run:
- on PRs that touch any package.json / package-lock.json
- on pushes to main that touch the same paths
- daily on a schedule, so retroactive unpublishes/signature changes
surface even without a dependency-touching PR
The audit does not require `node_modules` to be populated, so the
workflow skips `npm ci` entirely and runs only against the lockfile —
keeping it fast and isolated from build-time concerns.
Co-authored-by: Agent <279763771+playpen-agent@users.noreply.github.com>
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests.
Additional details and impacted files@@ Coverage Diff @@
## main #22459 +/- ##
===========================================
- Coverage 93.27% 52.92% -40.35%
===========================================
Files 1032 1032
Lines 60059 60059
Branches 400 400
===========================================
- Hits 56018 31789 -24229
- Misses 4041 28270 +24229
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
QA - npm signaturesworkflow that runsnpm audit signaturesagainst each workspace lockfile (root,web/,website/,lifecycle/aws/).npm audit signaturesverifies that every package in the lockfile has a valid Sigstore provenance attestation from the npm registry. It catches:This is an incremental defense — it does not stop a maintainer-account-hijack that publishes a properly signed malicious version (the attack class the recent "Mini Shai-Hulud" incident used). For that, our existing defenses do the heavy lifting:
.npmrcsetsignore-scripts=true, neutralizing thepreinstall/postinstallpayload vectorcooldown(3/7/14 days) means we don't pull versions during their first-published windowsave-exact=true+npm cikeeps the lockfile authoritativeThe workflow runs on:
package.json/package-lock.jsonmaintouching the samenpm audit signaturesworks directly off the lockfile and does not requirenode_modulesto be populated, so the workflow skipsnpm cientirely — fast and isolated from build concerns.Test plan
.,web,website,lifecycle/aws) pass against current lockfiles