ghtier
← Malicious packages
Malicious packagesOpen client, hosted service

Socket CLI

Client for Socket, which analyzes what each package version does to spot malware and risky behaviour.

github.com/SocketDev/socket-cli ↗
Stars
★ 336
License
MIT
Language
TypeScript
Latest release
v1.1.146
Last push
30 Oct 2026
OpenSSF Scorecard
Not in the weekly scan
ghtier ratingRated 4 of 5, Recommended4/5 · Recommended

Catches malicious packages before they have a CVE, but the analysis runs in Socket's service and needs an API key.

Note: this page is AI generated. Read the tool's own repository and documentation, linked at the bottom, before you rely on it.

How it works

Socket analyzes every version published to npm, PyPI and other registries: install scripts, network and shell access, filesystem and environment variable access, obfuscated code, typosquatted names and maintainer changes, plus AI-assisted malware review. It does this when a version is published, so verdicts are ready before you install.

The CLI uploads your manifests and lockfiles (socket scan create) and reports alerts against your organization's policy. socket npm wraps npm install and checks packages before they install. The GitHub app comments on pull requests that add risky dependencies.

What it catches

  • Known malware and newly published malicious versions
  • Install scripts, network calls and obfuscation in new dependencies
  • Typosquats of popular packages
  • Unexpected new maintainers or protestware

Run it

npm install -g socket
socket login
socket scan create --repo my-repo .

What leaves your machine

Manifest and lockfile contents (package names and versions) go to Socket's API. Source code is not uploaded.

Limits

  • Needs a Socket account and API token; fork PRs don't get the secret, so make the step skip cleanly.
  • Verdicts come from Socket's service, so you can't reproduce them offline.

Related tools

Related incidents

GitHub stats as of 30 Oct 2026. How ratings work.