Supply Chain Guard
Automated detection and remediation of software supply chain attacks across npm, PyPI, crates.io, GitHub Actions, and CI/CD pipelines. Built from real-world attack intelligence gathered through March 31, 2026.
When to Use This Skill
Use this skill when:
- The user asks to audit a project's dependencies for security issues
- Before deploying code to production
- When investigating a potential supply chain compromise
- When the user mentions a recent supply chain attack and wants to check their projects
- As a regular security check in development workflows
- When setting up CI/CD pipelines and wanting to harden them
- When a new supply chain attack is reported and the user wants to verify exposure
Instructions
Step 1: Understand the Project
Identify what the user's project uses:
- Node.js/npm: Look for
package.json, package-lock.json, yarn.lock, pnpm-lock.yaml
- Python/PyPI: Look for
requirements.txt, Pipfile, pyproject.toml, poetry.lock
- Rust/crates.io: Look for
Cargo.toml, Cargo.lock
- CI/CD: Look for
.github/workflows/, Dockerfile, docker-compose.yml
Step 2: Run the Appropriate Scanners
The skill includes three specialized scanners plus a unified runner. All scripts are in the scripts/ directory.
Full audit (recommended):
bash /path/to/supply-chain-guard/scripts/scan-all.sh /path/to/project
Individual scanners:
# npm/Node.js projects
bash /path/to/supply-chain-guard/scripts/scan-npm.sh /path/to/project
# Python/PyPI projects
bash /path/to/supply-chain-guard/scripts/scan-python.sh /path/to/project
# CI/CD pipeline audit
bash /path/to/supply-chain-guard/scripts/scan-ci.sh /path/to/project
Each scanner checks for:
- Known compromised packages — exact matches against the IOC database
- Malicious versions — specific version numbers known to contain malware
- Filesystem IOCs — persistence mechanisms left by attackers
- Network IOCs — C2 domains and IPs in source code
- CI/CD misconfigurations — unpinned actions, dangerous triggers, exposed secrets
- Credential exposure — npm tokens, PyPI credentials, .env files
Step 3: Interpret Results
Scanners exit with the number of issues found (0 = clean). Issues are categorized:
- [CRITICAL] — Known malicious package or active IOC detected. Immediate action required.
- [WARNING] — Security concern that needs investigation. May not be an active compromise.
Step 4: Remediate
Based on findings, guide the user through remediation:
If a compromised package is found:
- Remove or downgrade to a known safe version immediately
- Clear package caches:
npm cache clean --force / pip cache purge
- Delete
node_modules / .venv and reinstall from lockfile
- Rotate ALL credentials that were accessible from the environment
If filesystem IOCs are found:
- The system should be treated as fully compromised
- Identify and remove persistence mechanisms (systemd services, .pth files, cron jobs)
- Rotate every credential on the system
- Audit cloud provider logs (AWS CloudTrail, GCP Audit Logs, Azure Activity Log)
- Check for lateral movement in Kubernetes clusters
- Consider reimaging the machine
If CI/CD issues are found:
- Pin all GitHub Actions to full commit SHAs (not version tags)
- Add
--ignore-scripts to npm install/ci commands
- Add
--require-hashes to pip install commands
- Remove or secure
pull_request_target triggers
- Apply least-privilege permissions to workflow tokens
- Audit pipeline execution logs for the attack window periods
Step 5: Harden the Project
After remediation, recommend these preventive measures:
- Lock everything: Exact version pins + lockfiles committed to repo
- Hash-verify: Use
npm ci (not npm install), pip install --require-hashes
- Disable scripts: Use
--ignore-scripts by default, enable only for trusted packages
- Pin actions: All GitHub Actions pinned to full SHA, never tags
- Scope tokens: CI/CD tokens should have minimal permissions
- Monitor: Set up automated dependency scanning (but verify the scanner itself is not compromised — see Trivy incident)
- Network controls: Block known C2 domains/IPs at firewall level
- Audit regularly: Run this scanner before every deployment
Reference Files
references/ioc-database.md — Full IOC database with all compromised packages, malicious versions, C2 infrastructure, filesystem indicators, and attack timelines. Read this file for detailed intelligence on specific attacks.
Current Threat Landscape (as of 2026-03-31)
Active Campaign: TeamPCP (CRITICAL)
The most significant active threat. TeamPCP is executing a cascading credential-chain campaign:
- Compromised Trivy (security scanner) → stole CI/CD secrets from thousands of pipelines
- Used stolen npm tokens to deploy CanisterWorm across 141+ npm packages
- Used stolen PyPI tokens to backdoor LiteLLM (95M monthly downloads) and Telnyx
- Uses blockchain (ICP) for C2, making takedown impossible
- Deploys WAV steganography for payload delivery
- Targets Kubernetes for lateral movement
- Has a destructive variant that wipes Iranian systems
Active: axios npm Hijack (2026-03-31)
- axios@1.14.1 and axios@0.30.4 contain RAT dropper via fake
plain-crypto-js dependency
- 300M+ weekly downloads makes this extremely high-impact
- Cross-platform RAT for macOS, Windows, and Linux
- Compromised maintainer account (jasonsaayman)
Recent: Malicious Rust Crates (2026-02/03)
- 5 crates impersonating time utilities on crates.io
- Steal .env files, AWS credentials, SSH keys
- First significant supply chain attack targeting Rust ecosystem
Historical but Relevant: Shai-Hulud Worm
- Self-replicating npm worm that compromised ~1000 packages
- Targets npm tokens for self-propagation
- Destructive fallback: wipes home directory if exfiltration fails
Updating the IOC Database
When new supply chain attacks are reported:
- Search for the latest advisories from Socket, Aikido, Endor Labs, Snyk, JFrog
- Update
references/ioc-database.md with new packages, versions, domains, IPs
- Update the scanner scripts with new package entries in the MALICIOUS_* arrays
- Update the
ioc-db-date in the SKILL.md frontmatter
1---2name: supply-chain-guard3description: Detect and remediate software supply chain attacks in npm, PyPI, crates.io, GitHub Actions, and CI/CD pipelines by scanning for known compromised packages, malicious versions, filesystem IOCs, C2 indicators, and CI/CD misconfigurations.4---5
6# Supply Chain Guard
7
8Automated detection and remediation of software supply chain attacks across npm, PyPI, crates.io, GitHub Actions, and CI/CD pipelines. Built from real-world attack intelligence gathered through March 31, 2026.
9
10## When to Use This Skill
11
12Use this skill when:
13
14- The user asks to audit a project's dependencies for security issues
15- Before deploying code to production
16- When investigating a potential supply chain compromise
17- When the user mentions a recent supply chain attack and wants to check their projects
18- As a regular security check in development workflows
19- When setting up CI/CD pipelines and wanting to harden them
20- When a new supply chain attack is reported and the user wants to verify exposure
21
22## Instructions
23
24### Step 1: Understand the Project
25
26Identify what the user's project uses:
27- **Node.js/npm**: Look for `package.json`, `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`
28- **Python/PyPI**: Look for `requirements.txt`, `Pipfile`, `pyproject.toml`, `poetry.lock`
29- **Rust/crates.io**: Look for `Cargo.toml`, `Cargo.lock`
30- **CI/CD**: Look for `.github/workflows/`, `Dockerfile`, `docker-compose.yml`
31
32### Step 2: Run the Appropriate Scanners
33
34The skill includes three specialized scanners plus a unified runner. All scripts are in the `scripts/` directory.
35
36**Full audit (recommended):**
37```bash
38bash /path/to/supply-chain-guard/scripts/scan-all.sh /path/to/project
39```
40
41**Individual scanners:**
42```bash
43# npm/Node.js projects
44bash /path/to/supply-chain-guard/scripts/scan-npm.sh /path/to/project
45
46# Python/PyPI projects
47bash /path/to/supply-chain-guard/scripts/scan-python.sh /path/to/project
48
49# CI/CD pipeline audit
50bash /path/to/supply-chain-guard/scripts/scan-ci.sh /path/to/project
51```
52
53Each scanner checks for:
541. **Known compromised packages** — exact matches against the IOC database
552. **Malicious versions** — specific version numbers known to contain malware
563. **Filesystem IOCs** — persistence mechanisms left by attackers
574. **Network IOCs** — C2 domains and IPs in source code
585. **CI/CD misconfigurations** — unpinned actions, dangerous triggers, exposed secrets
596. **Credential exposure** — npm tokens, PyPI credentials, .env files
60
61### Step 3: Interpret Results
62
63Scanners exit with the number of issues found (0 = clean). Issues are categorized:
64
65- **[CRITICAL]** — Known malicious package or active IOC detected. Immediate action required.
66- **[WARNING]** — Security concern that needs investigation. May not be an active compromise.
67
68### Step 4: Remediate
69
70Based on findings, guide the user through remediation:
71
72#### If a compromised package is found:
731. Remove or downgrade to a known safe version immediately
742. Clear package caches: `npm cache clean --force` / `pip cache purge`
753. Delete `node_modules` / `.venv` and reinstall from lockfile
764. Rotate ALL credentials that were accessible from the environment
77
78#### If filesystem IOCs are found:
791. The system should be treated as **fully compromised**
802. Identify and remove persistence mechanisms (systemd services, .pth files, cron jobs)
813. Rotate every credential on the system
824. Audit cloud provider logs (AWS CloudTrail, GCP Audit Logs, Azure Activity Log)
835. Check for lateral movement in Kubernetes clusters
846. Consider reimaging the machine
85
86#### If CI/CD issues are found:
871. Pin all GitHub Actions to full commit SHAs (not version tags)
882. Add `--ignore-scripts` to npm install/ci commands
893. Add `--require-hashes` to pip install commands
904. Remove or secure `pull_request_target` triggers
915. Apply least-privilege permissions to workflow tokens
926. Audit pipeline execution logs for the attack window periods
93
94### Step 5: Harden the Project
95
96After remediation, recommend these preventive measures:
97
981. **Lock everything**: Exact version pins + lockfiles committed to repo
992. **Hash-verify**: Use `npm ci` (not `npm install`), `pip install --require-hashes`
1003. **Disable scripts**: Use `--ignore-scripts` by default, enable only for trusted packages
1014. **Pin actions**: All GitHub Actions pinned to full SHA, never tags
1025. **Scope tokens**: CI/CD tokens should have minimal permissions
1036. **Monitor**: Set up automated dependency scanning (but verify the scanner itself is not compromised — see Trivy incident)
1047. **Network controls**: Block known C2 domains/IPs at firewall level
1058. **Audit regularly**: Run this scanner before every deployment
106
107## Reference Files
108
109- `references/ioc-database.md` — Full IOC database with all compromised packages, malicious versions, C2 infrastructure, filesystem indicators, and attack timelines. Read this file for detailed intelligence on specific attacks.
110
111## Current Threat Landscape (as of 2026-03-31)
112
113### Active Campaign: TeamPCP (CRITICAL)
114
115The most significant active threat. TeamPCP is executing a cascading credential-chain campaign:
116- Compromised Trivy (security scanner) → stole CI/CD secrets from thousands of pipelines
117- Used stolen npm tokens to deploy CanisterWorm across 141+ npm packages
118- Used stolen PyPI tokens to backdoor LiteLLM (95M monthly downloads) and Telnyx
119- Uses blockchain (ICP) for C2, making takedown impossible
120- Deploys WAV steganography for payload delivery
121- Targets Kubernetes for lateral movement
122- Has a destructive variant that wipes Iranian systems
123
124### Active: axios npm Hijack (2026-03-31)
125
126- axios@1.14.1 and axios@0.30.4 contain RAT dropper via fake `plain-crypto-js` dependency
127- 300M+ weekly downloads makes this extremely high-impact
128- Cross-platform RAT for macOS, Windows, and Linux
129- Compromised maintainer account (jasonsaayman)
130
131### Recent: Malicious Rust Crates (2026-02/03)
132
133- 5 crates impersonating time utilities on crates.io
134- Steal .env files, AWS credentials, SSH keys
135- First significant supply chain attack targeting Rust ecosystem
136
137### Historical but Relevant: Shai-Hulud Worm
138
139- Self-replicating npm worm that compromised ~1000 packages
140- Targets npm tokens for self-propagation
141- Destructive fallback: wipes home directory if exfiltration fails
142
143## Updating the IOC Database
144
145When new supply chain attacks are reported:
146
1471. Search for the latest advisories from Socket, Aikido, Endor Labs, Snyk, JFrog
1482. Update `references/ioc-database.md` with new packages, versions, domains, IPs
1493. Update the scanner scripts with new package entries in the MALICIOUS_* arrays
1504. Update the `ioc-db-date` in the SKILL.md frontmatter