Skip to main content
skill CX Codex

agent-security-audit — Claude Code skill: audit AI agent security

agent-security-audit is a Claude Code skill that checks AI agent configurations for vulnerabilities. Run it when reviewing CLAUDE.md files, MCP configs, and agent orchestration code.

CC-BY-4.0 302 installs ★ 230 updated 2026-10-15

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a claude-code
Open on GitHub

What agent-security-audit does

The skill walks through a complete audit procedure from OWASP. First, enumerate every tool, MCP server, file system path, network access, and credential your agent has—then flag capabilities that exceed its stated purpose. Next, examine each input path: user messages, tool outputs, MCP resources, RAG documents. For each, assess whether carefully crafted input could force the agent to call unintended tools, override its instructions, or leak sensitive data.

The skill flags chains of tool calls that are individually safe but combine into harm. It maps data exfiltration routes—how secrets flow into external tool parameters, file contents into web requests, data forwarded between MCP servers, sensitive information captured in logs. For every tool, check whether user-controlled input can reach its parameters without validation, identifying command injection, path traversal, SSRF, and SQL injection risks. Finally, evaluate defenses: safety instructions in the system prompt, confirmation before tool execution, output filtering, rate limiting, audit logging, sandboxing.

Output includes a permission inventory table, prioritized risk findings, an injection surface map, and recommendations aligned with OWASP standards for LLM security.

What it helps with

  • discover excessive permissions and tools outside the agent's intended role
  • locate where user input reaches tool parameters without sanitization
  • flag tool-call chains that are individually safe but collectively dangerous
  • map pathways where sensitive data leaves the agent boundary
  • verify presence of guardrails: system prompts, confirmations, filters, logging

Example prompts for the agent

  • Audit the MCP config in .claude/mcp.json for overly broad permissions
  • Identify prompt injection surfaces in CLAUDE.md and agent orchestration code
  • Check whether a sequence of tool calls could lead to data exfiltration

How to install agent-security-audit

1Skills CLI (Vercel)

npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a claude-code

2Manually: put the files in place

~/.claude/skills/agent-security-audit/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/agent-security-audit/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about agent-security-audit

How do I install agent-security-audit in Claude Code?

Run npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a claude-code, then open ~/.claude/skills/agent-security-audit/SKILL.md.

What does agent-security-audit check?

It reviews agent permissions, prompt injection surfaces, tool-call sequences, data exfiltration paths, and presence of guardrails—following OWASP standards for AI security.

How do I use it with other AI platforms?

For Codex: npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a codex. For Cursor: npx skills add OWASP/secure-agent-playbook --skill agent-security-audit -a cursor. For GitHub Copilot: gh skill install OWASP/secure-agent-playbook agent-security-audit.

Source text

SKILL.md · CC-BY-4.0
---
name: agent-security-audit
description: Audit AI agent configurations for security risks — excessive permissions, prompt injection surfaces, data exfiltration paths, and missing guardrails. Use when reviewing CLAUDE.md files, MCP configs, agent orchestration code, or any AI agent setup.
license: CC-BY-4.0
---

# Agent Security Audit

Evaluate an AI agent's security posture by following the full procedure in `plays/agent-security-audit.md`.

## Steps

1. **Permission Inventory** — Enumerate every tool, MCP server, file system path, network access, and credential the agent has. Flag capabilities beyond what its stated purpose requires.

2. **Prompt Injection Surface Analysis** — For each input path (user messages, tool outputs, MCP resources, RAG documents), assess whether crafted input could cause the agent to invoke unintended tools, override instructions, or exfiltrate data.

3. **Excessive Agency Assessment (OWASP LLM06)** — Check whether destructive/irreversible actions require confirmation, whether access exceeds need, whether the agent can escalate its own privileges, and whether individually-safe tool calls can chain into harmful outcomes.

4. **Data Exfiltration Path Analysis** — Map how sensitive data could leave the agent boundary: secrets passed to external tools, file contents in web requests, cross-MCP-server data forwarding, sensitive data in logs.

5. **Tool-Call Injection Assessment** — For each tool: can user-controlled input reach tool parameters unsanitized? Check for command injection, path traversal, SSRF, and SQL injection through agent-constructed calls.

6. **Guardrail Evaluation** — Check for system prompt safety instructions, tool call confirmations, output filtering, rate limiting, audit logging, and sandboxing.

## Output

Use the finding format from `templates/finding.md`. Produce a Permission Summary table, Risk Findings, Injection Surface Map, and prioritized Recommendations.

## OWASP References

- LLM01: Prompt Injection
- LLM02: Sensitive Information Disclosure
- LLM05: Improper Output Handling
- LLM06: Excessive Agency
- LLM07: System Prompt Leakage
- LLM08: Vector and Embedding Weaknesses

© OWASP · CC-BY-4.0 · OWASP/secure-agent-playbook

Similar skills

All skills for Security →

From the same set18

The whole set →
code-review-security code-review-security — a skill that reviews code for vulnerabilities against OWASP Top 10 and ASVS, then reports findings with attack scenarios and fixed snippets. CX Codex +1 516installs security-guidance The security-guidance skill applies OWASP ASVS guidance to code involving input, auth, storage, networks, files, cryptography, or access control. CX Codex +1 492installs secrets-scan secrets-scan scans source and config files for hardcoded credentials, API keys and tokens, whether you are reviewing before a merge or auditing a repo. CX Codex +1 427installs sca-audit sca-audit scans project dependencies for known CVEs, highlights abandoned packages, and suggests exact remediation commands. CX Codex +1 358installs mobile-code-review mobile-code-review audits native Android and iOS source code for security vulnerabilities against the OWASP MASVS v2.1.0 benchmark. CX Codex +1 224installs prompt-injection-test prompt-injection-test runs an LLM app through prompt injection attacks from the Arcanum PI Taxonomy. Use it when red-teaming your own AI app or checking how well its guardrails hold. CX Codex +1 220installs mcp-server-review mcp-server-review is a Claude Code skill that audits MCP server code and client settings for security risks. Run it to review a server or assess it before installation. CX Codex +1 217installs iac-security-review iac-security-review reviews Terraform, Kubernetes, and CloudFormation for security misconfigurations. Use it before an infrastructure change is reviewed or deployed. CX Codex +1 196installs

Project sponsors

Companies that keep this analytics open