Use when reviewing authentication or authorization code. Provides comprehensive security guidance on JWT validation, token exchange, OAuth 2.0/2.1 compliance, PKCE, Resource Indicators, MCP authorization, session management, and API authentication. Covers critical vulnerabilities including token forwarding, audience validation, algorithm confusion, confused deputy attacks, and authentication bypass. Invoke when analyzing any authentication, authorization, or access control code changes.
Provides comprehensive security review for authentication and authorization code, covering JWT validation, OAuth 2.0/2.1, PKCE, and MCP authorization. Use when reviewing any authentication, authorization, or access control code changes to identify critical vulnerabilities like token forwarding, audience validation failures, and algorithm confusion.
/plugin marketplace add bbrowning/bbrowning-claude-marketplace/plugin install bbrowning-claude@bbrowning-marketplaceThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/jwt-security.mdreference/mcp-authorization.mdThis skill provides comprehensive security guidance for reviewing authentication and authorization code, with deep expertise in JWT tokens and MCP (Model Context Protocol) servers.
Invoke this skill when reviewing:
For comprehensive JWT security guidance, see reference/jwt-security.md. Key areas:
Critical Vulnerabilities:
aud claimnone, no user-controlled)Severity Levels:
Correct Pattern - Token Exchange: When Service A needs to call Service B on behalf of a user:
Review Checklist:
For comprehensive MCP authorization guidance, see reference/mcp-authorization.md. Key areas:
MCP Specification Requirements (June 2025):
Critical MCP Vulnerability - Token Forwarding:
The most common and critical MCP security issue is forwarding user tokens from inference servers to MCP servers.
❌ INSECURE:
User → Inference Server (user JWT) → MCP Server (forwarded user JWT)
Problem: MCP server accepts token not issued for it (confused deputy attack)
✅ SECURE:
User → Inference Server (user JWT) → Auth Server (token exchange)
→ MCP Server (MCP-specific JWT)
Benefit: MCP token has correct audience claim and downscoped permissions
Review Checklist:
Token Forwarding (CRITICAL):
# ❌ CRITICAL ISSUE
def call_api(user_token):
response = requests.get(
"https://other-service/api",
headers={"Authorization": f"Bearer {user_token}"}
)
Missing Audience Validation (CRITICAL):
# ❌ VULNERABLE
decoded = jwt.decode(token, public_key, algorithms=['RS256'])
# Missing audience validation!
# ✅ SECURE
decoded = jwt.decode(
token,
public_key,
algorithms=['RS256'],
audience='https://api.myservice.com',
issuer='https://auth.example.com'
)
Algorithm Confusion (CRITICAL):
# ❌ VULNERABLE
header = jwt.get_unverified_header(token)
decoded = jwt.decode(token, key, algorithms=[header['alg']])
# ✅ SECURE
decoded = jwt.decode(token, public_key, algorithms=['RS256'])
Scan for:
Use the checklists from:
reference/jwt-security.md for JWT-related codereference/mcp-authorization.md for MCP server codeFollow the severity guide from the pr-review skill:
For each finding:
Mark as CRITICAL and escalate if you find:
JWT Issues:
MCP Issues:
Before completing security review, ensure:
For detailed security guidance:
reference/jwt-security.md: Comprehensive JWT security best practices, common vulnerabilities, and code examplesreference/mcp-authorization.md: Complete MCP OAuth 2.1 implementation guide, architecture patterns, and security considerationsThese references contain detailed examples, vulnerability explanations, and implementation patterns. Consult them when you need deep technical context for security findings.
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.