agentleFS
omar16100omar16100/skills/npm-supply-chain-audit/SKILL.md

npm-supply-chain-audit

Skill0 starsChanged 10 months agoMITView on GitHub

Audit npm projects for malicious packages, supply chain attacks, typosquatting, and IOCs. Use when user wants to check for compromised dependencies, suspicious packages, or verify project security.

1 other project uses a version of this.

Adopted by

Most recently taken up by

  • Other versions1 project uses a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 1

    1. NitorCreations/nitor-agent-skills★ 2same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository2 other files it gives its agents.

The file

Show its rules and text

We split this skill into the rules it gives an agent

29 rules. About 0 are common, 19 are distinctive, and 10 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈19

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 10

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    If $ARGUMENTS contains a package name or version (e.g., axios@1.14.1, plain-crypto-js): research that specific package/version for known …

    line 13
  2. Very specific:

    If $ARGUMENTS contains a project path: audit that project's dependencies

    line 14
  3. Very specific:

    If $ARGUMENTS is empty: audit the current working directory

    line 15
  4. Distinctive:

    Use web search to investigate:

    line 19
  5. Distinctive:

    Security advisories: Search Snyk, Socket.dev, GitHub Advisories, npm advisories for CVEs or reports

    line 22
  6. Distinctive:

    Attack timeline: If malicious, determine exposure window and attack vector

    line 25
  7. Distinctive:

    Search the target project (the current working directory if no path given) for:

    line 31
  8. Very specific:

    Search all package.json files for the target package in dependencies, devDependencies, optionalDependencies, peerDependencies

    line 34
  9. Very specific:

    Search all package-lock.json, yarn.lock, pnpm-lock.yaml for resolved versions

    line 35
  10. Very specific:

    Search node_modules/ directories for installed copies

    line 36
  11. Distinctive:

    Always check for these confirmed malicious packages in addition to any user-specified targets:

    line 39
  12. Distinctive:

    Search for import/require statements referencing suspicious packages

    line 58
  13. Distinctive:

    Search for C2 domains in any project files

    line 59
  14. Distinctive:

    Search for obfuscated code patterns (reversed Base64, XOR cipher references)

    line 60
  15. Distinctive:

    Check for known RAT artifacts on the local machine:

    line 64
  16. Distinctive:

    Check for suspicious LaunchAgents/LaunchDaemons

    line 68
  17. Distinctive:

    Search project files for known C2 domains:

    line 79
  18. Distinctive:

    If a project path is identified:

    line 85
  19. Very specific:

    Run npm audit (or pnpm audit / yarn audit) if available

    line 87
  20. Very specific:

    Check for packages with postinstall scripts: grep -r '"postinstall"' node_modules/*/package.json

    line 88
  21. Very specific:

    Remove malicious packages from node_modules/ and lock files

    line 103
  22. Distinctive:

    Check for filesystem artifacts

    line 105
  23. Distinctive:

    If RAT artifacts found: isolate machine, rebuild from clean image

    line 107
  24. Very specific:

    Use npm ci --ignore-scripts in CI/CD

    line 111
  25. Distinctive:

    Commit lockfiles to version control

    line 112
  26. Distinctive:

    Use Socket.dev, Snyk, or similar for real-time monitoring

    line 113
  27. Distinctive:

    Use parallel Explore agents for web research and local scanning simultaneously

    line 118
  28. Distinctive:

    Use Grep for local file searches (not bash grep)

    line 119
  29. Distinctive:

    Always report the exposure window for time-bound attacks

    line 121

≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

npm Supply Chain Security Audit

Perform a thorough security audit of npm dependencies, checking for malicious packages, compromised versions, typosquatting, and indicators of compromise (IOCs).

Input Handling

  • If $ARGUMENTS contains a package name or version (e.g., axios@1.14.1, plain-crypto-js): research that specific package/version for known attacks
  • If $ARGUMENTS contains a project path: audit that project's dependencies
  • If $ARGUMENTS is empty: audit the current working directory

Phase 1: Package Research (if specific package/version given)

Use web search to investigate:

  1. Registry check: Does this exact version exist on npm? Was it published and yanked?
  2. Security advisories: Search Snyk, Socket.dev, GitHub Advisories, npm advisories for CVEs or reports
  3. Typosquatting analysis: Is the package name suspiciously similar to a legitimate package?
  4. Publisher analysis: Who published it? Is the publisher account suspicious (new, ProtonMail, no other packages)?
  5. Attack timeline: If malicious, determine exposure window and attack vector

Report findings in a structured table format.

Phase 2: Local Dependency Scan

Search the target project (the current working directory if no path given) for:

2a. Lock File & Manifest Search

  • Search all package.json files for the target package in dependencies, devDependencies, optionalDependencies, peerDependencies
  • Search all package-lock.json, yarn.lock, pnpm-lock.yaml for resolved versions
  • Search node_modules/ directories for installed copies

2b. Known Malicious Package Database

Always check for these confirmed malicious packages in addition to any user-specified targets:

Axios Supply Chain Attack (March 31, 2026) (sources for every item are in known-threats.md):

  • axios@1.14.1: compromised via hijacked maintainer account
  • axios@0.30.4: compromised via hijacked maintainer account
  • plain-crypto-js@4.2.0: clean decoy version, still suspicious
  • plain-crypto-js@4.2.1: dropper for the WAVESHAPER.V2 RAT
  • @shadanai/openclaw@2026.3.28-2: related malicious package
  • @shadanai/openclaw@2026.3.28-3: related malicious package
  • @shadanai/openclaw@2026.3.31-1: related malicious package
  • @shadanai/openclaw@2026.3.31-2: related malicious package
  • @qqbrowser/openclaw-qbot@0.0.130: related malicious package

Common typosquatting targets:

  • Variations of crypto-js (e.g., plain-crypto-js, crypto-jss, crypt-js)
  • Variations of axios with unusual version numbers
  • Any package with a postinstall script that downloads or executes remote code

2c. Source Code Search

  • Search for import/require statements referencing suspicious packages
  • Search for C2 domains in any project files
  • Search for obfuscated code patterns (reversed Base64, XOR cipher references)

Phase 3: Filesystem IOC Check

Check for known RAT artifacts on the local machine:

macOS

  • /Library/Caches/com.apple.act.mond: WAVESHAPER.V2 macOS payload
  • Check for suspicious LaunchAgents/LaunchDaemons

Linux

  • /tmp/ld.py: WAVESHAPER.V2 Python RAT

Windows

  • %PROGRAMDATA%\wt.exe: copy of PowerShell named like Windows Terminal
  • %TEMP%\6202033.vbs: VBScript dropper
  • %TEMP%\6202033.ps1: PowerShell payload

Network IOCs

Search project files for known C2 domains:

  • sfrclak[.]com (defang when reporting, search for sfrclak)
  • IP 142.11.206.73

Phase 4: Vulnerability Scan

If a project path is identified:

  1. Run npm audit (or pnpm audit / yarn audit) if available
  2. Check for packages with postinstall scripts: grep -r '"postinstall"' node_modules/*/package.json
  3. Flag any postinstall scripts that use curl, wget, fetch, osascript, powershell, or python

Output Format

Summary Table

CheckStatusDetails
Malicious packages in depsCLEAN/FOUNDlist if found
Filesystem IOCsCLEAN/FOUNDlist if found
C2 domains in filesCLEAN/FOUNDlist if found
Suspicious postinstall scriptsCLEAN/FOUNDlist if found
npm audit vulnerabilitiesX critical, Y highcounts

If Compromised: Remediation Steps

  1. Remove malicious packages from node_modules/ and lock files
  2. Downgrade to last known safe version
  3. Check for filesystem artifacts
  4. Rotate ALL credentials on affected systems (npm tokens, cloud keys, SSH keys, CI/CD secrets)
  5. If RAT artifacts found: isolate machine, rebuild from clean image

Preventive Recommendations

  • Pin exact versions (no ^ or ~ for critical deps)
  • Use npm ci --ignore-scripts in CI/CD
  • Commit lockfiles to version control
  • Use Socket.dev, Snyk, or similar for real-time monitoring
  • Enable npm 2FA on all publisher accounts

Execution Guidelines

  • Use parallel Explore agents for web research and local scanning simultaneously
  • Use Grep for local file searches (not bash grep)
  • Defang malicious URLs/domains in output (e.g., sfrclak[.]com)
  • Always report the exposure window for time-bound attacks
  • Include attribution if known (threat actor group, nation-state)
  • Link to sources (Snyk advisories, Socket.dev reports, GitHub issues)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.