← All comparisons

Socket catches code after it's bad.
Commit catches what makes it a target.

Socket.dev uses static analysis to detect malicious patterns in published packages — network calls, obfuscation, permission escalation. It's excellent at finding active threats. It doesn't measure the structural conditions that make a package worth attacking in the first place.

The event-stream attack (2018) infected 8 million weekly downloads before any tool flagged it. The structural signal — 1 maintainer, no org backup — was visible for years beforehand.

Different layers of defense

Socket

Catches active threats

Catches

  • Malicious code patterns (network calls, obfuscation)
  • Typosquatting detection
  • Install scripts and permission escalation
  • Known malware in published versions
  • Dependency confusion attacks

Misses

  • Who controls the publish credentials
  • Credential concentration vs download volume
  • Whether a package is a high-value target
Commit

Catches structural exposure

Catches

  • Publisher concentration (credential risk)
  • Download volume vs maintainer ratio
  • Release consistency and cadence
  • Full transitive dependency tree
  • OpenSSF Scorecard integration

Misses

  • Active malicious code detection
  • Typosquatting detection
  • Install-time behavior analysis
Use both in sequence. Socket is your intrusion detection system — it catches threats after they're deployed. Commit is your risk map — it shows which packages are worth attacking before anyone tries.

Case study: chalk and lodash

Both packages are clean code. No malicious patterns, no obfuscation, no suspicious network calls. Socket reports no issues. Commit flags both as CRITICAL — not because of what the code does, but because of who controls the publish token.

chalk 445M downloads/week
Socket
No malicious code detected

No suspicious network calls, obfuscation, or install scripts.

Commit
72 CRITICAL
  • 1 npm publisher
  • 445M downloads/week
  • 14.6 years old
  • No provenance attestation
lodash 145M downloads/week
Socket
No malicious code detected

Clean publish history, no suspicious patterns detected.

Commit
87 CRITICAL
  • 1 npm publisher
  • 145M downloads/week
  • 14 years old
  • Minimal recent updates

Why attackers go for structure first

Socket is excellent at catching what it's designed to catch: malicious code after it's published to a registry. But there's a window between publication and detection. Sophisticated attackers exploit that window.

Before an attacker writes a single line of malicious code, they pick a target. High-value targets share a structural profile: concentrated publish authority, high download volume, minimal organizational backup. These signals are stable, public, and measurable — they don't change between releases.

When you know which packages are structurally exposed, you can:

  • Prioritize monitoring resources on the highest-risk packages
  • Set up alerts the moment a structurally exposed package publishes a new version
  • Evaluate alternatives before an attack happens, not after
  • Communicate risk to stakeholders with concrete data

Six attacks in 2026. Socket caught them after. Commit flagged them before.

Mar 30
axios Token theft. Socket flagged malicious code after publication. Commit had flagged CRITICAL (1 publisher, 119M downloads/week) for months prior.
May 11
TanStack CI/CD hijacking. Compromised GitHub Actions published malicious versions. Socket detected post-publication. Commit: CRITICAL before the attack.
May 22
TrapDoor 21 packages. Planted persistence hooks in IDE configs. Targeted AI coding assistants. Novel enough to evade initial Socket detection.
Jun 1
Red Hat / Miasma 32 packages via compromised GitHub account. Valid SLSA provenance on every malicious version. Socket eventually flagged; structural signals were present throughout.
Jun 3
Phantom Gyp 57 packages using binding.gyp bypass. Self-propagating worm in the Shai-Hulud lineage. Novel bypass technique delayed detection.
Jun 4
IronWorm 37 packages with eBPF rootkit. First npm supply chain attack with kernel-level persistence. Post-publication detection only.
Socket is the right tool for catching attacks in progress. Commit is the right tool for knowing which packages to watch most closely — before the attack starts.

See your structural exposure

Five widely-used packages. Socket: no malicious code detected on any. Commit: live behavioral scores.

Package
Socket Malicious code detection
Commit Structural risk score

Loading live Commit data…

CRITICAL single publisher + >10M downloads/week · OK healthy structural signals

Frequently asked

Should I use Commit instead of Socket?

No. They're complementary. Socket detects malicious code after it's published — that's irreplaceable. Commit measures structural exposure before any attack occurs — that's a different layer. If you only have budget for one: Socket catches active threats. If you have both: Socket covers the post-publication window; Commit tells you which packages to watch most closely.

Does Socket prevent supply chain attacks?

Socket catches attacks after malicious code is published. The gap is the time between publication and Socket flagging it — which ranges from minutes to days depending on how novel the technique is. That window is exploitable. Knowing which packages are high-value targets in advance lets you tighten response time and prioritize monitoring on the packages most likely to be hit.

How does Commit know which packages are targets?

Publisher concentration at scale is the primary signal. An attacker choosing a target wants maximum blast radius per credential compromised. A package with 1 publisher and 100M weekly downloads is structurally more attractive than one with 10 publishers and 10M downloads. That calculus is public and measurable — Commit tracks it across the entire npm registry.

Is Commit free?

The CLI, web audit, and API are free. Paid plans from $15–$29/mo add batch scanning, continuous monitoring, Slack/webhook alerts, and GitHub Action integration. See pricing →


See your structural exposure

Find out which packages in your dependencies are high-value targets before anyone attacks them.

npx proof-of-commitment --file package.json