API penetration testing across REST, GraphQL, SOAP, WebSocket and gRPC. Covers the OWASP API Top 10 — BOLA/object-level auth, broken auth, property-level auth and mass assignment, resource/rate limits, function-level auth, SSRF, security misconfiguration, and improper inventory — plus GraphQL-specific attacks (introspection, batching, nested-query DoS, injection). Use for any API target.
Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Api Security?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/anandjogawade-api-security)
---
name: api-security
description: API penetration testing across REST, GraphQL, SOAP, WebSocket and gRPC. Covers the OWASP API Top 10 — BOLA/object-level auth, broken auth, property-level auth and mass assignment, resource/rate limits, function-level auth, SSRF, security misconfiguration, and improper inventory — plus GraphQL-specific attacks (introspection, batching, nested-query DoS, injection). Use for any API target.
---
# API Security
APIs expose business logic directly and often trail the web UI in access-control enforcement. Discover every endpoint and schema, then test authorization relentlessly — BOLA and object-/property-level auth are the dominant API bugs.
## Trigger phrases
`api, rest api, graphql, soap, websocket, grpc, bola, owasp api, swagger, openapi, mass assignment, introspection`
## 1. Discover & map
- Find schemas/docs: `/swagger`, `/swagger.json`, `/openapi.json`, `/api-docs`, `/graphql`, WSDL (`?wsdl`), Postman collections, `.well-known/`, mobile-app traffic (→ mobile skills), JS files.
- Enumerate versions (`/v1`,`/v2`,`/v3`) and undocumented/legacy endpoints (`arjun`, wordlists, diffing docs vs reality).
- Import OpenAPI/Postman into Burp/Postman; build a request per endpoint with valid auth for at least two accounts/roles.
## 2. REST — OWASP API Top 10
- **API1 BOLA (object-level):** swap object IDs across accounts on every endpoint/verb (→ core technique in `web-access-control`). The #1 API bug — test every `{id}`.
- **API2 Broken auth:** weak/missing auth on endpoints, JWT/OAuth flaws (→ `web-jwt-oauth`), API keys in URLs, no token expiry, token in logs.
- **API3 Broken property-level auth / mass assignment:** responses leaking extra fields (excessive data exposure) and writes accepting privileged fields (`role`, `isAdmin`, `verified`) — send them.
- **API4 Resource consumption:** missing rate limits, pagination abuse (`?limit=100000`), expensive operations, no size caps → DoS/cost.
- **API5 Function-level auth:** call admin/privileged endpoints as a low-priv user; guess verbs and sibling routes.
- **API6 Sensitive business flows:** automate abuse of value-bearing flows (→ `web-business-logic`).
- **API7 SSRF:** URL-taking fields (→ `web-ssrf`).
- **API8 Misconfiguration:** verbose errors, debug endpoints, permissive CORS (→ `web-csrf-cors`), missing headers, default creds.
- **API9 Improper inventory:** old versions, staging/`dev.` hosts, undocumented endpoints with weaker controls.
- **API10 Unsafe third-party API consumption.**
- Also test every injection class against JSON bodies, params, and headers (→ `web-sqli`, `web-injection`), content-type confusion (`application/json` vs form), and HTTP method tampering.
## 3. GraphQL
- **Introspection:** query `__schema`/`__type` to dump the full schema (types, queries, mutations). If disabled, use field suggestions / clairvoyance / known-schema guessing.
- **Authorization:** test BOLA/field-level auth per query and mutation; hidden mutations often lack checks.
- **Injection:** SQLi/NoSQLi/command injection through resolver arguments.
- **DoS:** deeply nested/recursive queries, alias-based amplification, `__typename` floods — note risk, test within RoE.
- **Batching abuse:** array-batched queries or aliased duplicate mutations to bypass rate limits / brute-force OTP/login (one request, many attempts).
- **Info leak:** verbose errors, debug fields, stack traces.
## 4. SOAP / XML APIs
- WSDL enumeration of operations; XXE (→ `web-xxe`), XML injection, SQLi in parameters, WS-Security/SAML flaws (→ `web-jwt-oauth`), verb/action spoofing.
## 5. WebSocket & gRPC
- **WebSocket:** handshake origin validation (CSWSH), auth on the socket, message authorization and injection, sensitive data over WS; replay/tamper messages.
- **gRPC:** obtain `.proto` (reflection, app, repo), use `grpcurl`/Postman; test authz per method, injection in fields, and metadata/auth handling.
## Depth & chaining
- Two-account comparison is mandatory for API authz. Build the role × endpoint matrix.
- Chain excessive-data-exposure (harvest IDs) → BOLA (act on them) → account/data takeover.
## Evidence
Per finding: the request (with auth context), the cross-account/privileged response, and the schema/endpoint. Keep raw collections under `./.zazy/evidence/api/`.