{"id":220035,"date":"2026-05-26T03:35:06","date_gmt":"2026-05-26T07:35:06","guid":{"rendered":"https:\/\/testing.news-you-need.com\/index.php\/2026\/05\/26\/npm-adds-2fa-gated-publishing-and-package-install-controls-against-supply-chain-attacks\/"},"modified":"2026-05-26T03:35:10","modified_gmt":"2026-05-26T07:35:10","slug":"npm-adds-2fa-gated-publishing-and-package-install-controls-against-supply-chain-attacks","status":"publish","type":"post","link":"https:\/\/testing.news-you-need.com\/index.php\/2026\/05\/26\/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><strong>GitHub Enhances npm Security with Staged Publishing<\/strong><\/p>\n<p>GitHub has introduced new controls for npm with its staged publishing feature to bolster the security of the software supply chain. This update mandates that package maintainers must perform a two-factor authentication (2FA) challenge and explicitly approve a package before it is publicly available for installation. Instead of the previous direct publishing method, the new approach uploads a prebuilt tarball to a staging queue where it waits for approval from a maintainer before becoming installable. This provides &#8220;proof of presence&#8221; for every package publish, even from CI\/CD workflows or with OpenID Connect (OIDC) authentication. For using staged publishing, three specific criteria must be met: maintainers must have publish access to the package, the package must already exist on the npm registry, and 2FA must be enabled for the account.<\/p>\n<p>Developers can implement this by using the &#8220;npm stage publish&#8221; command from the package&#8217;s root directory, which requires updating to npm CLI 11.15.0 or newer. To further enhance security, GitHub recommends pairing staged publishing with trusted publishing that uses OIDC. Additionally, npm has introduced three new install source flags\u2014&#8211;allow-file, &#8211;allow-remote, and &#8211;allow-directory\u2014allowing developers to enforce an explicit-allowlist strategy for non-registry install sources. These improvements come on the heels of a significant uptick in software supply chain attacks targeting open-source software ecosystems.<\/p>\n<p><strong>Key Points:<\/strong><\/p>\n<ul>\n<li>GitHub&#8217;s staged publishing mandates explicit human approval after 2FA before making packages installable to enhance supply chain security.<\/li>\n<li>Maintainers must have publish access to the package, the package should already exist on the npm registry, and 2FA should be enabled for use with staged publishing.<\/li>\n<li>Introduction of new npm install source flags helps developers control installations from various non-registry sources like files, remote URLs, and local directories.<\/li>\n<li>The updates aim to combat the surge in supply chain attacks, particularly targeting the open-source ecosystem.<\/li>\n<li>GitHub recommends pairing staged publishing with trusted OIDC publishing for optimal security.<\/li>\n<\/ul>\n<p><\/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":220037,"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\/s1700-e365\/npm-security.png","fifu_image_alt":"","footnotes":""},"categories":[15],"tags":[],"class_list":["post-220035","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cybersecurity"],"_links":{"self":[{"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/220035"}],"collection":[{"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/comments?post=220035"}],"version-history":[{"count":1,"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/220035\/revisions"}],"predecessor-version":[{"id":220038,"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/posts\/220035\/revisions\/220038"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/media\/220037"}],"wp:attachment":[{"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/media?parent=220035"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/categories?post=220035"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/testing.news-you-need.com\/index.php\/wp-json\/wp\/v2\/tags?post=220035"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}