AI/ML Attack Surface

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

par allsmog · allsmog/vuln-scout

Testé · Fonctionne ★ 8.4/10

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

Ce que fait

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.

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

Testé le: 2026-07-14 · Claude Code 2.x (agent harness)

Installation

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

Commandes et exemples de prompts

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

Les skills se déclenchent sur des demandes en langage courant — aucune commande à retenir. Après installation, des prompts comme ceux-ci l'activent (en anglais) :

  • 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