{"id":13125,"date":"2026-05-25T10:03:36","date_gmt":"2026-05-25T10:03:36","guid":{"rendered":"https:\/\/serisec.com\/index.php\/2026\/05\/25\/github-adds-staged-publishing-to-npm-to-block-automated-supply-chain-attacks\/"},"modified":"2026-05-25T10:03:36","modified_gmt":"2026-05-25T10:03:36","slug":"github-adds-staged-publishing-to-npm-to-block-automated-supply-chain-attacks","status":"publish","type":"post","link":"https:\/\/serisec.com\/index.php\/2026\/05\/25\/github-adds-staged-publishing-to-npm-to-block-automated-supply-chain-attacks\/","title":{"rendered":"GitHub Adds Staged Publishing to npm to Block Automated Supply Chain Attacks"},"content":{"rendered":"<p>    GitHub Adds Staged Publishing to npm to Block Automated Supply Chain Attacks<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n    <!-- no image --><br \/>\n \t<BR><br \/>\n<BR><\/BR><\/p>\n<div>\n<p class=\"wp-block-paragraph\">GitHub has introduced a major security upgrade to the npm ecosystem with the general availability of staged publishing and new install-time controls, aimed at reducing automated <a href=\"https:\/\/cybersecuritynews.com\/threat-actors-weaponizing-open-source-packages\/\" target=\"_blank\" rel=\"noreferrer noopener\">supply chain attacks targeting open-source packages.<\/a><\/p>\n<p class=\"wp-block-paragraph\">The newly released staged publishing feature changes how npm packages are published and distributed.<\/p>\n<p class=\"wp-block-paragraph\">Instead of immediately making a package available after publishing, npm now places the prebuilt package tarball into a staging queue.<\/p>\n<p class=\"wp-block-paragraph\">A human maintainer must explicitly approve the package before it becomes publicly installable.<\/p>\n<h2 id=\"h-github-adds-npm-staging\" class=\"wp-block-heading\"><strong>GitHub Adds npm Staging<\/strong><\/h2>\n<p class=\"wp-block-paragraph\">This approach introduces a critical security checkpoint, especially for automated CI\/CD workflows that are often targeted in supply chain attacks.<\/p>\n<p class=\"wp-block-paragraph\">Even if an attacker compromises a pipeline or injects malicious code, the package cannot be released without manual approval.<\/p>\n<p class=\"wp-block-paragraph\">Key security benefits include:<\/p>\n<ul class=\"wp-block-list\">\n<li>Mandatory human approval enforced with<a href=\"https:\/\/cybersecuritynews.com\/github-enhances-npms-security\/\" target=\"_blank\" rel=\"noreferrer noopener\"> two-factor authentication (2FA)<\/a>.\n<\/li>\n<li>Visibility of staged packages through both npm CLI and npmjs.com.\n<\/li>\n<li>Protection against unauthorized or automated publishing attempts.\n<\/li>\n<li>Reinforced proof-of-presence for maintainers during release.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">The feature is available starting with npm CLI version 11.15.0 and requires developers to switch from the traditional npm publish command to npm stage publish for staged workflows.<\/p>\n<p class=\"wp-block-paragraph\">GitHub recommends combining staged publishing with trusted publishing using <a href=\"https:\/\/cybersecuritynews.com\/ci-cd-security\/\" target=\"_blank\" rel=\"noreferrer noopener\">OpenID Connect (OIDC)<\/a>.<\/p>\n<p class=\"wp-block-paragraph\">This setup allows CI\/CD systems to publish packages directly into the staging queue without exposing long-lived credentials.<\/p>\n<p class=\"wp-block-paragraph\">Organizations can enforce stage-only publishing policies, ensuring that:<\/p>\n<ul class=\"wp-block-list\">\n<li>Direct npm publish commands are rejected.\n<\/li>\n<li>Only npm stage publish is allowed from CI pipelines.\n<\/li>\n<li>Final approval is completed by a maintainer on a trusted device.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">This model significantly reduces the risk of credential theft and automated malicious releases.<\/p>\n<p class=\"wp-block-paragraph\">In addition to staged publishing, GitHub has introduced new install-time security flags in npm 11.15.0.<\/p>\n<p class=\"wp-block-paragraph\">These flags provide granular control over where dependencies can be installed from, helping prevent malicious or unexpected sources.<\/p>\n<p class=\"wp-block-paragraph\"><strong>New flags include:<\/strong><\/p>\n<ul class=\"wp-block-list\">\n<li>\u2013allow-file: Controls installations from local files or tarballs.\n<\/li>\n<li>\u2013allow-remote: Restricts dependencies fetched from remote URLs.\n<\/li>\n<li>\u2013allow-directory: Governs installs from local directories.\n<\/li>\n<li>\u2013allow-git (existing): Controls installations from Git repositories.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">Each flag supports two modes: all (default) or none, and can be configured via .npmrc or package.json.<\/p>\n<p class=\"wp-block-paragraph\">These controls allow developers to implement strict allowlist policies, reducing the attack surface from non-registry sources often used in dependency confusion or injection attacks.<\/p>\n<h2 id=\"h-security-impact\" class=\"wp-block-heading\"><strong>Security Impact<\/strong><\/h2>\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/github.blog\/changelog\/2026-05-22-staged-publishing-and-new-install-time-controls-for-npm\/\" target=\"_blank\" rel=\"noreferrer noopener nofollow\">GitHub also confirmed<\/a> that in npm CLI version 12, the default behavior for \u2013allow-git will change from all to none, signaling a shift toward stricter default security settings.<\/p>\n<p class=\"wp-block-paragraph\">Developers are encouraged to adopt these restrictions early by manually configuring the new flags.<\/p>\n<p class=\"wp-block-paragraph\">For example, an organization can configure its environment to block all non-registry installs:<\/p>\n<ul class=\"wp-block-list\">\n<li>Set \u2013allow-remote=none<\/li>\n<li>Set \u2013allow-file=none<\/li>\n<li>Set \u2013allow-directory=none<\/li>\n<li>Allow only trusted registry packages<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">Combined with staged publishing, this creates a controlled pipeline where both package creation and consumption are tightly secured.<\/p>\n<p class=\"wp-block-paragraph\">These updates directly address common supply chain attack vectors, including:<\/p>\n<ul class=\"wp-block-list\">\n<li>Malicious code injection in CI\/CD pipelines.\n<\/li>\n<li>Dependency confusion via external sources.\n<\/li>\n<li>Unauthorized package publishing.<\/li>\n<\/ul>\n<p class=\"wp-block-paragraph\">By introducing human validation and stricter dependency controls, GitHub is moving npm toward a <a href=\"https:\/\/cybersecuritynews.com\/microsoft-details-new-security-safeguards-for-generative-ai\/\" target=\"_blank\" rel=\"noreferrer noopener\">zero-trust supply chain model<\/a>.<\/p>\n<p class=\"wp-block-paragraph\">Organizations using npm are strongly advised to upgrade to npm CLI 11.15.0 or later and update their workflows to take full advantage of these new protections.<\/p>\n<p class=\"has-text-align-center has-background wp-block-paragraph\" style=\"background:linear-gradient(180deg,rgb(238,238,238) 91%,rgb(169,184,195) 100%)\"><strong>Follow us on\u00a0<a href=\"https:\/\/news.google.com\/publications\/CAAqMggKIixDQklTR3dnTWFoY0tGV041WW1WeWMyVmpkWEpwZEhsdVpYZHpMbU52YlNnQVAB?hl=en-IN&amp;gl=IN&amp;ceid=IN:en\" target=\"_blank\" rel=\"noreferrer noopener\">Google News<\/a>,\u00a0<a href=\"https:\/\/www.linkedin.com\/company\/cybersecurity-news\/\" target=\"_blank\" rel=\"noreferrer noopener\">LinkedIn<\/a>,\u00a0and\u00a0<a href=\"https:\/\/x.com\/cyber_press_org\" target=\"_blank\" rel=\"noreferrer noopener\">X<\/a>\u00a0to Get More Instant Updates.<\/strong><\/p>\n<p>The post <a href=\"https:\/\/cybersecuritynews.com\/github-adds-staged-publishing-to-npm-to-block-automated-supply-chain-attacks\/\">GitHub Adds Staged Publishing to npm to Block Automated Supply Chain Attacks<\/a> appeared first on <a href=\"https:\/\/cybersecuritynews.com\/\">Cyber Security News<\/a>.<\/p>\n<\/div>\n<p> \t<BR><br \/>\n <BR><\/BR><br \/>\n    Abinaya<br \/>\n \t<BR><br \/>\n<BR><\/BR><br \/>\n<a href=\"https:\/\/cybersecuritynews.com\/github-adds-staged-publishing-to-npm-to-block-automated-supply-chain-attacks\/\">Go to cyber-security-news<\/a><br \/>\n \t<BR><br \/>\n <BR><\/BR><\/p>\n","protected":false},"excerpt":{"rendered":"<p>GitHub Adds Staged Publishing to npm to Block Automated Supply Chain Attacks GitHub has introduced a major security upgrade to the npm ecosystem with the general availability of staged publishing and new install-time controls, aimed at reducing automated supply chain attacks targeting open-source packages. The newly released staged publishing feature changes how npm packages are [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[129,63,899],"tags":[130],"class_list":["post-13125","post","type-post","status-publish","format-standard","hentry","category-cyber-security","category-cyber-security-news","category-github","tag-cyber-security-news"],"_links":{"self":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/13125"}],"collection":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/comments?post=13125"}],"version-history":[{"count":0,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/posts\/13125\/revisions"}],"wp:attachment":[{"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/media?parent=13125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/categories?post=13125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/serisec.com\/index.php\/wp-json\/wp\/v2\/tags?post=13125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}