Overview
Performs a structured security audit of REST or GraphQL APIs against the OWASP API Security Top 10. Provides detection methods (code review + testing), authentication/authorization review, BOLA/IDOR testing procedure, injection point identification, rate limiting testing, and a professional audit report template with findings, risk ratings, and remediation recommendations.
When to Use This Skill
- Before launching a new API or major version.
- After significant changes to auth, authorization, or data access logic.
- As part of a security review or bug bounty prep.
- The user asks for an "API security audit" or "OWASP API Top 10 review".
Prerequisites
- Access to the API source code and/or a running instance (staging preferred).
- Authentication credentials or tokens for different roles/users (if testing with auth).
- Tools: Postman/Insomnia or curl, Burp Suite or ZAP (for proxying), or custom scripts.
Steps
OWASP API Top 10 2023 checklist (with detection method for each):
- API1:2023 Broken Object Level Authorization (BOLA/IDOR)
- API2:2023 Broken Authentication
- API3:2023 Broken Object Property Level Authorization
- API4:2023 Unrestricted Resource Consumption (rate limiting, DoS)
- API5:2023 Broken Function Level Authorization
- API6:2023 Unrestricted Access to Sensitive Business Flows
- API7:2023 Server Side Request Forgery (SSRF)
- API8:2023 Security Misconfiguration
- API9:2023 Improper Inventory Management
- API10:2023 Unsafe Consumption of APIs (third-party)
Authentication & session review:
- JWT validation (alg, exp, signature, claims).
- Token storage and transmission.
- OAuth scopes and PKCE.
- Password/reset flows.
Authorization testing (BOLA/IDOR):
- Systematically change IDs in requests (user_id, order_id, document_id) while authenticated as different users.
- Test horizontal (same role, different user) and vertical (lower role accessing higher).
- GraphQL: test for missing authorization on every field/resolver.
Injection & input validation:
- SQLi, NoSQLi, command injection in query params, body, headers.
- Mass assignment / over-posting.
- GraphQL: introspection enabled in prod? deep nesting DoS?
Rate limiting & resource limits:
- Test with high volume from one IP / one user.
- Check for per-user vs per-IP limits.
- Look for expensive operations without limits (search, export, report generation).
Output:
- Structured audit report (Markdown template) with:
- Executive summary
- Findings table (OWASP item | Severity | Location | Evidence | Recommendation)
- Positive findings (what is done well)
- Remediation roadmap
- Specific test cases / curl commands used.
- Code-level indicators to look for in reviews.
Examples
A complete audit report template filled with realistic findings for a typical REST + GraphQL API (BOLA on /users/{id}/orders, missing rate limit on search, JWT alg confusion, over-fetching in GraphQL, etc.) plus the exact test procedures and curl examples used to discover them is included.
Edge Cases & Error Handling
- Authorization logic in the client: Flag as critical — server must always enforce.
- GraphQL: Field-level auth, query cost analysis, depth limiting.
- Microservices: Auth must be validated at every service boundary (or use a service mesh with mTLS + auth).
Verification
- The auditor follows the checklist and produces a report.
- At least the critical/high findings have clear reproduction steps.
- Code review confirms the vulnerable patterns exist (or the fix is in place).
- Re-test after remediation — the issue is closed.
- Success: The API has no critical OWASP API Top 10 issues, or they are explicitly accepted with compensating controls and timelines.
References
1---2name: api-security-auditor3description: Audits REST or GraphQL APIs for OWASP API Top 10 vulnerabilities. Use when reviewing or testing the security of an API before launch or after changes.4license: Apache-2.05---67## Overview89Performs a structured security audit of REST or GraphQL APIs against the OWASP API Security Top 10. Provides detection methods (code review + testing), authentication/authorization review, BOLA/IDOR testing procedure, injection point identification, rate limiting testing, and a professional audit report template with findings, risk ratings, and remediation recommendations.1011## When to Use This Skill1213- Before launching a new API or major version.14- After significant changes to auth, authorization, or data access logic.15- As part of a security review or bug bounty prep.16- The user asks for an "API security audit" or "OWASP API Top 10 review".1718## Prerequisites1920- Access to the API source code and/or a running instance (staging preferred).21- Authentication credentials or tokens for different roles/users (if testing with auth).22- Tools: Postman/Insomnia or curl, Burp Suite or ZAP (for proxying), or custom scripts.2324## Steps25261. **OWASP API Top 10 2023 checklist** (with detection method for each):27 - API1:2023 Broken Object Level Authorization (BOLA/IDOR)28 - API2:2023 Broken Authentication29 - API3:2023 Broken Object Property Level Authorization30 - API4:2023 Unrestricted Resource Consumption (rate limiting, DoS)31 - API5:2023 Broken Function Level Authorization32 - API6:2023 Unrestricted Access to Sensitive Business Flows33 - API7:2023 Server Side Request Forgery (SSRF)34 - API8:2023 Security Misconfiguration35 - API9:2023 Improper Inventory Management36 - API10:2023 Unsafe Consumption of APIs (third-party)37382. **Authentication & session review**:39 - JWT validation (alg, exp, signature, claims).40 - Token storage and transmission.41 - OAuth scopes and PKCE.42 - Password/reset flows.43443. **Authorization testing (BOLA/IDOR)**:45 - Systematically change IDs in requests (user_id, order_id, document_id) while authenticated as different users.46 - Test horizontal (same role, different user) and vertical (lower role accessing higher).47 - GraphQL: test for missing authorization on every field/resolver.48494. **Injection & input validation**:50 - SQLi, NoSQLi, command injection in query params, body, headers.51 - Mass assignment / over-posting.52 - GraphQL: introspection enabled in prod? deep nesting DoS?53545. **Rate limiting & resource limits**:55 - Test with high volume from one IP / one user.56 - Check for per-user vs per-IP limits.57 - Look for expensive operations without limits (search, export, report generation).58596. **Output**:60 - Structured audit report (Markdown template) with:61 - Executive summary62 - Findings table (OWASP item | Severity | Location | Evidence | Recommendation)63 - Positive findings (what is done well)64 - Remediation roadmap65 - Specific test cases / curl commands used.66 - Code-level indicators to look for in reviews.6768## Examples6970A complete audit report template filled with realistic findings for a typical REST + GraphQL API (BOLA on `/users/{id}/orders`, missing rate limit on search, JWT alg confusion, over-fetching in GraphQL, etc.) plus the exact test procedures and curl examples used to discover them is included.7172## Edge Cases & Error Handling7374- **Authorization logic in the client**: Flag as critical — server must always enforce.75- **GraphQL**: Field-level auth, query cost analysis, depth limiting.76- **Microservices**: Auth must be validated at every service boundary (or use a service mesh with mTLS + auth).7778## Verification79801. The auditor follows the checklist and produces a report.812. At least the critical/high findings have clear reproduction steps.823. Code review confirms the vulnerable patterns exist (or the fix is in place).834. Re-test after remediation — the issue is closed.845. Success: The API has no critical OWASP API Top 10 issues, or they are explicitly accepted with compensating controls and timelines.8586## References8788- [OWASP API Security Top 10 2023](https://owasp.org/API-Security/editions/2023/en/0x00-header/)89- [OWASP Testing Guide](https://owasp.org/www-project-web-security-testing-guide/)90- [GraphQL Security Cheat Sheet](https://cheatsheetseries.owasp.org/cheatsheets/GraphQL_Cheat_Sheet.html)91- [JWT Security](https://jwt.io/)