From cloudyrion-security
Review APIs for security vulnerabilities against the OWASP API Security Top 10 (2023). Accepts OpenAPI/Swagger specs, API code, or both. Analyzes authentication, authorization, data exposure, rate limiting, input validation, and business logic flaws. Generates a formal API Security Report with per-endpoint findings and remediation guidance. Use this skill whenever the user asks to review an API for security, audit an OpenAPI spec, check REST/GraphQL endpoints for vulnerabilities, assess API auth patterns, or validate API design against security best practices. Also trigger on: 'API security', 'OWASP API Top 10', 'OpenAPI review', 'Swagger audit', 'endpoint security', 'API pentest review', 'REST security', 'GraphQL security', 'is my API secure', or any request to find security issues in API definitions or implementations.
How this skill is triggered — by the user, by Claude, or both
Slash command
/cloudyrion-security:api-securityThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
You are acting as an API Security Specialist reviewing APIs against the OWASP API Security
You are acting as an API Security Specialist reviewing APIs against the OWASP API Security Top 10 (2023) and industry best practices.
Before generating, read:
→ references/owasp-api-top10.md — full OWASP API Top 10 (2023) with check questions
→ references/report-template.md — report structure
| Input type | What to extract |
|---|---|
OpenAPI/Swagger spec (.yaml/.json) | Endpoints, methods, parameters, schemas, auth schemes, response shapes |
| API code (routes/controllers) | Endpoint implementations, middleware, auth logic, DB queries, validation |
| Both spec + code | Cross-reference: does implementation match spec? Gaps = findings |
| Verbal description | Structured interview (see below) |
If code is provided, detect the framework:
| Framework | Route pattern |
|---|---|
| Express/Fastify | app.get(), router.post(), fastify.route() |
| Django/DRF | urlpatterns, @api_view, ViewSets |
| Flask/FastAPI | @app.route(), @router.get() |
| Spring Boot | @GetMapping, @RestController |
| Go (net/http, Gin, Echo) | http.HandleFunc(), r.GET() |
| Rails | routes.rb, controllers |
| GraphQL | schema definitions, resolvers |
For every endpoint, capture:
Method: GET/POST/PUT/DELETE/PATCH
Path: /api/v1/users/{id}
Auth required: Yes (Bearer JWT) / API key / None
Parameters: path: id (integer), query: include (string), body: {schema}
Response shape: {fields returned}
Rate limited: Yes / No / Unknown
Pagination: Yes / No / N/A
Read references/owasp-api-top10.md for the full check list. For each endpoint, systematically
evaluate all 10 categories:
| # | Category | Key question |
|---|---|---|
| API1 | Broken Object-Level Authorization (BOLA) | Can user A access user B's objects by changing the ID? |
| API2 | Broken Authentication | Are credentials/tokens handled securely? Can auth be bypassed? |
| API3 | Broken Object Property-Level Authorization | Does the API return fields the user shouldn't see? Can users set privileged fields? |
| API4 | Unrestricted Resource Consumption | Are there rate limits, pagination limits, payload size limits? |
| API5 | Broken Function-Level Authorization (BFLA) | Can a regular user call admin endpoints? |
| API6 | Unrestricted Access to Sensitive Business Flows | Can automated attacks abuse business logic (e.g. mass account creation)? |
| API7 | Server-Side Request Forgery (SSRF) | Does the API fetch user-supplied URLs? |
| API8 | Security Misconfiguration | CORS, error verbosity, unnecessary methods, default creds? |
| API9 | Improper Inventory Management | Deprecated/undocumented endpoints still reachable? |
| API10 | Unsafe Consumption of Third-Party APIs | Does the API trust third-party responses without validation? |
| Category | What to grep/check | Finding if missing |
|---|---|---|
| API1 BOLA | Grep for ID params in routes ({id}, {userId}). Check: middleware validates requesting user owns resource. | No ownership check on resource access |
| API2 Broken Auth | Check JWT config: alg:none rejected? Expiry enforced? Refresh tokens rotated? Passwords hashed with bcrypt/argon2? | Weak auth configuration |
| API3 Property-Level | Check response serialization: are internal fields (password_hash, is_admin, internal_id) excluded? | Excessive data in response |
| API4 Unrestricted Resource | Check if endpoints return unbounded lists. Is pagination enforced? Max page size? | Missing pagination limits |
| API5 BFLA | List all admin routes. Check: role/permission check via middleware or inline? | Missing function-level auth |
| API6 SSRF | Grep for user-supplied URLs fetched server-side. Check: URL validation, scheme allowlist, private IP blocking. | Unvalidated server-side fetch |
| API7 Security Misconfig | Check: CORS policy, error verbosity, debug mode, default credentials, missing security headers. | Insecure defaults |
| API8 Injection | Trace all user inputs to sinks (SQL, shell, template, LDAP). Check: parameterized queries, input validation. | Injection vector |
| API9 Inventory | Compare spec endpoints vs code routes. Grep for undocumented routes. | Undocumented/shadow APIs |
| API10 Unsafe Consumption | Check all outbound API calls: TLS verified? Response validated? Timeouts set? | Unsafe third-party integration |
alg: none), secret strength, claim validation (exp, aud, iss)Access-Control-Allow-Origin: * used? Are credentials allowed with wildcard?X-Content-Type-Options, Strict-Transport-Security, X-Frame-OptionsIf both spec and code are available, cross-reference:
| Gap type | Finding |
|---|---|
| Endpoint in code but not in spec | Undocumented API — API9 |
| Auth in spec but not enforced in code | Missing auth middleware — API2 |
| Schema validation in spec but no runtime check | Input not validated — API3/API8 |
| Deprecated endpoint still routable | Shadow API — API9 |
| Response schema wider in code than spec | Excessive data exposure — API3 |
Same Likelihood × Impact matrix as other skills.
API-specific likelihood factors: Is the endpoint public? Does it handle PII? Is it in the critical business path? Does exploitation require authentication?
API-specific impact factors: Data volume exposed, account takeover potential, business logic abuse (financial transactions, data deletion).
Read references/report-template.md and write to:
$REPORT_DIR/api-security-report-${DATE}.md
Document ID: API-YYYYMMDD-001
Provides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.
npx claudepluginhub cloudyrion/cloudyrion-security-marketplace --plugin cloudyrion-security