# Nx: Nx (s1ngularity): a PR title injection stole an npm token and weaponized local AI CLIs

> **Safety notice:** Read-only local inspection and GitHub repo listing.

- **Incident date:** Aug 26, 2025
- **Disclosed:** Sep 5, 2025
- **Source disclosure:** https://nx.dev/blog/s1ngularity-postmortem

## Reproduction lab
Check GitHub repository default Actions permissions (read-only vs. legacy read/write) and scan developer machines for s1ngularity artifacts.

```bash
bash check-s1ngularity-iocs.sh
```

## Policies and detection rules

### `check-s1ngularity-iocs.sh`
Inspect a developer workstation for s1ngularity shell sabotage and temporary inventory files.

```sh
#!/usr/bin/env bash
set -euo pipefail
grep -n "sudo shutdown -h 0" ~/.bashrc ~/.zshrc 2>/dev/null || echo "Shell profiles clean"
ls -la /tmp/inventory.txt /tmp/inventory.txt.bak 2>/dev/null || echo "No /tmp/inventory.txt artifact"
gh repo list --limit 100 --json name --jq '.[].name | select(startswith("s1ngularity-repository"))' 2>/dev/null || true
```

## Indicators of compromise
- **Repository:** `s1ngularity-repository* (results.b64)` (undefined)
- **File:** `/tmp/inventory.txt` (undefined)
- **Command:** `sudo shutdown -h 0 in ~/.bashrc or ~/.zshrc` (undefined)
