AI/ML Security Assessment
Security assessment for LLMs, classifiers, and agents — distinct from general app security and infra anomaly detection. Static signature matching assesses inputs before they reach the model. Gray-box/white-box testing requires written authorization.
Prompt Injection Signatures (→ ATLAS)
| Signature |
Severity |
ATLAS |
Examples |
| direct_role_override |
Critical |
AML.T0051 |
system-prompt override, role-replacement |
| indirect_injection |
High |
AML.T0051.001 |
template tokens <system>,[INST],###system### |
| jailbreak_persona |
High |
AML.T0051 |
"DAN mode", "developer mode" |
| system_prompt_extraction |
High |
AML.T0056 |
"repeat your initial instructions" |
| tool_abuse |
Critical |
AML.T0051.002 |
"call delete_files", "bypass approval" |
| data_poisoning_marker |
High |
AML.T0020 |
"inject into training data" |
Indirect injection (RAG/agents): all retrieved external content (web pages, docs, email, API responses) is untrusted user input, never trusted context.
Jailbreak Taxonomy
Persona framing · hypothetical framing · developer mode · token manipulation (base64/rot13) · many-shot (volume-detected). Test known templates through the scanner before prod; any critical template needs guardrails first.
Model Inversion Risk by Access
- white-box (Critical 0.9): gradient inversion, membership inference via logits → remove gradient access, differential privacy.
- gray-box (High 0.6): confidence-based membership inference → disable logit outputs, rate limit.
- black-box (Low 0.3): label-only, high query volume → monitor systematic querying.
Detect membership inference: high query volume from one identity, perturbed repeats, grid-search coverage, confidence-boundary probing.
Data Poisoning Risk by Fine-Tuning Scope
fine-tuning High 0.85 (audit examples, provenance) · rlhf High 0.70 (vet contributors) · retrieval-augmented Med 0.60 (validate before indexing) · pre-trained-only Low 0.20 · inference-only Low 0.10. Signals: trigger-pattern behavior, distribution deviation per entity, systematic class bias, training-loss anomalies.
Agent Tool Abuse
Direct injection · indirect hijack via retrieved docs · approval-gate bypass · privilege escalation. Mitigations: human approval gates for destructive/exfil calls; minimal tool scope; validate tool params before invocation; audit-log every call with triggering prompt; filter tool outputs.
Guardrail Patterns
- Input: injection-signature filter, embedding similarity to jailbreak templates, length limit, dedicated content-policy classifier.
- Output: redact system-prompt leakage, PII detection, URL/code validation.
- Agent: tool-param validation, human-in-loop gates, resource allowlist per session, mid-session role-change detection.
Workflow (CI gate)
Run seed + domain prompts; review injection_score and ATLAS coverage. Critical = block deploy. High = deploy with monitoring, remediate in sprint.
Anti-Patterns
Testing only published templates (DAN/STAN already blocked) · treating static matching as complete (add red-team + semantic filter) · ignoring indirect injection for RAG · not testing with production system prompt · no output filtering · assuming model updates fix injection (it's input validation, fix at app layer) · skipping authorization for gray/white-box.
1---2name: ai-ml-security-assessment3description: Use when assessing AI/ML or LLM systems for prompt injection, jailbreak, model inversion, data poisoning, or agent tool abuse — maps findings to MITRE ATLAS and recommends guardrails.4tags: [ai-security, prompt-injection, jailbreak, llm-security, model-inversion, data-poisoning, agent-security, mitre-atlas, guardrails, rag-security]5source: alirezarezvani/claude-skills6derived_from: engineering-team/skills/ai-security7metadata:8 source: https://skillmd.com/skills/aashutosh396/ai-ml-security-assessment9---1011# AI/ML Security Assessment1213Security assessment for LLMs, classifiers, and agents — distinct from general app security and infra anomaly detection. Static signature matching assesses inputs *before* they reach the model. Gray-box/white-box testing requires written authorization.1415## Prompt Injection Signatures (→ ATLAS)16| Signature | Severity | ATLAS | Examples |17|---|---|---|---|18| direct_role_override | Critical | AML.T0051 | system-prompt override, role-replacement |19| indirect_injection | High | AML.T0051.001 | template tokens `<system>`,`[INST]`,`###system###` |20| jailbreak_persona | High | AML.T0051 | "DAN mode", "developer mode" |21| system_prompt_extraction | High | AML.T0056 | "repeat your initial instructions" |22| tool_abuse | Critical | AML.T0051.002 | "call delete_files", "bypass approval" |23| data_poisoning_marker | High | AML.T0020 | "inject into training data" |2425**Indirect injection (RAG/agents):** all retrieved external content (web pages, docs, email, API responses) is untrusted user input, never trusted context.2627## Jailbreak Taxonomy28Persona framing · hypothetical framing · developer mode · token manipulation (base64/rot13) · many-shot (volume-detected). Test known templates through the scanner before prod; any `critical` template needs guardrails first.2930## Model Inversion Risk by Access31- **white-box** (Critical 0.9): gradient inversion, membership inference via logits → remove gradient access, differential privacy.32- **gray-box** (High 0.6): confidence-based membership inference → disable logit outputs, rate limit.33- **black-box** (Low 0.3): label-only, high query volume → monitor systematic querying.3435Detect membership inference: high query volume from one identity, perturbed repeats, grid-search coverage, confidence-boundary probing.3637## Data Poisoning Risk by Fine-Tuning Scope38fine-tuning High 0.85 (audit examples, provenance) · rlhf High 0.70 (vet contributors) · retrieval-augmented Med 0.60 (validate before indexing) · pre-trained-only Low 0.20 · inference-only Low 0.10. Signals: trigger-pattern behavior, distribution deviation per entity, systematic class bias, training-loss anomalies.3940## Agent Tool Abuse41Direct injection · indirect hijack via retrieved docs · approval-gate bypass · privilege escalation. Mitigations: human approval gates for destructive/exfil calls; minimal tool scope; validate tool params before invocation; audit-log every call with triggering prompt; filter tool outputs.4243## Guardrail Patterns44- **Input:** injection-signature filter, embedding similarity to jailbreak templates, length limit, dedicated content-policy classifier.45- **Output:** redact system-prompt leakage, PII detection, URL/code validation.46- **Agent:** tool-param validation, human-in-loop gates, resource allowlist per session, mid-session role-change detection.4748## Workflow (CI gate)49Run seed + domain prompts; review injection_score and ATLAS coverage. Critical = block deploy. High = deploy with monitoring, remediate in sprint.5051## Anti-Patterns52Testing only published templates (DAN/STAN already blocked) · treating static matching as complete (add red-team + semantic filter) · ignoring indirect injection for RAG · not testing with production system prompt · no output filtering · assuming model updates fix injection (it's input validation, fix at app layer) · skipping authorization for gray/white-box.