/secure-sdlc-agents:ai-securityfrom secure-sdlc-agents
Applies structured security analysis to AI/LLM features: prompt injection, excessive agency, output misuse, and supply chain risks using the OWASP Top 10 for LLMs framework.
Ships in secure-sdlc-agents. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill applies structured security analysis to AI and LLM-powered features. The threat categories here — prompt injection, excessive agency, output misuse, supply chain — did not exist before 2023 and are still being misunderstood by most developers shipping AI features today.
Working assumption: every model is a trust boundary, not a trusted component. Model outputs must be treated as untrusted user input to every downstream system.
Reference framework: OWASP Top 10 for LLMs 2025 (LLM01–LLM10).
Before finding vulnerabilities, enumerate:
| Question | Why it matters |
|---|---|
| Who sends input to the model? | Determines direct injection risk |
| What external sources feed the prompt context? | Determines indirect injection risk |
| What tools / functions can the model invoke? | Determines excessive agency blast radius |
| What happens to the model's output? | Determines output handling risk |
| Is user PII sent to a third-party API? | Determines data leakage and legal risk |
| Where does the model or its weights come from? | Determines supply chain risk |
Input trust classification:
| Input Source | Trust Level | Injection Risk |
|---|---|---|
| Authenticated user (UI) | LOW | Direct prompt injection |
| Public / unauthenticated user | UNTRUSTED | Direct + jailbreak attempts |
| Retrieved document (RAG) | UNTRUSTED | Indirect prompt injection |
| Tool / function call result | MEDIUM | Injection via external API response |
| Database query result | MEDIUM | Injection via poisoned records |
| Web scraping / search | UNTRUSTED | Indirect injection |
Mitigations to verify:
Excessive agency is the most dangerous risk for agentic systems. A model tricked via prompt injection into misusing its tool access can exfiltrate data, delete records, or send external requests — all without the user's knowledge.
Review checklist:
Key principle: model outputs are untrusted input. Validate before acting. Require explicit human confirmation for destructive or high-value operations.
| Model output used as… | Risk | Required mitigation |
|---|---|---|
| Rendered in HTML / DOM | Stored XSS | DOMPurify, output encoding |
| Executed as code | Remote code execution | Never execute model output directly |
| Inserted into SQL queries | SQL injection | Parameterise all queries; validate schema |
| Used in HTTP requests | SSRF | Validate and allowlist URLs from model output |
| Passed to shell commands | Command injection | Never pass model output to shell |
| Used as a file path | Path traversal | Validate against allowlist of permitted paths |
| Used for access control decisions | Privilege escalation | Never use model output for authorisation alone |
Supply chain:
Data leakage:
## AI Security Review: [Feature Name]
### Attack Surface Summary
[Inputs, model access, tools available, output usage]
### Threat Findings
| ID | OWASP LLM Category | Severity | Description | Mitigation |
|----|--------------------|----------|-------------|------------|
| AI-001 | LLM01: Prompt Injection | HIGH | [Description] | [Concrete fix] |
### Mitigations Required Before Release
[Priority list with owners and references]
### Accepted Risks
[Any risks accepted with justification and approver]
| Excuse | Counter |
|---|---|
| "The model won't do harmful things — it's aligned" | Alignment is not a security boundary. Prompt injection bypasses alignment systematically. |
| "Our users are trusted — no injection risk" | Indirect injection comes from retrieved documents, not users. Malicious content in your RAG source is an injection vector. |
| "We validate the model output in the UI" | XSS prevention in the UI is correct but insufficient. Validate at every trust boundary, not just display. |
| "It's a read-only agent — no write tools" | Is it truly read-only? Check every tool definition. HTTP GET requests can trigger side effects in external systems. |
| "We use a well-known model — supply chain is fine" | Supply chain risk includes fine-tunes, LoRA adapters, embedding models, and model API intermediaries — not just the base model. |
| "We'll add rate limiting later" | LLM cost exhaustion attacks (LLM10) are cheaper than traditional DoS. Rate limit before you ship. |
Do not close this review until:
docs/threat-model.md)grc-analyst for GDPR/compliance implicationsWhat SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
llm-security, prompt-injection, ai-agents, rag-security, owasp-llm
Claude Code refuses to install this plugin
.claude-plugin/plugin.json: agents.0: Invalid string: must start with "./", agents.1: Invalid string: must start with "./", agents.2: Invalid string: must start with "./", agents.3: Invalid string: must start with "./", agents.4: Invalid string: must start with "./", agents.5: Invalid string: must start with "./", agents.6: Invalid string: must start with "./", agents.7: Invalid string: must start with "./"
.claude-plugin/plugin.json: agents.0: Invalid string: must start with "./", agents.1: Invalid string: must start with "./", agents.2: Invalid string: must start with "./", agents.3: Invalid string: must start with "./", agents.4: Invalid string: must start with "./", agents.5: Invalid string: must start with "./", agents.6: Invalid string: must start with "./", agents.7: Invalid string: must start with "./"
Checked against Claude Code 2.1.332's install rules. The listing below is what the repository ships; Claude Code cannot install it as published.
4 skills in this plugin
/compliance-and-auditUse when a project requires a compliance framework mapping, when risks need formal documentation, when audit evidence must be collected, or when producing a compliance attestation before release. Applies to SOC 2, ISO 27001, GDPR, PCI DSS, NIST CSF, and DORA.
/security-and-hardeningUse when writing or reviewing code that handles user input, authentication, access control, cryptography, error handling, file uploads, or dependency management. Also activates when a pull request touches any security-sensitive component.
/threat-modelingUse when a new feature, architecture, or significant design decision is being made. Run before any code is written. Produces a structured STRIDE threat model and architecture review that feeds directly into security requirements and PR review.
Other plugins' skills for the same job