AI/ML Attack Surface

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

Por allsmog · allsmog/vuln-scout

Probado · Funciona ★ 8.4/10

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

Qué hace

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.

Informe de la prueba

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).

Probado el: 2026-07-14 · Claude Code 2.x (agent harness)

Instalación

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

Comandos y prompts de ejemplo

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

Los skills se activan con peticiones en lenguaje natural, sin comandos que memorizar. Tras instalarlo, prompts como estos lo activan (en inglés):

  • 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