@bluefire-redteam/nx-s1ngularity-check
v1.0.8
Published
Bluefire Redteam scanner for Nx 's1ngularity' supply-chain compromise (malicious versions, IoCs, exfil).
Maintainers
Readme
🔍 Bluefire Redteam's Nx "s1ngularity" Supply Chain Scanner(New Update)
Free, open-source scanner from Bluefire Redteam
Detect if your systems or projects were impacted by the August 2025 Nx s1ngularity supply-chain compromise.
🚨 What Happened?
On Aug 26–27, 2025, multiple malicious versions of the Nx build system packages were published to npm.
They contained a postinstall malware (telemetry.js) that:
- Stole GitHub tokens, npm tokens, SSH keys,
.envsecrets, crypto wallets - Abused local AI CLI tools (Claude, Gemini, Q) to aid reconnaissance
- Exfiltrated stolen data into public GitHub repos named:
s1ngularity-repositorys1ngularity-repository-0s1ngularity-repository-1s1ngularity-repository-<5letters>(Phase 2)*_bakwith description"S1ngularity"(Phase 3)
- Modified
~/.bashrc&~/.zshrcto cause forced shutdowns
👉 Thousands of secrets and repos were exposed across multiple phases of this attack.
✅ What This Tool Does
@bluefire-redteam/nx-s1ngularity-check scans your environment for all known indicators of compromise (IoCs):
- Malicious versions of Nx / @nx packages in:
package-lock.json,yarn.lock,pnpm-lock.yamlnpm lsoutput
- Host IoCs:
sudo shutdown -h 0in~/.bashrc/~/.zshrc/tmp/inventory.txtor/tmp/inventory.txt.bak
- Node_modules payload check:
- Detects
telemetry.jswith malicious markers across all known prompt variants (Phase 1–3)
- Detects
- Exfil files:
- Finds
results.b64(locally or/tmp) - Auto-decodes up to 3x Base64 → previews decoded JSON
- Finds
- GitHub repos (expanded detection):
- Flags attacker-created repos in your account/org:
s1ngularity-repository,-0,-1s1ngularity-repository-<5letters>- Any repo suffixed with
_bakor with description"S1ngularity"
- Requires
GH_TOKENorGITHUB_TOKENfor API access
- Flags attacker-created repos in your account/org:
- GitHub search mode (NEW in v1.0.7):
- Use
--search <query>to check all public repos on GitHub for IoCs
- Use
🚀 Quick Start
Run directly with npx (no install needed):
npx @bluefire-redteam/nx-s1ngularity-check⚠️ Use the scoped name
@bluefire-redteam/nx-s1ngularity-check.
Do not use any unscoped package — that is not us!
🔍 Usage Examples
Scan current project
npx @bluefire-redteam/nx-s1ngularity-checkScan a GitHub user’s repos
GH_TOKEN=ghp_xxx npx @bluefire-redteam/nx-s1ngularity-check --user someuserScan a GitHub organization
GH_TOKEN=ghp_xxx npx @bluefire-redteam/nx-s1ngularity-check --org myorgSearch all public GitHub repos (NEW in v1.0.7)
GH_TOKEN=ghp_xxx npx @bluefire-redteam/nx-s1ngularity-check --search s1ngularity-repository🖥️ Example Output
=== Bluefire Nx s1ngularity Comprehensive Scanner ===
❌ Suspicious GitHub repos detected
--- JSON ---
{
"summary": {
"affectedFound": false,
"iocFound": false,
"nodeModulesFound": false,
"resultsB64Found": false,
"ghFound": true,
"severity": "high"
}
}🛡️ What To Do If Compromised
- Remove malicious Nx versions:
rm -rf node_modules npm cache clean --force npm install nx@latest - Clean persistence:
- Remove
sudo shutdown -h 0lines from~/.bashrc/~/.zshrc - Delete
/tmp/inventory.txt*
- Remove
- Check GitHub repos:
- Delete suspicious repos flagged by the scanner
- Rotate ALL credentials:
- GitHub tokens, npm tokens, SSH keys, API keys, environment secrets
- Move cryptocurrency funds to new wallets immediately
- Audit CI/CD pipelines & logs for suspicious activity
🏢 About Bluefire Redteam
Bluefire Redteam is a global leader in offensive security, AI red teaming, and supply chain defense.
We built this tool to help the community detect, contain, and respond to the Nx compromise.
👉 Need help with incident response or supply chain hardening?
Contact us: bluefire-redteam.com
📦 Version Updates
- v1.0.7 (latest) — Added Phase 2/3 repo detection, expanded
telemetry.jsIoCs, new--searchflag - v1.0.6 — Added
--organd--userscanning, initial GitHub integration - v1.0.5 and earlier — Initial release with local project + host scanning
📜 License
MIT – free to use and share. Please credit Bluefire Redteam when referencing.
