/code-audit:authorization-implementation [path or scope]from code-audit
Audits authorization and access-control logic across routes and resources for privilege and enforcement flaws. Use when reviewing RBAC, IDOR, JWT validation, multi-tenant isolation, or field-level permissions.
Ships in code-audit. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
Target: $ARGUMENTS
If no target path is given above, review the entire codebase.
Analyze authorization implementation across all routes:
Check for:
Broken Object Level Authorization (BOLA / IDOR)
GET/PUT/DELETE /:id).Broken Function Level Authorization
Missing authorization checks on sensitive endpoints
Role-based access control (RBAC) implementation
Privilege escalation possibilities
role, tenantId, or isAdmin.JWT token validation on every protected route
jwt.verify with strict algorithms, iss, aud, exp.jwt.decode or trusts unverified claims.jti or tokenVersion against revocation strategy.Proper scope checking for API tokens
audience and intended route access.Additional items to check for:
Multi-tenant isolation
Bulk endpoint protections
Field-level authorization
ssn, apiKey, secrets) excluded for non-privileged users.Error handling & resource enumeration
403 vs 404) to prevent leaking resource existence.Middleware ordering
CORS & CSRF considerations
Open redirect protections
redirect/next parameters are validated against allowlists.Fallback/debug routes
/seed, /reset, /debug endpoints are left exposed without strict admin checks.For each endpoint, verify:
A structured finding report with the following for each issue:
Title, Severity (Critical/High/Medium/Low), CWE (if applicable), Evidence (file, function, line ranges), and a short Why it matters.
Exploitability notes and, where safe, a minimal PoC or reproduction steps (no real secrets).
Remediation: precise code-level fix or config change (snippets welcome), plus defense-in-depth guidance.
A summary risk score (0–10) and top 3–5 prioritized fixes that reduce risk fastest.
A checklist diff: which items from the “Check for” list are Pass/Fail/Not Applicable.
Be concrete and cite exact code locations and identifiers.
Prefer minimal, drop-in fix snippets over prose.
Do not invent files or functions that aren’t present; if context is missing, mark as Unable to verify and say what code would prove it.
Write this into a markdown file and place it in the audits/ folder.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
authorization-audit, access-control, rbac, idor, jwt-validation, security-review
npx claudepluginhub jeremymorgan/code-review-skills --plugin code-audit22 skills in this plugin
/api-and-infrastructureReviews API and infrastructure security configuration, including endpoints, headers, transport, and deployment settings. Use when auditing API or infrastructure hardening./authentication-flow-reviewConducts a comprehensive authentication security review covering login, sessions, tokens, and credential handling. Use when auditing authentication for vulnerabilities./business-logic-vulnerabilitiesAnalyzes business logic for security flaws such as workflow bypasses, race conditions, and abuse cases. Use when reviewing application logic for exploitable behavior.Other plugins' skills for the same job