Discussion of how npm's trusted publishing via GitHub Actions OIDC could prevent attacks, noting axios uses this but the account takeover bypassed it
← Back to Axios compromised on NPM – Malicious versions drop remote access trojan
The recent axios compromise highlights a recurring vulnerability where attackers hijack maintainer accounts to manually publish malicious code via the CLI, effectively bypassing intended CI/CD pipelines. While Trusted Publishing via OIDC is designed to eliminate long-lived secrets, commenters argue that it remains insufficient if an account takeover allows an attacker to revert to token-based publishing or modify repository configurations. To address this, many advocate for npm to mandate Trusted Publishing for high-download packages and introduce strict enforcement options that prevent any manual overrides during a compromise. Beyond platform-level settings, some suggest more radical shifts, such as adopting cryptographic attestations like Sigstore or moving away from packaged artifacts entirely in favor of direct source code imports from git repositories.
15 comments tagged with this topic