TL;DR: An attacker hijacked a gpt-pilot co-founder’s GitHub account, force-pushed a Shai-Hulud credential stealer into main, and was stopped only because ruff CI failed twice on formatting and linting errors. The case shows how repository access, branch protection, and developer-tool persistence now function as NHI governance controls, according to StepSecurity.
NHIMG editorial — based on content published by StepSecurity: LLMjacking: How Attackers Hijack AI Using Compromised NHIs
By the numbers:
- The attacker attempted access within an average of 17 minutes after AWS credentials are exposed publicly, and as quickly as 9 minutes in some cases.
Questions worth separating out
Q: What breaks when a package maintainer account is compromised?
A: When a maintainer account is compromised, the attacker inherits trusted publishing rights and can turn legitimate release channels into malware distribution paths.
Q: Why do GitHub repositories create NHI risk for IAM teams?
A: GitHub repositories create NHI risk because they often contain the credentials and automation identities that actually touch production systems.
Q: How do security teams know if branch protections are actually working?
A: They should test whether a compromised or over-privileged account can still rewrite history, skip review, or publish code without passing required checks.
Practitioner guidance
- Lock down default branches Require pull request reviews, required status checks, and blocked force pushes on every production repository.
- Treat maintainer accounts as privileged identities Apply stronger access governance to repository owners and release managers than to ordinary contributors.
- Scan developer workflows for persistence hooks Check editor tasks, local agent settings, repo hooks, and module import paths for unexpected execution points.
What's in the full analysis
StepSecurity's full post covers the operational detail this analysis intentionally leaves for the source:
- The exact commit timeline, force-push sequence, and CI failure points that blocked the malware.
- The full payload breakdown, including the GitHub commit C2 channel and Sigstore abuse path.
- The file hashes, commit SHAs, and indicators of compromise needed for detection and response.
- The repository-level recovery steps for confirming exposure and rotating affected credentials.
👉 Read StepSecurity's analysis of the gpt-pilot Shai-Hulud compromise →
GitHub account compromise and Shai-Hulud: what IAM teams missed?
Explore further
Repository maintainer access is now an NHI governance problem, not only a software engineering problem. A compromised maintainer account can rewrite history, bypass review, and turn a code repository into a malware distribution channel. The identity boundary here is the GitHub account, the branch policy, and the CI gate working together or failing together. Teams should treat maintainer identities as privileged non-human-adjacent access paths that need governance, not just authentication.
A few things that frame the scale:
- 4.6% of all public GitHub repositories contain at least one hardcoded secret, according to the State of Secrets Sprawl 2025.
- 15% of commit authors have leaked at least one secret in their contribution history, according to the State of Secrets Sprawl 2025.
A question worth separating out:
Q: Who is accountable when a compromised action leaks repository secrets?
A: Accountability usually spans platform engineering, application owners, and identity governance, because the failure crosses code integrity, workflow design, and credential lifecycle. The right question is not who owns the incident alone, but which team owns action trust, which team owns the secret, and which team owns the downstream access it enabled.
👉 Read our full editorial: Shai-Hulud exposes how GitHub account compromise becomes NHI risk