Updated 19 Sep 2026: Adds GitHub/npm's Sep 18 stage-only granular token scope, which lets CI stage package versions for review without holding direct publish permission. Keeps it in the existing npm supply-chain hardening dossier.

Key details

  1. npm v12 became generally available on July 8, 2026.
  2. Dependency lifecycle scripts, Git dependencies and remote-URL dependencies are explicit opt-in in npm v12.
  3. npm packages can have multiple trusted-publishing configurations.
  4. Staged package approval waits until malware scanning completes.
  5. On September 18, npm added a Read and write (stage only) granular-token permission.
  6. Stage-only tokens can upload and stage package versions but cannot publish them directly to the registry.
  7. The new scope is intended to let automation prepare releases while retaining a separate final publish authority.
  8. Aikido says four September 7 package versions carried the exact Shai-Hulud payload hash seen in May despite publish-time scanning.

What builders should take away

  1. For CI that cannot use trusted publishing, prefer a stage-only token over a credential with direct publish authority when the workflow supports a review step.
  2. Keep final publish authority outside ordinary build automation so a compromised workflow cannot immediately turn an artifact into a public release.
  3. Use npm v12's install-script restrictions and explicit source allowlists even when packages come from the public registry; registry scanning is not a substitute for consumer-side policy.
  4. Use staged publishing and malware scanning as layers, not as guarantees that a package is clean.
  5. Move publishers toward trusted publishing/OIDC where possible to reduce reusable credential exposure further.
  6. Lock and review dependency changes and monitor security feeds for malicious-package takedowns or indicators.

What changed

npm v12 remains generally available with dependency lifecycle scripts, Git dependencies and remote-URL dependencies changed from automatic behavior to explicit opt-in. GitHub has also restricted bypass-2FA granular access tokens, expanded trusted publishing and made malware scanning complete before staged packages can be approved. On September 18, GitHub added a new granular access-token permission: Read and write (stage only). Automation holding that token can upload and stage a package version for review but cannot publish it directly to the npm registry. This adds a least-privilege boundary between build automation and the final release decision. The previously reported malware-scanning caveat remains relevant: Aikido Security says four September 7 packages carrying the identical Shai-Hulud payload hash from May reached npm despite publish-time scanning, so staged review and restricted credentials remain complementary controls rather than proof that an artifact is clean.

Why it matters

Package publishing pipelines often give CI credentials powerful enough to turn a compromised workflow into an immediate public release. Stage-only tokens narrow that blast radius: automation can prepare the artifact, while a separate approval path retains publish authority. Combined with npm v12’s install-time restrictions, trusted publishing and scan-gated staging, npm is increasingly splitting package trust across multiple controls. The Shai-Hulud finding also shows why those layers matter: malware scanning can miss an artifact, so limiting who or what can publish remains valuable independently of detection quality.

npm v12 still makes install-time execution explicit

Dependency lifecycle scripts, implicit node-gyp builds, Git dependencies and remote-URL dependencies are opt-in under npm v12. Teams can prepare policies under late npm 11 releases before upgrading CI and developer machines.

Publishing authentication has moved toward shorter-lived and narrower trust

GitHub has restricted sensitive operations for bypass-2FA granular access tokens and supports multiple trusted-publishing configurations per package. The September 18 stage-only token goes further by letting automation write a staged version without granting it the authority to make that version public.

Stage-only tokens separate artifact creation from release authority

The new Read and write (stage only) granular permission is designed for automated workflows. A workflow can stage a package version for review, but publishing requires a different authority. That means a compromised staging job no longer needs to hold a credential that can immediately release a package.

The staged-publishing gate still waits for malware scanning

Since September 3, staged packages cannot be approved until npm's malware scan is complete. The new token scope complements that gate: one control limits what automation can do, while the other inserts scanning and review before release.

Aikido says an unchanged Shai-Hulud payload passed through the scanner

Aikido reports that four packages published on September 7 contained the same file hash seen in the May @AntV Shai-Hulud wave. GitHub/npm had not published a root-cause account at the time of the previous dossier update. The evidence does not show that npm's scanner is generally ineffective, but it demonstrates that scan completion is not a sufficient trust boundary on its own.

Timeline

2026-07-08

npm v12 becomes latest

Install scripts, Git dependencies and remote URLs become explicit opt-in.
2026-07-28

Publish-time malware scanning is announced

GitHub says newly published npm packages are automatically scanned before becoming available.
2026-09-03

Staged approval becomes scan-gated

Staged packages cannot be approved until malware scanning is complete, and multiple trusted-publishing configurations become GA.
2026-09-07

Known Shai-Hulud payload reappears

Aikido says four package versions carrying the identical payload hash from the May wave were published through npm.
2026-09-18

Stage-only granular tokens arrive

Automation can now stage package versions for review without receiving permission to publish them directly.

What to watch next

  • Whether stage-only token support is adopted by common CI/release tooling and package-maintainer workflows.
  • Whether GitHub/npm further separates staging approval and final publication roles for organizations.
  • Whether GitHub/npm explains why the four reported Shai-Hulud packages passed publish-time scanning and whether detection rules change.
  • The exact January 2027 timing for direct publishing restrictions on bypass-2FA granular access tokens.
  • Whether npm exposes more scan status, findings or policy controls to package maintainers and organizations.

Still unclear

  • The stage-only token reduces credential authority but does not itself validate package contents or protect a separate publishing account from compromise.
  • The Shai-Hulud scanner-bypass evidence is reported by Aikido Security; GitHub/npm had not published a corresponding technical explanation at the time of the prior update.
  • Four packages do not establish the false-negative rate of npm's scanner or show that scanning provides no value.
  • The amount of npm v12 compatibility work still varies substantially by dependency graph.

Sources

Direct reading behind this dossier.

5 sources
Shai-Hulud Rises From the Dead after 111 days
Aikido Security specialist/independent

Reports four newly published packages carrying the identical Shai-Hulud payload hash from May despite npm's publish-time scanning.

Discussion

Discussion is reader-contributed. Comments are not part of the BTN dossier or its editorial evidence.

0 visible comments

Join the discussion

Keep comments useful and relevant. Reader contributions may be moderated and are not BTN editorial evidence.

Sign in to comment