Agent Failure Modes

Malware drives your installed agent CLI to hunt for secrets

Malicious Nx releases ran Claude Code, Gemini CLI and Amazon Q with permission-bypass flags to inventory secrets and .env files.

Agents
Claude Code, Gemini CLI, Amazon Q
Reported
Source checked
Tags
npm, postinstall, secrets, yolo-mode

Symptom

A public repo named s1ngularity-repository appears on your GitHub account, or /tmp/inventory.txt exists after an npm install.

Cause

A compromised package's postinstall script called local agent CLIs with flags that skip all approvals (--dangerously-skip-permissions, --yolo, --trust-all-tools) and a prompt to find wallets, SSH keys and .env files.

Fix

Disable install scripts by default and allow them per package. Don't leave long-lived tokens on dev machines. If affected, remove the package and rotate every credential on the machine.

# Don't run postinstall scripts by default
npm config set ignore-scripts true
# Check for signs of compromise
ls /tmp/inventory.txt* 2>/dev/null
gh repo list --limit 200 | grep s1ngularity-repository

Sources

More in Supply chain

Get one failure mode a week

A short weekly email: one real incident, what caused it and the fix. No spam, unsubscribe any time.