Replies: 10 comments 6 replies
This comment has been hidden.
This comment has been hidden.
|
Couple of questions about the topic:
|
|
Publish-time scanning is a good step toward making npm safer. The main concern will be how automation handles the delay, so clear status signals and reliable retry guidance would help. The disclosure process for legitimate security tools also sounds like a practical approach. |
|
Feedback on how should tooling tell "pending scan" apart from "never published" This was posted before the link was shared in the blog post https://github.com/orgs/community/discussions/203395 |
|
Curious about the mechanics: 1. Will I be notified (and how?) if the scanning results in my package(s) not being published? 2. In case there are false positives and my package is not published owing to a potential security reason, is there an appeal process? |
|
If I publish [A] and [B depends-on A], (actually hundreds of these packages) in what normally was the correct dependency order, will they be held, scanned, & released in the right order? |
|
It's perhaps still early days to make an assessment but could today's new Shai-Hulud style attack have been detected by such checks - publish actions seem to have had malware bundled in the package? https://www.aikido.dev/blog/keyv-and-friends-compromised-in-npm-supply-chain-attack |
|
Thanks for the transparency and for actively involving the community in this rollout! 🚀 Overall, I think these are positive changes for the npm ecosystem. Publish-time scanning is a worthwhile trade-off if it helps prevent malicious packages from reaching users. The A couple of suggestions that could further improve the experience:
Really appreciate the focus on improving supply-chain security while keeping maintainers in the loop. Looking forward to seeing how this evolves! 👏 |
|
This scanning appears to have created a couple of incidents for us at Cloudflare where the During this period, anyone running For this two be a viable tool, there needs to be support for monorepos that release numerous tightly coupled packages in one go to be safely published. Workarounds we considered:
Ideally this should be baked into the platform so that packages are scanned and released to public only when all their dependencies have been released. |
npm Publish-Time Scanning & Dual-Use Disclosure AnalysisThis repository serves as a technical breakdown and strategic log regarding the new supply-chain security changes introduced to the npm registry. It outlines the architectural impact on CI/CD pipelines, documents the monorepo dependency race condition, and provides actionable workarounds and community feedback templates. Architectural Overview & Status LogThe transition to asymmetric, asynchronous publish-time scanning changes a fundamental invariant of the npm ecosystem:
While this structural layer is an excellent step forward for overall supply-chain security, the current implementation introduces an operational race condition for tightly coupled multi-package systems, monorepos, and downstream CI/CD delivery pipelines. Critical Vulnerability: The Monorepo Dependency RaceThe issue highlighted by major upstream maintainers (such as the Cloudflare Why This HappensThe automated scanning engine evaluates package payloads independently based on binary size, file counts, heuristics, and script signatures (such as the presence of If a downstream dependency ( Remediation & Tooling WorkaroundsUntil platform-native transaction batching or synchronous blocking mechanisms are officially integrated into the npm registry, maintainers must implement defensive scripting inside their deployment pipelines. 1. The
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hi all 👋
We recently rolled out two supply-chain security changes on npm, and we'd like your feedback on how they're working in practice. This thread is for discussion — questions, friction, edge cases, and suggestions are all welcome.
Full details are in the changelog: https://gh.io/npm-publish-time-scanning
What changed, in short
1. Packages are scanned at publish time
Newly published packages are now scanned before they become available to install. Most publishes see a short delay (typically a few minutes) between publishing and availability.
npm dist-tagkeeps working during this window; commands that depend on the published version (likenpm deprecateandnpm unpublish) wait until the package is available.If your automation assumes a package is installable the instant it's published, it may need to poll/retry for availability rather than assume a fixed delay.
2. Disclosure for dual-use content
Some legitimate packages (security research tools, pen-testing utilities, obfuscation tools, etc.) have capabilities that can look like malware to automated scanning. Maintainers of these packages can now declare them with a
contentPolicyfield inpackage.jsonand aDISCLOSUREfile describing the intended use. This helps us distinguish legitimate security tooling from malicious packages without manually reviewing every publish.We'd love your input
We're reading this thread and will use it to improve the rollout. Thanks for helping us make the ecosystem safer 🙏
All reactions