Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

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от 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

  1. 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.
  2. 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.md section 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.
  3. Install behind a gate: socket npm install <pkg>, or no lifecycle scripts at all (npm config set ignore-scripts true).
  4. Pin it: commit the lockfile; exact versions for anything in CI/prod.
  5. 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:

Полный SKILL.md на GitHub

Установить supply-chain-defense в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Read
Edit
Write
Bash
Glob
Grep
Agent
WebFetch

Вложенные файлы

assets/.gitkeepassets/exposure-catalog.jsonassets/network-ioc.jsonreferences/hardening-checklist.mdreferences/phone-home-monitoring.mdreferences/postinstall-audit.mdreferences/repo-integrity-response.mdreferences/repo-integrity.mdreferences/scripts-and-hooks.mdreferences/socket-cli.mdreferences/threat-model.mdreferences/tooling-by-layer.mdreferences/tooling-landscape.mdreferences/workflows.mdscripts/config-drift-check.pyscripts/exposure-check.pyscripts/integrity-audit.shscripts/phone-home-monitor.ps1scripts/postinstall-audit.pyscripts/preinstall-check.shscripts/release-check.shscripts/run-python.shscripts/scan-extensions.sh

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 запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить supply-chain-defense с