본문으로 건너뛰기
cccskills
무료GitHub에 공개

supply-chain-audit

Forensic scan for npm/PyPI supply-chain compromise (Shai-Hulud/TeamPCP campaigns) — checks persistence, hook injection, compromised packages, IOC strings, C2, dead-man switches. Use when auditing a machine or repo for malicious dependencies. Trigger on "supply chain audit", "check for compromised packages", "Shai-Hulud", "scan for malicious deps".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

설치 방법 보기

포함된 파일(1)

  • SKILL.md6.8 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

Supply Chain Audit Skill

Scanner forense completo per rilevare compromissioni da attacchi supply-chain npm/PyPI.

Campagne coperte

CampagnaDataVettori principali
Shai-Hulud SAP/BUN wave2026-04-29mbt, @cap-js/*, SessionStart hook injection
Mini Shai-Hulud TanStack wave2026-05-11@tanstack/*, mistralai, guardrails-ai, lightning
Varianti in corsocontinuo@opensearch-project, @squawk/, @uipath/

Utilizzo

/supply-chain-audit              # scan macchina corrente
/supply-chain-audit --quick      # scan rapido (salta scan git e IOC string)
/supply-chain-audit remediate    # guida remediation interattiva

Subcommand: scan

Esegui sempre questo prima di revocare qualsiasi token (dead-man's switch).

Passi:

  1. Individua il detection script:
SCRIPT="$HOME/.claude/scripts/supply-chain-audit.sh"
[ ! -f "$SCRIPT" ] && echo "ERROR: script non trovato — aggiorna ~/.claude con git pull" && exit 1
  1. Esegui localmente:
bash "$SCRIPT"
  1. Se --quick:
QUICK=true bash "$SCRIPT"
  1. Se --all-machines, esegui in parallelo via SSH su tutte le macchine:
for host in studio mini macbook; do
  echo "=== $host ==="
  ssh "$host" "bash -s" < "$SCRIPT" &
done


wait
  1. Interpreta il risultato:
    • Exit 0 / PULITO: nessun IOC trovato → macchina sicura
    • Exit 2 / ATTENZIONE: warning non critici → revisione manuale consigliata
    • Exit 1 / COMPROMESSO: IOC critici trovati → seguire remediation immediatamente

Subcommand: remediate

Guida interattiva passo-per-passo. L'ordine è critico — non saltare fase.

FASE 1 — Containment (PRIMA di revocare qualsiasi token)

⚠️ Il malware pianta un dead-man's switch: se revochi il token GitHub rubato prima di aver rimosso il watcher, il processo wipe la home directory.

# 1a. Termina il processo watcher se attivo
pkill -f gh-token-monitor 2>/dev/null || true
pkill -f tanstack_runner 2>/dev/null || true
pkill -f router_runtime 2>/dev/null || true

# 1b. Rimuovi file di persistenza
rm -f ~/.claude/router_runtime.js ~/.claude/setup.mjs ~/.claude/tanstack_runner.js
rm -f ~/.vscode/setup.mjs ~/.local/bin/gh-token-monitor.sh
rm -rf ~/.config/gh-token-monitor ~/.dev-env

# 1c. Disabilita systemd / LaunchAgent
systemctl --user disable --now gh-token-monitor 2>/dev/null || true
launchctl unload ~/Library/LaunchAgents/com.user.gh-token-monitor.plist 2>/dev/null || true
rm -f ~/.config/systemd/user/gh-token-monitor.service
rm -f ~/Library/LaunchAgents/com.user.gh-token-monitor.plist

# 1d. Se il malware ha creato un repo GitHub: NON eliminarlo subito
# → privatizzalo su GitHub (Settings → Danger Zone → Make private)
# → rimuovi tutti i runner auto-registrati (Settings → Actions → Runners)

FASE 2 — Eradication

# 2a. Rimuovi node_modules e cache npm
find ~/dev -name "node_modules" -maxdepth 5 -type d \
  -exec rm -rf {} + 2>/dev/null || true
npm cache clean --force 2>/dev/null || true

# 2b. Rimuovi workflow iniettati
find ~/dev -name "codeql_analysis.yml" -path "*/.github/workflows/*" -delete 2>/dev/null
find ~/dev -name "formatter_*.yml" -path "*/.github/workflows/*" -delete 2>/dev/null
find ~/dev -name "discussion.y*ml" -path "*/.github/workflows/*" -delete 2>/dev/null

# 2c. Verifica hook in .claude/settings.json
# Apri ~/.claude/settings.json e rimuovi qualsiasi hook non riconosciuto
# Hook legittimi: hook_handler.py, supply-chain-guard.py, session_start_memory.py, jq docker

# 2d. Reinstalla dipendenze in modo sicuro
# pnpm install --frozen-lockfile    (usa lockfile esistente)
# uv sync --locked                  (usa lockfile esistente)

FASE 3 — Credential Rotation (DOPO la rimozione del malware)

Solo dopo aver completato le fasi 1 e 2, ruota nell'ordine:

  1. npm tokens: npm token revoke <token> — poi crea nuovo con scope minimo
  2. GitHub PAT: Settings → Developer Settings → Tokens → revoca tutti
  3. AWS keys: IAM → revoca access key, crea nuova con scope minimo
  4. Altri cloud credentials (GCP, Azure, etc.)
  5. SSH keys: se ~/.ssh/ è stato letto, rigenera tutte le chiavi

FASE 4 — Verifica finale

bash ~/.claude/scripts/supply-chain-audit.sh

Deve terminare con EXIT 0 / PULITO.

IOC Reference completo

File malware noti

  • ~/.claude/router_runtime.js — stealer principale
  • ~/.claude/setup.mjs — loader
  • ~/.claude/tanstack_runner.js — worm propagation
  • ~/.vscode/setup.mjs — VS Code persistence
  • ~/.local/bin/gh-token-monitor.sh — dead-man's switch
  • ~/.config/gh-token-monitor/ — config watcher
  • ~/.dev-env/ — fake runner directory

Domìni C2

  • api.masscan.cloud — exfiltration
  • filev2.getsession.org — encrypted dead-drop
  • git-tanstack.com — attacker infra
  • seed1.getsession.org — session protocol node

IOC strings nel codice

  • "A Mini Shai-Hulud has Appeared"
  • "OhNoWhatsGoingOnWithGitHub"
  • "ctf-scramble-v2"
  • "IfYouRevokeThisToken"
  • "SHA1HULUD"
  • "voicproducoes"

Versioni npm compromesse (selezionate)

  • @tanstack/react-router: 1.169.5, 1.169.8
  • @opensearch-project/opensearch: 3.5.3, 3.6.2, 3.7.0, 3.8.0

Versioni PyPI compromesse

  • mistralai: 2.4.6
  • guardrails-ai: 0.10.1
  • lightning: 2.6.2, 2.6.3

Protezioni preventive già in place (non rieseguire)

  • ~/.claude/hooks/supply-chain-guard.py: PreToolUse hook — permette frozen installs e sfw-prefixed, blocca risoluzione senza protezione
  • ~/.claude/rules/lockfile-safety.md: policy aggiornata per flusso sfw

Fonti

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Validate WCAG 2.1 Level AA compliance and accessibility best practices. Use when performing accessibility audits and WCAG certification.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matteocervelli/llms252026년 5월 22일 업데이트

analysis

무료

Analyze feature requirements, dependencies, and security considerations. Use when starting feature implementation from GitHub issues to understand scope, technical feasibility, and risks.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matteocervelli/llms252026년 5월 22일 업데이트

analytics

무료

Run SQL queries against psql, BigQuery, or MySQL from the terminal, including natural-language-to-SQL and schema exploration. Use when analyzing data, inspecting DB state, or debugging tables. Trigger on "query the database", "SQL", "show me data from", "explore table".

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matteocervelli/llms252026년 5월 22일 업데이트

Design REST APIs or function contracts with clear request/response specifications, error handling patterns, authentication strategies, and comprehensive documentation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matteocervelli/llms252026년 5월 22일 업데이트

Generate comprehensive API endpoint tests for REST and GraphQL APIs. Creates tests for all HTTP methods, status codes, authentication, and validation.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matteocervelli/llms252026년 5월 22일 업데이트

Design component architecture and module structure using established architectural patterns for clean, maintainable, and scalable systems.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

matteocervelli/llms252026년 5월 22일 업데이트

matteocervelli의 스킬 모두 보기

이 스킬의 문제 신고