GitHub is finally tightening up security around npm following multiple attacks
GitHub aims to harden package publication

- GitHub will enforce 2FA and deprecate legacy tokens to improve package publishing security
- Trusted Publishing will expand, and token-based publishing will be restricted by default
- Shai-Hulud worm breached npm, prompting removal of over 500 compromised packages
Following a number of recent high-profile attacks and hacking attempts, GitHub has decided to make substantial changes to the security of its platform.
In a blog post, GitHub detailed changes to authentication and publishing, set to go live “in the near future”, with the aim of hardening package publication.
The announcement notes authentication and publishing options will be changed to include local publishing with required 2FA, granular tokens with a seven-day expiration date, and Trusted Publishing.
Extra authentication and protection
Furthermore, GitHub announced it would deprecate legacy classic tokens, as well as time-based one-time password (TOTP) 2FA, forcing users to migrate to FIDO-based 2FA. It will also limit granular tokens with publishing permissions to a shorter expiration, and set publishing access to disallow tokens by default (this should make users go for trusted publishers or 2FA enforced local publishing).
The option to bypass 2FA for local package publishing will be removed, while the list of eligible providers for trusted publishing will be expanded.
“We recognize that some of the security changes we are making may require updates to your workflows,” GitHub explained.
“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.”
Sign up to the TechRadar Pro newsletter to get all the top news, opinion, features and guidance your business needs to succeed!
Open source software is crucial in the software development industry, with organizations of all sizes - from enterprises to microbusinesses - tapping into the sea of high-quality code. This also makes it ideal for cybercriminals engaging in third-party and supply-chain attacks.
One example is the recent Shai-Hulud attack, where a self-replicating worm malware infiltrated the npm ecosystem via a compromised maintainer account, and went about stealing all kinds of secrets from software developers.
The attack forced GitHub to remove more than 500 compromised packages, as well as block the upload of new packages containing whatever indicators of compromise were available at the time.
You might also like
- A terrifying, self-replicating malware has infected npm packages with over 2 million downloads per week - here's how to stay safe
- Take a look at our guide to the best authenticator app
- We've rounded up the best password managers
Sead is a seasoned freelance journalist based in Sarajevo, Bosnia and Herzegovina. He writes about IT (cloud, IoT, 5G, VPN) and cybersecurity (ransomware, data breaches, laws and regulations). In his career, spanning more than a decade, he’s written for numerous media outlets, including Al Jazeera Balkans. He’s also held several modules on content writing for Represent Communications.
You must confirm your public display name before commenting
Please logout and then login again, you will then be prompted to enter your display name.