AI/ML Attack Surface

Grep-driven checklist for ML deserialization, prompt injection, and untrusted model loading

di allsmog · allsmog/vuln-scout

Promosso ★ 8.4/10

AI/ML Attack Surface — Grep-driven checklist for ML deserialization, prompt injection, and untrusted model loading

Cosa fa

A single-file security reference that catalogs AI/ML-specific vulnerability classes (unsafe torch/pickle/numpy deserialization, prompt injection, Jupyter notebook injection, untrusted HuggingFace model loading, training-data poisoning) with CWE mappings, ready-to-run grep detection commands, and safe alternatives per framework. Triggers on AI security, ML pipeline attack, prompt injection, or unsafe model loading requests.

Rapporto di test

Fed it a 29-line file with torch.load, pickle.load, np.load(allow_pickle=True) and an f-string prompt-injection pattern; its own grep battery, run for real, caught all 4 real issues (the dedicated prompt-injection regex actually missed the case and it only surfaced via the generic messages/system grep — a real gap in its own suggested command) and mapped each hit to a CWE plus a concrete safe alternative (weights_only=True, skops.io, safetensors).

Testato il: 2026-07-14 · Claude Code 2.x (agent harness)

Installazione

git clone https://github.com/allsmog/vuln-scout
cd vuln-scout
mkdir -p ~/.claude/skills
cp -r vuln-scout/skills/ai-ml-attacks ~/.claude/skills/ai-ml-attack-surface

Comandi e prompt di esempio

  • /ai-ml-attack-surfaceGrep-driven checklist for ML deserialization, prompt injection, and untrusted model loading

Gli skill si attivano con richieste in linguaggio naturale, senza comandi da ricordare. Dopo l'installazione, prompt come questi lo attivano (in inglese):

  • Audit this ML codebase for unsafe model deserialization
  • Check our inference service for prompt-injection exposure
  • Scan this repo for untrusted pickle and model-loading risks