Top Highlights
-
Commitment to Security: GitHub is enhancing NPM supply chain security following recent attacks, particularly a self-replicating malware and a social engineering incident involving notable developers.
-
New Security Measures: Future package publications will require two-factor authentication, introduce short-lived granular tokens, and implement the Trusted Publishers authentication method to mitigate risks.
-
Comprehensive Changes Ahead: GitHub plans to phase out legacy tokens, replace time-based one-time passwords with FIDO-based 2FA, and broaden the range of eligible providers for trusted publishing while gradually rolling out these updates.
- Expert Consensus: While these changes mark progress in NPM security, experts emphasize the need for a more holistic security approach, as current measures alone may not suffice to combat increasingly sophisticated cyber threats.
[gptAs a technology journalist, write a short news story divided in two subheadings, at 12th grade reading level about ‘GitHub Aims to Secure Supply Chain as NPM Hacks Ramp Up’in short sentences using transition words, in an informative and explanatory tone, from the perspective of an insightful Tech News Editor, ensure clarity, consistency, and accessibility. Use concise, factual language and avoid jargon that may confuse readers. Maintain a neutral yet engaging tone to provide balanced perspectives on practicality, possible widespread adoption, and contribution to the human journey. Avoid passive voice. The article should provide relatable insights based on the following information ‘
GitHub this week committed to a more secure NPM supply chain in the wake of a handful of attacks causing widespread compromise.
On Sept. 22, GitHub senior director of security research Xavier René-Corail published a blog post to GitHub addressing the surge in package registry-based attacks, specifically NPM packages. The post comes in the wake of two major supply chain attacks involving NPM packages this past month: the self-replicating Shai-Hulud malware campaign and a social engineering attack against prolific developer Qix.
In the case of Shai-Hulud, an infostealing malware that embedded itself in poisoned malware packages and could steal secrets including NPM tokens, GitHub said the worm could have resulted in an endless stream of attacks if the security industry didn’t take swift action. For its part, the company said it immediately removed more than 500 compromised packages and blocked new packages containing the malware’s indicators of compromise.
In addition to these actions, GitHub said it would take steps to harden the NPM supply-chain and make package publication more secure.
GitHub Aims to Secure NPM Supply Chain
GitHub highlighted three core changes. In the future, it will only allow the open source community to publish packages locally with required two-factor authentication, have granular tokens that last only seven days, and use the Trusted Publishers authentication method.
“Trusted publishing is a recommended security capability by the OpenSSF Securing Software Repositories Working Group as it removes the need to securely manage an API token in the build system,” the blog post read. “It was pioneered by PyPI in April 2023 as a way to get API tokens out of build pipelines. Since then, trusted publishing has been added to RubyGems (December 2023), crates.io (July 2025), npm (also July 2025), and most recently NuGet (September 2025), as well as other package repositories.”
GitHub, which is a subsidiary of Microsoft, will also deprecate legacy classic tokens, deprecate time-based one-time password in favor of FIDO-based two-factor authentication, place further limitations on granular tokens while disallowing tokens by default, removing the option to bypass 2FA for local package publishing, and expand the list of eligible providers for trusted publishing.
“We recognize that some of the security changes we are making may require updates to your workflows,” René-Corail wrote. “We are going to roll these changes out gradually to ensure we minimize disruption while strengthening the security posture of npm. We’re committed to supporting you through this transition and will provide future updates with clear timelines, documentation, migration guides, and support channels.”
GitHub encouraged NPM maintainers to consider using NPM-trusted publishing instead of tokens, strengthen publishing settings to require 2FA, and to use WebAuthn instead of TOTP when configuring 2FA.
Mike McGuire, senior security solutions manager at Black Duck, tells Dark Reading that GitHub’s changes mark “an important step forward” for NPM security, addressing the problems of weak authentication and overly broad, long-lived tokens.
“By enforcing modern 2FA and adopting granular, short-lived tokens, GitHub is raising the bar for attackers and closing off some of the paths that enabled incidents like the Qix compromise and Shai-Hulud,” McGuire says. “That said, no single change will fully prevent these types of attacks. Package registries are only one part of the open source software supply chain, and attackers are increasingly creative in finding ways to compromise popular projects.”
A Promising Step, But Is It Enough?
Although all security enhancements are appreciated, time will tell how they will fare against similar threat campaigns to Shai-Hulud in the future.
Michael Freeman, head of threat intelligence at Armis, tells Dark Reading that GitHub’s recommended actions are steps in the right direction, but small ones. Freeman argues a more comprehensive security process will be needed to make lasting changes, including static and dynamic analysis (SAST/DAST), enforcing reproducible builds to ensure source equals artifact, real-time monitoring of suspicious registry activity and abnormal uploads, and more.
Danny Allan, chief technology officer at Snyk, similarly calls GitHub’s actions a “welcome step forward” but notes the sophisticated ways threat actors target repositories. “They add stronger controls against maintainer account compromise and worm-style propagation,” Allan says. “But this is not a silver bullet. Attacks like Shai-Hulud and Qix exploited far more than just stolen tokens, from compromised maintainers and typosquatting to malicious code injections. And today, attackers are increasingly using AI to automate and scale those attacks. Token changes alone don’t stop developers downstream from unknowingly installing already-compromised packages.”
‘. Do not end the article by saying In Conclusion or In Summary. Do not include names or provide a placeholder of authors or source. Make Sure the subheadings are in between html tags of
[/gpt3]
Stay Ahead with the Latest Tech Trends
Explore the future of technology with our detailed insights on Artificial Intelligence.
Discover archived knowledge and digital history on the Internet Archive.
CyberRisk-V1
