{"id":253733,"date":"2026-05-23T12:35:00","date_gmt":"2026-05-23T16:35:00","guid":{"rendered":"https:\/\/news-you-need.com\/index.php\/2026\/05\/23\/npm-adds-2fa-gated-publishing-and-package-install-controls-against-supply-chain-attacks\/"},"modified":"2026-05-23T20:25:08","modified_gmt":"2026-05-24T00:25:08","slug":"npm-adds-2fa-gated-publishing-and-package-install-controls-against-supply-chain-attacks","status":"publish","type":"post","link":"https:\/\/news-you-need.com\/index.php\/2026\/05\/23\/npm-adds-2fa-gated-publishing-and-package-install-controls-against-supply-chain-attacks\/","title":{"rendered":"npm Adds 2FA-Gated Publishing and Package Install Controls Against Supply Chain Attacks"},"content":{"rendered":"<p><a href=\"https:\/\/thehackernews.com\/2026\/05\/npm-adds-2fa-gated-publishing-and.html\">npm Adds 2FA-Gated Publishing and Package Install Controls Against Supply Chain Attacks<\/a><\/p>\n<p><a href=\"https:\/\/thehackernews.com\/2026\/05\/npm-adds-2fa-gated-publishing-and.html\">https:\/\/thehackernews.com\/2026\/05\/npm-adds-2fa-gated-publishing-and.html<\/a><\/p>\n<p>Publish Date: <a href=\"publish_date]\">2026-05-23 12:35:00<\/a><\/p>\n<p>Source Domain: <a href=\"thehackernews.com\">thehackernews.com<\/a><\/p>\n<p><span class=\"p-author\">\ue804<span class=\"author\">Ravie Lakshmanan<\/span>\ue802<span class=\"author\">May 23, 2026<\/span><\/span><span class=\"p-tags\">Software Supply Chain \/ DevSecOps<\/span><\/p>\n<p>GitHub has rolled out new controls for npm to improve the security of the software supply chain, giving maintainers the ability to explicitly approve a release prior to the packages becoming publicly available for installation.<\/p>\n<p>Called staged publishing, the feature is now generally available on npm. It mandates that a human maintainer pass a two-factor authentication (2FA) challenge to approve a package before it is pushed to the npmjs[.]com.<\/p>\n<p>&#8220;Instead of a direct publish that immediately makes a package version available to consumers, the prebuilt tarball is uploaded to a stage queue where a maintainer must explicitly approve it before it becomes installable,&#8221; GitHub said.<\/p>\n<p>The Microsoft-owned subsidiary said the change ensures &#8220;proof of presence&#8221; for every publish, including those that come from non-interactive CI\/CD workflows and trusted publishing with OpenID Connect (OIDC) authentication.<\/p>\n<p>Before using staged publishing, package maintainers have to meet the following criteria &#8211;<\/p>\n<ul>\n<li>Have publish access to the package<\/li>\n<li>Package already exists on the npm registry, meaning a brand new package cannot be staged<\/li>\n<li>2FA is enabled for the account<\/li>\n<\/ul>\n<p>Developers can use the command &#8220;npm stage publish&#8221; from the root directory of the package to submit it to a staging area. To use this command, it&#8217;s essential to update to npm CLI 11.15.0 or newer. For optimal protection, GitHub is recommending that staged publishing be paired with trusted publishing using OIDC.<\/p>\n<p>A second update focused on npm relates to the introduction of three new install source flags alongside the existing -allow-git flag &#8211;<\/p>\n<ul>\n<li>&#8211;allow-file: Controls installs from local file paths and local tarballs<\/li>\n<li>&#8211;allow-remote: Controls installs from remote URLs, including https tarballs<\/li>\n<li>&#8211;allow-directory: Controls installs from local directories<\/li>\n<\/ul>\n<p>The flags allow developers to &#8220;apply the same explicit-allowlist approach to every non-registry&#8230;<\/p>\n<p><a href=\"https:\/\/thehackernews.com\/2026\/05\/npm-adds-2fa-gated-publishing-and.html\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>npm Adds 2FA-Gated Publishing and Package Install Controls Against Supply Chain Attacks https:\/\/thehackernews.com\/2026\/05\/npm-adds-2fa-gated-publishing-and.html Publish Date:&#8230;<\/p>\n","protected":false},"author":1,"featured_media":253734,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/blogger.googleusercontent.com\/img\/b\/R29vZ2xl\/AVvXsEi4rnMZgOYbsYr65UN9AZ3oFzcAwqXSYqgRfjUGpeaQeyP-0OAaqJ9aceXPAiujRKwyGQMa_4ShcSvtOWPb9T3qpqF2LATAw2U4iA7IkU9ok0alDbzN_WYJeaZ1SrF0-vyRrEHGedMEcCeP2otYYqplHmqEBda1R_MePbWgEpt-b-GB_RhxJLDC1pJFV0S0\/s1600\/npm-security.png","fifu_image_alt":"","footnotes":""},"categories":[15],"tags":[],"class_list":["post-253733","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity"],"_links":{"self":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/253733"}],"collection":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/comments?post=253733"}],"version-history":[{"count":1,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/253733\/revisions"}],"predecessor-version":[{"id":253735,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/253733\/revisions\/253735"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media\/253734"}],"wp:attachment":[{"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/media?parent=253733"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/categories?post=253733"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/news-you-need.com\/index.php\/wp-json\/wp\/v2\/tags?post=253733"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}