$npx -y skills add transilienceai/communitytools --skill api-securityAPI security testing - GraphQL, REST API, WebSocket, and Web-LLM attack techniques.
| 1 | # API Security |
| 2 | |
| 3 | Test API endpoints for security vulnerabilities across REST, GraphQL, WebSocket, and LLM-integrated APIs. |
| 4 | |
| 5 | ## Techniques |
| 6 | |
| 7 | | Type | Key Vectors | |
| 8 | |------|-------------| |
| 9 | | **GraphQL** | Introspection, batching attacks, nested query DoS, field suggestion | |
| 10 | | **REST API** | BOLA/IDOR, mass assignment, rate limiting, auth bypass, versioning | |
| 11 | | **WebSocket** | Cross-site hijacking, message manipulation, auth flaws | |
| 12 | | **Web-LLM** | Prompt injection via API, excessive agency, data exfiltration | |
| 13 | |
| 14 | ## Workflow |
| 15 | |
| 16 | 1. Discover API endpoints and documentation (Swagger, GraphQL schema) |
| 17 | 2. Map authentication and authorization mechanisms |
| 18 | 3. Test per API type using appropriate techniques |
| 19 | 4. Validate data exposure and access control flaws |
| 20 | 5. Capture evidence with HTTP request/response logs |
| 21 | |
| 22 | ## Reference |
| 23 | |
| 24 | - `reference/graphql*.md` - GraphQL attack techniques and labs |
| 25 | - `reference/scenarios/rest/*.md` - REST API security testing (BOLA/BOPLA, mass assignment, SSPP, content-type confusion) |
| 26 | - `reference/websockets*.md` - WebSocket vulnerability testing |
| 27 | - `reference/web-llm*.md` - Web-LLM attack techniques and labs |