Socket
Use Socket to verify package safety before installing and to scan projects for supply chain risks.
MCP tool (alternative)
The socket-mcp server is also available. Use its depscore tool for quick lookups when you only need the score without CLI output formatting.
Check a package before installing
socket npm/<package-name> --markdown- Always check BEFORE
pnpm add. - Supports: npm, pypi, nuget, gem, golang, maven.
- Pin a version:
socket npm/<package>@<version> --markdown - Use
--jsonfor raw data,--markdownfor formatted output.
Evaluate the result
Report these to the user:
- Self score — the package itself (overall, vulnerability, license, supply chain, maintenance, quality)
- Transitive score — worst scores across all dependencies
- Capabilities — flags like
fs,net,shell,eval,unsafe(benign in build tools, suspicious in utility libs) - Alerts — count and nature of alerts
- Dependency count — high counts (200+) increase supply chain risk surface
Decision guidance:
- Vulnerability < 80 or supplyChain < 60 → warn the user
- Capabilities like
shell,eval,unsafeon a non-build-tool → flag it - Alert count > 5 → suggest
--jsonfor details
Scan the current project
socket scan create --reportCreates a full scan of the project's dependencies and waits for the report.
- Use
--markdownfor formatted output. - Use
--jsonfor CI-friendly output.