
Research
Supply Chain Attack on Axios Pulls Malicious Dependency from npm
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.
Detect ghost/phantom dependencies in Node.js projects by analyzing imports vs package.json.
Find and track ghost dependencies hiding in your Node.js projects.
Ever had a package installed that you don’t actually use — or an import that isn’t listed in your package.json?
ghost-deps helps you clean that up.
ghost-deps scans your project files and compares all imports/require calls with your package.json dependencies.
It then reports:
package.json but never importedpackage.jsonYou can install it globally or locally:
npm install -g ghost-deps
or in a project:
npm install --save-dev ghost-deps
Then you can run:
ghost-deps --path .
ghost-deps [options]
| Flag | Description | Default |
|---|---|---|
--path | Path to your project root | . |
--ignore | Comma-separated list of globs to ignore | node_modules/** |
--json | Output report as JSON | false |
-o, --output <file> | Save the output to a file | stdout |
ghost-deps --path ./my-app
Output:
🔍 Scanning ./my-app
Unused dependencies:
- chalk
- lodash
Ghost dependencies:
- express (imported in src/server.ts)
package.json tidyClone the repo and build from source:
git clone https://github.com/yourusername/ghost-deps.git
cd ghost-deps
npm install
npm run build
Run locally:
node bin/ghost-deps.js --path .
MIT © majcek210
FAQs
Detect ghost/phantom dependencies in Node.js projects by analyzing imports vs package.json.
We found that ghost-deps demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Research
A supply chain attack on Axios introduced a malicious dependency, plain-crypto-js@4.2.1, published minutes earlier and absent from the project’s GitHub releases.

Research
Malicious versions of the Telnyx Python SDK on PyPI delivered credential-stealing malware via a multi-stage supply chain attack.

Security News
TeamPCP is partnering with ransomware group Vect to turn open source supply chain attacks on tools like Trivy and LiteLLM into large-scale ransomware operations.