supply-chain-defense
БесплатноЗапускает вложенные скриптыНе проверенBehavioural-first defense against poisoned npm/PyPI/Composer/Cargo packages, malicious editor extensions and config-as-code repo poisoning, in the…
от 0xDarkMatter★ 86 звёзд на GitHubОб этом скилле
Supply Chain Defense
Behavioural-first defense against the 2026 supply-chain worms (Shai-Hulud / Mini
Shai-Hulud): they poison popular npm and PyPI packages, steal credentials, republish
from stolen tokens, and plant persistence hooks in Claude Code and VS Code
settings. security-ops is the reactive half (npm audit / pip-audit against
the CVE database); this skill is the proactive half and judges what a fresh package
does. The gap it closes is the 30-minute-to-6-hour window between "published" and
"advisory issued" - references/threat-model.md shows how lockfiles, npm audit,
2FA and even Sigstore/SLSA provenance were each bypassed in 2026.
Every install or version bump is a use case, not just a suspected attack: the routine below is the point.
The routine: every install or version bump
- Score it before you suggest or add it: the depscore MCP (free, no key) or
socket package score <eco> <name> <version>. Score the whole manifest, not just the new package - depscore takes a list. - Age it:
bash scripts/preinstall-check.sh <pkg>[@ver] ...(--pip,--composer,--cargo,--go); exit 10 = published inside the 7-day cooldown. Never suggest a day-zero (@latest) release for a production path. The one exception is a security release, and only when published CVEs are named by ID for that exact version (an advisory, or the vendor's own release notes), a vendor-published checksum matches, a signed binary keeps the installed version's signer, nothing else moves in the lock, a person approves it (via staging for a dependency) and the waiver is recorded (references/hardening-checklist.mdsection 5). Exit 11 = OSV names a CVE fixed in exactly this version, so a waiver may be requested; the rest is the person's check. Neither script waives, and neither has a flag to. - Install behind a gate:
socket npm install <pkg>, or no lifecycle scripts at all (npm config set ignore-scripts true). - Pin it: commit the lockfile; exact versions for anything in CI/prod.
- Don't stop at a clean
npm audit- it only knows yesterday's CVEs.
Which workflow?
Step-by-step for each letter: references/workflows.md.
| Situation | Workflow | First move |
|---|---|---|
| About to add or bump a dependency | A, E | The routine above |
| Updating a standalone tool from a GitHub release (Git for Windows, a CLI installer) | E | release-check.sh with --reference (exit 11 = waiver may be requested, 12 = refuse) |
| A teammate or CI just pulled a fresh version (axios 1.14.1 was live ~3 h) | A, I | Score it, then exposure-check.py |
npm audit / pip-audit clean but you're uneasy |
A, K | Behavioural score + postinstall-audit.py |
| Rolling out Socket.dev on a budget | B | GitHub app + depscore MCP (both free) |
| Install commands need a gate | C | socket wrapper, ignore-scripts, lockfile-lint |
| CI publishes to npm/PyPI | D, F | integrity-audit.sh or zizmor; revoke stale OIDC trust; rotate to short-lived OIDC |
| Production deps auto-update | E | Renovate minimumReleaseAge: 7 days |
| Editor extensions, Claude plugins, skills | G | exposure-check.py, then scan-extensions.sh [--deep] |
| Is this machine already compromised? | H | integrity-audit.sh (hooks, MCP servers, shell rc, .npmrc) |
| An advisory names a package or extension | I | exposure-check.py --root <dirs> (exit 10 = exposed) |
| An unexplained UAC prompt or process you can't place; a post-compromise tripwire (Windows) | J | phone-home-monitor.ps1 (stealers exfiltrate as outbound connections) |
| Is anything already on disk misbehaving? | K | postinstall-audit.py --root <dirs> |
A repo you own is poisoned in place (build config, tasks.json) |
L | config-drift-check.py --staged / --root . |
| Which scanner for which job? | - | references/tooling-landscape.md |
| Proof the skill covers a given attack | - | Coverage matrix in references/threat-model.md |
A finding from H-L is an incident: isolate the machine, rotate every credential it could read, then investigate. Removing the hook or package alone treats a symptom - the credentials were stolen before the worm persisted.
Running the scripts
Paths are relative to this skill folder. Launch the .py scripts through
scripts/run-python.sh: it runs the first of python3, python, py that really
is Python 3.8+ (on Windows python3 is often the Microsoft Store alias, which exits
49 and runs nothing - the scripts' shebang hits it too). Shared exit codes: 0 ok,
2 usage, 3 not found, 5 missing dependency, 7 unavailable, 10 = finding (review
item / inside cooldown / exposed / behavioural hit), 11 = inside the cooldown, a
waiver may be requested, 12 = refuse (release-check.sh: the hash contradicts
the release, or a different signer signed it). 5 and 7 mean part of the
check did not run (no jq, registry down, log unreadable without elevation) and
are never a pass:
Установить supply-chain-defense в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadEditWriteBashGlobGrepAgentWebFetchВложенные файлы
FAQ
Что делает скилл supply-chain-defense?
Behavioural-first defense against poisoned npm/PyPI/Composer/Cargo packages, malicious editor extensions and config-as-code repo poisoning, in the publish-to-advisory window CVE tools miss. Use when adding or bumping a dependency, when an advisory names a package you may run, when auditing CI OIDC trust or publish tokens, or when checking a machine or repo for worm persistence: 7-day cooldown gate, Socket.dev score, exposure and integrity scans.
Как установить скилл supply-chain-defense?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл supply-chain-defense запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic