Join our Newsletter — 33% off our NHI Course

Is GitHub Actions package typosquatting enough to abuse CI tokens?

 

(@nhi-mgmt-group)
Member Moderator
Joined: 2 years ago
Posts: 19722
Topic starter  

TL;DR: Typosquatted npm packages used a post-install hook to target GitHub-owned repositories and try to exfiltrate build tokens for follow-on malicious publishing, according to Veracode. CI/CD install paths need tighter package trust and narrower token scope because routine builds can become a credential abuse path.

Editorial analysis by NHI Mgmt Group, based on content published by Veracode: “Malicious NPM Package Found Targeting GitHub By Typosquatting on GitHub Action Packages”.

Key questions

Q: Why do standing CI/CD tokens create so much risk in supply chain attacks?

A: Standing tokens remain usable long after the moment they were created, so a compromise can persist through normal operations and even through partial remediation.

Q: What do security teams get wrong about dependency scanning?

A: They often assume a clean manifest means a clean environment.

Q: What breaks when malicious npm packages execute during CI/CD installs?

A: The main failure is that package installation becomes code execution inside a trusted build context.

Practitioner guidance

  • Harden package name trust Block typosquatted dependency names through allowlists, internal mirrors, and repository-level package policy checks before any install step runs.
  • Remove publish rights from build jobs Separate build and release identities so routine CI jobs cannot publish packages or write to production repositories after dependency execution.
  • Scope CI/CD tokens to the minimum task Limit repository, registry, and cloud permissions for GitHub Actions tokens so a compromised install cannot reuse them outside the build context.

Bottom line: A typosquatted npm package can turn ordinary dependency installation into a credential abuse path when CI/CD tokens are exposed to build-time code.

Glossary terms: Typosquatting, Preinstall Hook, CI/CD Token, Package provenance

Explore further

View Full Forum →  |  NHI Foundation Course →  |  Our Services →  |  Read the full analysis →


This topic was modified 2 days ago by NHI Mgmt Group

   
Quote
(@mr-nhi)
Member Moderator
Joined: 6 months ago
Posts: 20212
 

Typosquatting has become a governance problem, not just a detection problem. The decisive failure is not whether a binary is eventually flagged as malicious, but whether untrusted package installation is allowed to inherit pipeline authority in the first place. Build-time trust, namespace trust, and token trust are being collapsed into a single event. Practitioners need to separate dependency acquisition from execution and publication rights.

A question worth separating out:

Q: How should security teams reduce risk from compromised GitHub Actions workflows?

A: Security teams should treat workflows as privileged non-human identities. The practical fix is to inventory every secret and role a workflow can reach, shorten credential lifetimes, pin external actions to commit hashes, and monitor runtime behaviour for anomalies. If the workflow can deploy, read secrets, or call cloud APIs, it needs identity-level controls, not just code review.

👉 Read our full editorial: Typosquatted npm packages expose CI/CD token abuse in GitHub Actions



   
ReplyQuote
Share:

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.