Defense Module: Agent-Grade Supply Chain Defense
No model required. The Defense Module is a deterministic scanner —
it either matches a pattern or it does not. That is what makes it a
floor you can stand on in a supply-chain incident, not a
probabilistic guess.
Install gate
sober install wraps npm install /
pip install, scanning dependency manifests BEFORE any
lifecycle script executes. Blocks on critical/high (exit 1,
package manager never invoked). Fail-closed on unknown args and
manifest-bypass attempts.
Agent-hook detector
New deterministic scanner flags the exact Shai-Hulud surfaces:
.claude/settings.json SessionStart hooks, VS Code
folderOpen tasks, npm preinstall scripts
that fetch runtimes, smuggled .mjs payloads in agent
dirs, and oversized high-entropy blobs. No model required — runs
in milliseconds, catches the worm before a human sees the MR.
Self-resolving keys
Provider API keys now self-resolve from
$XDG_CONFIG_HOME/sober/api_keys.env,
~/.secrets/sober.env, or per-provider token files
when the process env doesn't carry them. No more 401s in Go tests,
containers, cron jobs, or non-login shells. Explicit env always wins.