# npm & PyPI Worm Check: Find Hijacked Packages in a Minute

> Was your project hit by the latest npm or PyPI worm? Your agent checks every installed version, shows the evidence and tells you exactly which keys to rotate.

npm & PyPI Worm Check: Find Hijacked Packages in a Minute is a subscription AI agent skill on Agensi by ELVOR STUDIO, in Security. It loads into your AI agent through the Agensi MCP server, always in its latest approved version.

- Price: $9/mo (subscription, cancel anytime)
- Creator: [ELVOR STUDIO](https://www.agensi.io/creators/elvor-studio)
- Category: [Security](https://www.agensi.io/skills/security)
- Version: 1.0
- Last updated: 2026-12-04
- Security: scan passed (2026-12-04); every new listing is also reviewed by a person
- Listing: https://www.agensi.io/skills/npm-pypi-worm-check-find-hijacked-packages-in-a-minute
- Tags: security, code-review, devops, npm, python, supply-chain, malware

## What it does

- Checks every package version in your lockfiles against the OpenSSF malicious-packages data
- Finds worm traces: credential-stealing install scripts and CI workflows that leak secrets
- Gives a plain verdict: compromised, exposed, suspicious or clean
- Builds a rotation checklist from your project, npm and GitHub tokens first
- Cleans up and hardens installs with your go-ahead, then re-scans to prove it is fixed
- Adds an optional CI gate that runs on every pull request and daily

## Who it's for

- **JavaScript teams after a new worm wave:** Know in a minute whether you are affected, instead of reading advisories all afternoon. Try: "The chalk and debug packages were hijacked. Are we affected?"
- **Agencies and freelancers with many client repos:** Scan each client repo and get one clear verdict per project. Try: "Scan every project in ~/clients for hijacked npm packages."
- **Python teams on pip, Poetry or uv:** The same check for PyPI lockfiles and virtual environments. Try: "Check this repo for the litellm compromise."

## About this skill

Every few weeks a worm hijacks packages that millions of projects depend on: chalk and debug, Shai-Hulud, keyv and cacheable, litellm on PyPI. Each wave raises the same two questions: are we affected, and which keys do we rotate? Answering by hand means reading advisories and searching lockfiles, and it still does not tell you what was exposed.

This skill answers both in about a minute, with evidence, and hands you the rotation list.

### How it works
- **Check:** every package version in your lockfiles and installed folders is checked against the OpenSSF malicious-packages data (OSV.dev, free, no key). An installed bad version means its install script has probably run.
- **Look for traces:** install scripts that harvest credentials, CI workflows that dump or post secrets, self-hosted runner tricks, workflows added in the last 45 days.
- **Verdict and rotation list:** compromised, exposed, suspicious or clean, with a checklist built from your project. It lists secret names, never values.
- **Clean up and harden** with your go-ahead: remove the bad versions, `npm ci`, install scripts off, release-age cooldowns.
- **Re-scan** to show what is fixed, new and still open. Optional CI gate on every pull request and daily.

**New wave not listed yet?** Give your agent the advisory's exact versions and it scans for them, offline if needed.

### Proof
On a demo project with the hijacked chalk, debug and ansi-styles versions, the first scan returned EXPOSED with 3 critical findings. After cleanup the re-scan returned CLEAN: 5 fixed, 0 new, 0 still open.

### Who it is for
- JavaScript and Python teams the day a new wave hits
- Agencies and freelancers who look after many client repos
- Anyone who wants a CI check that blocks the next hijacked version before it installs

### How it is built
npm, Yarn (v1 and Berry), pnpm, Bun, pip, Poetry, uv, PDM and Pipenv. Only public package names and versions are sent to OSV.dev. Zero dependencies, Node 18+, MIT licence, tested on Windows and Linux.

## Requires

- Node.js 18+

Only public package names and versions are sent to OSV.dev. Private and workspace packages are never sent, and secret values are never read.

## Known limitations

It finds versions listed in the OpenSSF malicious-packages data or that you add as indicators, so a brand-new attack needs the advisory's exact versions. A clean result cannot prove nothing was stolen before you scanned. Rotating the secrets stays your job; the checklist tells you which ones.

## Technical details

Node 18+ ESM script (scripts/scguard.mjs) with no dependencies. Queries OSV.dev /v1/querybatch in chunks of 500; MAL- ids are malware, GHSA ids are ordinary vulnerabilities (listed with --vulns). Writes .scguard/report.md and report.json (with its own .gitignore), compares with the previous scan, supports .scguard-ignore.json (fingerprints with reasons) and .scguard-iocs.json (your own indicators, works offline with --offline). Options: --fail-on, --private-scope, --baseline, --quiet. Exit codes 0 pass, 1 fail, 2 usage. install-ci copies the scanner to tools/scguard and adds .github/workflows/supply-chain-check.yml (pull requests, pushes and a daily cron; prints only the verdict on public repos). Tests run against throwaway projects and a fake OSV server.

## How to use this skill

1. Connect your AI agent to Agensi once: add the MCP server https://mcp.agensi.io/mcp/auth and sign in with your Agensi account (OAuth, no API key). Steps for Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and other agents: https://www.agensi.io/docs/mcp-setup
2. Ask your agent: "Use the npm & PyPI Worm Check: Find Hijacked Packages in a Minute skill from Agensi" and describe your task.
3. Subscribe on the listing or let your agent ask you first; your agent then loads it from Agensi when it needs it. Every paid skill has a money-back guarantee: https://www.agensi.io/docs/money-back-guarantee

## Frequently asked questions

### Isn't this what npm audit already does?

npm audit reports advisories for npm packages. This checks npm and PyPI lockfiles and installed folders against the OpenSSF malicious-packages data, looks for the traces a worm leaves in install scripts and CI workflows, and tells you exactly which credentials to rotate, then re-scans to prove the clean-up worked.

### What kind of report will I get after a scan?

The skill produces a verdict report in your project folder that labels your status as COMPROMISED, EXPOSED, SUSPICIOUS, or CLEAN. It also provides a specific list of credentials you should rotate, such as GitHub tokens or cloud keys, and highlights exactly which files or code lines look dangerous.

### What specific types of code or software can this skill check?

The scanner works with npm and PyPI ecosystems, specifically looking at package lockfiles and CI workflows. It checks these against the OSV.dev malicious package database to identify threats.

### Will this skill find every possible piece of malicious code in my project?

The skill only detects threats that are already listed in public databases. It cannot find brand new attacks that have not been reported yet, nor can it identify custom malicious code that you wrote yourself.

### How do I tell my AI agent to start using this skill?

You can ask your agent to scan a specific folder for malicious packages or check if you were affected by a specific recent software worm. You can also ask it to harden your settings or add a security check to your GitHub workflow.

### What do I need to have ready before I run a scan?

You just need a project folder and Node 18 or later. The skill makes a network call to fetch threat data but only sends public package names and versions, keeping your private code and local package names private.

---

Source: [Agensi](https://www.agensi.io), the marketplace of skills for AI agents. Any MCP-compatible agent (Claude, ChatGPT, Claude Code, Codex, Cursor, VS Code and more) connects at https://mcp.agensi.io/mcp/auth and signs in with an Agensi account; setup for every agent: https://www.agensi.io/docs/mcp-setup. Append .md to any skill, guide or docs address on agensi.io for its markdown version.
