Ruff CI Checks Block Shai-Hulud Credential-Stealer Injection in GPT-Pilot Repository

· Original article ↗

Summary

StepSecurity reports that ruff CI checks blocked two force-push attempts adding a Shai-Hulud credential stealer to Pythagora’s gpt-pilot repository on June 8, 2026. The payload targeted developer credentials and used GitHub-based C2 and persistence hooks.

Key points

  • StepSecurity reports that two force-push attempts from a compromised maintainer account added malicious files to the repository; all six CI jobs failed on both attempts.
  • The ruff formatter and linter caught formatting and import-order violations in the injected code.
  • The payload was a 758KB obfuscated JavaScript credential stealer launched through a Python loader and Bun runtime.
  • It targeted AWS, npm, GitHub, Kubernetes, Vault, and SSH credentials, and used GitHub commit searches for command-and-control.
  • The malware could exfiltrate credentials through newly created GitHub repositories and plant persistence hooks for Claude Code and VS Code sessions.
  • StepSecurity links the payload to Shai-Hulud and TeamPCP/UNC6780, while noting that the public release of related source code makes attribution uncertain.
  • The article advises potentially affected users to rotate credentials, audit cloud and package-publishing activity, and check for malware files and persistence hooks.

Article Details

Attack Vectors
  • The attacker used a compromised maintainer GitHub account to force-push a backdated, malicious commit to the repository’s unprotected main branch.
  • The injected Python loader ran a JavaScript credential stealer through the Bun runtime when the package’s telemetry module was imported.
  • The malware searched GitHub commit messages for a marker string to receive commands, and used GitHub repositories to exfiltrate stolen credentials.
  • The malware also used DNS-resolved HTTP endpoints for encrypted data exfiltration and added hooks to Claude Code and VS Code for persistence.
  • The article attributes the activity to the Shai-Hulud campaign associated with TeamPCP/UNC6780, but notes that public release of source code makes copycat activity possible.
Defensive Notes
  • Enable branch protection, require pull-request reviews and passing status checks, restrict force pushes to the default branch, and require signed commits.
  • Monitor force pushes to default branches and use CI linting and formatting checks; ruff’s checks blocked both attempted malicious pushes in this incident.
  • If the repository was pulled during the stated exposure window, inspect for the injected files, downloaded Bun runtime, loader lock file, and Claude Code or VS Code persistence hooks.
  • Rotate potentially exposed AWS keys, npm tokens, GitHub tokens, SSH keys, and other secrets; audit cloud access, npm publishing, and GitHub repositories for unauthorized activity.

Indicators of compromise

TypeIndicatorContext
EMAILclaude@users[.]noreply[.]github[.]comCommit author identity the malware impersonates when creating GitHub repositories to exfiltrate stolen credentials.
SHA1065ee8ebee7385cb644fd1608587a18edb91f4fbGit commit ID for the malicious backdated “Revert” commit that added the loader and payload.
SHA25651b4dd39a15af1e28e97adc375849d688423ec3d88e8010644395fcdea52a3ccSHA-256 hash of the malicious _hooks.py loader that downloads and executes the payload.
SHA256c96f37e1b9cdc9683a300909492ed9f770b620d0037e5b80e23753cba7ca4077SHA-256 hash of the malicious _runtime.bin JavaScript credential-stealer payload.
URLhxxps[:]//api[.]github[.]com/search/commits?q=thebeautifulsnadsoftimeSpecific GitHub commit-search URL used by the malware to poll for its command-and-control marker.

MITRE ATT&CK

People

Threat Actors

Malware

Products

AWSrepository was not a simple backdoor. It is a 758KB obfuscated JavaScript credential stealer that targets AWS keys, npm tokens, GitHub secrets, Kubernetes service accounts, HashiCorp Vault tokens, and SSH keys. ItBunDownloads Bun v1.3.13 runtime and executes the JavaScript payload.Claude Codepackages with valid SLSA Build Level 3 attestations via Sigstore. It even plants persistence hooks in Claude Code and VS Code so that future coding sessions re-execute the malware.GitHubOn June 8, 2026, an attacker compromised a co-founder's GitHub account for Pythagora-io/gpt-pilot, a popular open-source AI developer tool with 33,700+ GitHub stars and 3,500+ forks, and force-pushed agpt-pilotOn June 8, 2026, an attacker compromised a co-founder's GitHub account for Pythagora-io/gpt-pilot, a popular open-source AI developer tool with 33,700+ GitHub stars and 3,500+ forks, and force-pushed aHashiCorp Vaultcredential stealer that targets AWS keys, npm tokens, GitHub secrets, Kubernetes service accounts, HashiCorp Vault tokens, and SSH keys. It uses GitHub commit messages as a covert command-and-control channel,Kubernetesis a 758KB obfuscated JavaScript credential stealer that targets AWS keys, npm tokens, GitHub secrets, Kubernetes service accounts, HashiCorp Vault tokens, and SSH keys. It uses GitHub commit messages as a covertnpmwas not a simple backdoor. It is a 758KB obfuscated JavaScript credential stealer that targets AWS keys, npm tokens, GitHub secrets, Kubernetes service accounts, HashiCorp Vault tokens, and SSH keys. It uses GitHubSigstoreas files, and can sign and publish malicious npm packages with valid SLSA Build Level 3 attestations via Sigstore. It even plants persistence hooks in Claude Code and VS Code so that future coding sessions re-executeVS Codevalid SLSA Build Level 3 attestations via Sigstore. It even plants persistence hooks in Claude Code and VS Code so that future coding sessions re-execute the malware.

Tools

Related Articles