Skip to content

chore(security): harden npm publish pipeline against supply-chain attacks#516

Open
arzafran wants to merge 1 commit into
mainfrom
security/trusted-publishing
Open

chore(security): harden npm publish pipeline against supply-chain attacks#516
arzafran wants to merge 1 commit into
mainfrom
security/trusted-publishing

Conversation

@arzafran

@arzafran arzafran commented May 12, 2026

Copy link
Copy Markdown
Member

Summary

Moves npm releases onto a GitHub Actions workflow using OIDC-based Trusted Publishing with build provenance.

Files

  • .github/workflows/release.yml — tag-triggered (v*) release workflow. SHA-pinned actions, hardened runner, OIDC publish, --provenance, tag-version match check.
  • package.json — adds publishConfig.provenance, packageManager, prepublishOnly; drops the manual publish scripts.
  • /.npmrc + .gitignoreprovenance=true; allowlists root /.npmrc, nested files still ignored.
  • .github/dependabot.yml — adds the npm ecosystem with grouped weekly updates.
  • .github/CODEOWNERS — explicit ownership of release-critical paths.
  • SECURITY.md — disclosure policy, maintainer setup checklist, consumer verification.

Setup before the next release

A one-time configuration on npmjs.com and github.com is required. Steps are in SECURITY.md.

Verifying a published version

npm audit signatures

@arzafran arzafran requested a review from a team as a code owner May 12, 2026 15:57
@arzafran arzafran force-pushed the security/trusted-publishing branch 2 times, most recently from 12fa0a0 to 6feedb5 Compare May 12, 2026 17:29
- Tag-triggered release workflow with build provenance
- GitHub Actions pinned by commit SHA, hardened runner
- Tag-version match guard before publish
- Removes manual publish scripts
- Adds SECURITY.md, npm Dependabot tracking, CODEOWNERS for release paths
@arzafran arzafran force-pushed the security/trusted-publishing branch from 6feedb5 to fc36fbc Compare May 12, 2026 17:30
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