Thu, June 25, 2026
14 min read
Hardening npm Publishing with Trusted Publishing — Tokenless OIDC, Staged Publishing, and PR-Merge Releases
#npm#github-actions#oidc#supply-chain-security#ci-cd
After the 2025-2026 npm supply-chain attacks, publishing with a long-lived token is no longer the default. Authenticate with GitHub Actions OIDC Trusted Publishing so there is no publish secret, make CI capable of only staging a package, and keep live promotion as a separate npm MFA step. Restrict the release Environment to the PR merge ref, and automate even the release PR itself. The result is a multi-boundary defense where repository write access alone cannot produce a live npm package.
read more →