AI/ML Attack Surface

AI/ML Attack Surface is a skill for Claude Code from allsmog/vuln-scout. It costs 67 tokens per session (1,645 once invoked), scanned B, original, MIT.

A security guide for AI and machine-learning code, including systems that load models, process training data, use notebooks, or call language-model APIs. It focuses on risks specific to these workflows.

In plain words
What is it for?
Use it to review model loading and deserialization, machine-learning frameworks, Jupyter notebooks, training pipelines, and applications connected to language models.
Why use it?
Traditional security scanners may miss unsafe model files, notebook code, prompt attacks, or other weaknesses unique to machine-learning systems.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the vuln-scout plugin — 32 skills, 15 commands, 9 agents shipped together

Good fit Use it to review model loading and deserialization, machine-learning frameworks, Jupyter notebooks, training pipelines, and applications connected to language models.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/allsmog/vuln-scout/ai-ml-attacks
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Any agent
npx skills add allsmog/vuln-scout --skill ai-ml-attacks
Clone the repo
git clone --depth 1 https://github.com/allsmog/vuln-scout

Made for: Claude Code.

Or install vuln-scout, the plugin that ships this one along with the rest of its 32 skills, 15 commands, 9 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for AI/ML Attack Surface

README.md
[![agentmods](https://agentmods.dev/badge/skills/allsmog/vuln-scout/ai-ml-attacks/github.svg)](https://agentmods.dev/skills/allsmog/vuln-scout/ai-ml-attacks)
Your own site
<a href="https://agentmods.dev/skills/allsmog/vuln-scout/ai-ml-attacks"><img src="https://agentmods.dev/badge/skills/allsmog/vuln-scout/ai-ml-attacks/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for AI/ML Attack Surface

Your own site · 80×15
<a href="https://agentmods.dev/skills/allsmog/vuln-scout/ai-ml-attacks"><img src="https://agentmods.dev/badge/skills/allsmog/vuln-scout/ai-ml-attacks.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 67 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,645 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 3 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00067 $0.01645
Opus 5 $0.00034 $0.00822
Sonnet 5 $0.00013 $0.00329
Haiku 4.5 $0.00007 $0.00164

Measured 10d ago against content hash 8768a5401594, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-10, from the pricing page.

Security

Grade B, and why

AI/ML Attack Surface scanned grade B with 3 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 10d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Instruction-override phrasingmediumPrompt injection

Text telling the model to disregard its earlier instructions or safety rules is the shape of a prompt injection, whoever wrote it.

User input flowing into LLM prompts without sanitization, allowing attackers to override system instructions.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Unrestricted tool accesslowExcessive agency

A wildcard tool grant or "run any command" leaves no least-privilege boundary at all.

The most critical ML-specific vulnerability. Many ML serialization formats execute arbitrary code on load.

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

grep -rn "%system\|%sx\|!.*pip\|!.*apt\|!.*curl\|!.*wget" --include="*.ipynb"
vuln-scout/skills/ai-ml-attacks/SKILL.md · 172 lines

How it starts

The opening of the file, as written. The whole thing — 172 lines — stays where its author put it; the contents beside it link to each section on GitHub.

AI/ML Attack Surface

Purpose

Detect security vulnerabilities specific to AI/ML pipelines, LLM-backed applications, and data science workflows. These attack surfaces are increasingly common and often overlooked by traditional SAST tools.

When to Use

Activate this skill when reviewing code that:

  • Imports ML frameworks (torch, tensorflow, sklearn, transformers, langchain)
  • Loads serialized models or data
  • Integrates LLM APIs (OpenAI, Anthropic, etc.)
  • Processes Jupyter notebooks
  • Handles training data pipelines

Vulnerability Categories

1. Unsafe Deserialization in ML Pipelines (CWE-502)

The most critical ML-specific vulnerability. Many ML serialization formats execute arbitrary code on load.

Dangerous Functions:

Framework Dangerous Safe Alternative
PyTorch torch.load(path) torch.load(path, weights_only=True)
Joblib joblib.load(path) Verify source, use safetensors
NumPy numpy.load(path, allow_pickle=True) numpy.load(path, allow_pickle=False)
Scikit-learn joblib.load() / pickle.load() skops.io with trusted types
TensorFlow tf.saved_model.load() with custom ops Verify model provenance
ONNX Generally safe Validate graph structure
SafeTensors Safe by design Recommended format

Detection:

# PyTorch unsafe load
grep -rn "torch\.load(" --include="*.py" | grep -v "weights_only=True"

# Joblib/sklearn model loading
grep -rn "joblib\.load\|sklearn.*load" --include="*.py"

# NumPy with pickle enabled
grep -rn "numpy\.load\|np\.load" --include="*.py" | grep "allow_pickle"

# Generic unsafe deserialization in ML context
grep -rn "pickle\.load\|pickle\.loads\|dill\.load\|cloudpickle\.load" --include="*.py"

Exploitation: An attacker who can supply a malicious model file achieves arbitrary code execution on the server loading the model. This is especially dangerous in:

  • Model registries that accept user uploads
  • Transfer learning pipelines pulling models from external sources
  • CI/CD pipelines that load models during testing

Read the full file on GitHub · 172 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 10d ago First seen · 172 lines · 67 tokens per session scan B 8768a5401594

Subscribe to this mod's changes

AI/ML Attack Surface is a skill published in the GitHub repository allsmog/vuln-scout (24 stars, last pushed 2mo ago), licensed MIT. It adds 67 tokens to every session and 1,645 once invoked, about $0.0003 per session on Opus 5. A static security scan graded it B with 3 findings (instruction-override phrasing, unrestricted tool access, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.

Related

Other skills, from other repositories

skill-meta-prompt

Craft better prompts using proven optimization techniques — use when your prompt needs refinement.

nyldn/claude-octopus · 19 tokens

ai-workflow-architect

Designs AI systems, automations, and agent workflows for a business — identifying which manual work is worth automating, how to structure the system, which tools fit, and what could go wrong. Use this to automate part of an operation, design an agent or MCP workflow, reduce repetitive manual work, connect tools into a…

cbrock84/headcount · 89 tokens

cloudflare-workers-ai

Cloudflare Workers AI for serverless GPU inference. Use for LLMs, text/image generation, embeddings, or encountering AIERROR, rate limits, token exceeded errors.

secondsky/claude-skills · 39 tokens

nano-banana-prompting

This skill should be used when crafting prompts for Nano Banana Pro (Gemini image generation). Use when users want help writing image generation prompts, need guidance on prompt structure, or want to optimize their prompts for better results.

NikiforovAll/claude-code-rules · 51 tokens

nano-banana

This skill should be used for Python scripting and Gemini image generation. Use when users ask to generate images, create AI art, edit images with AI, or run Python scripts with uv. Trigger phrases include "generate an image", "create a picture", "draw", "make an image of", "nano banana", or any image generation…

NikiforovAll/claude-code-rules · 73 tokens

meta-prompting

Enhanced reasoning patterns via slash commands (/think, /verify, /adversarial, /edge, /compare, /confidence, /budget, /constrain, /json, /flip, /assumptions, /tensions, /analyze, /trade) or natural language ("argue against", "what could break", "show reasoning", "deep review", "meta-prompts", "thinking modes"…

iliaal/whetstone · 104 tokens