Skip to main content
skill CX Codex

api-security — Claude Code skill: what it does, how to install

api-security is a Claude Code skill that tests REST, GraphQL, WebSocket, and Web-LLM interfaces for authorization flaws and injection bugs across large endpoint collections.

MIT 220 installs ★ 632 updated 2026-07-29

Install into Claude Code · Skills CLI (Vercel) All methods and platforms ↓
npx skills add transilienceai/communitytools --skill api-security -a claude-code
Open on GitHub

What api-security does

This skill guides API security assessments across modern protocols. It provides attack vectors for GraphQL introspection and nested queries, REST BOLA and mass assignment, WebSocket cross-site hijacking, and prompt injections via LLM endpoints.

For large Swagger specs, Postman files, or HAR captures, testing relies on deterministic test fixtures. You run python3 tools/fixture_ingest.py to strip hardcoded credentials into a clean fixture file, then execute python3 tools/auth_replay_harness.py to replay calls across roles and log evidence for authorization bypasses.

Without Python 3 and pre-acquired role tokens, automated matrix replay over large test suites will fail to run.

What it helps with

  • Detect BOLA and authorization bypasses in REST APIs
  • Audit GraphQL endpoints for introspection and nested query denial of service
  • Inspect WebSocket connections for session hijacking and channel authorization flaws
  • Convert OpenAPI specs and HAR captures into reproducible test fixtures

Example prompts for the agent

  • Audit openapi.yaml for BOLA and mass assignment risks across user roles
  • Parse postman_collection.json using fixture_ingest.py to generate endpoint fixtures
  • Check our GraphQL gateway for introspection exposure and batching attack vectors

How to install api-security

1Skills CLI (Vercel)

npx skills add transilienceai/communitytools --skill api-security -a claude-code

2Manually: put the files in place

~/.claude/skills/api-security/SKILL.md

Copy the whole skill folder; for one project use .claude/skills/api-security/

Step by step, with commands for each platform: How to install skills in Claude Code: five ways

Questions about api-security

How to install api-security in Claude Code?

Run npx skills add transilienceai/communitytools --skill api-security -a claude-code. The skill will be placed into ~/.claude/skills/api-security/SKILL.md.

What protocols does api-security cover?

It includes testing guides for REST, GraphQL, WebSocket, and LLM-integrated APIs, along with specific scenarios for OData and AWS Cognito.

How does api-security test large API corpora?

It uses python3 tools/fixture_ingest.py to create normalized fixtures, removes hardcoded auth tokens, and replays permissions across roles using python3 tools/auth_replay_harness.py.

Source text

SKILL.md · MIT
---
name: api-security
description: API security testing - GraphQL, REST API, WebSocket, and Web-LLM attack techniques.
---

# API Security

Test API endpoints for security vulnerabilities across REST, GraphQL, WebSocket, and LLM-integrated APIs.

## Techniques

| Type | Key Vectors |
|------|-------------|
| **GraphQL** | Introspection, batching attacks, nested query DoS, field suggestion |
| **REST API** | BOLA/IDOR, mass assignment, rate limiting, auth bypass, versioning |
| **WebSocket** | Cross-site hijacking, message manipulation, auth flaws |
| **Web-LLM** | Prompt injection via API, excessive agency, data exfiltration |

## Workflow

1. Discover API endpoints and documentation (Swagger, GraphQL schema)
2. Map authentication and authorization mechanisms
3. Test per API type using appropriate techniques
4. Validate data exposure and access control flaws
5. Capture evidence with HTTP request/response logs

## API at scale (offline corpus / fixture-driven)

For a large or offline API surface — a 2000+ path Swagger, a Postman corpus, a HAR capture — do NOT hand-build the coverage machinery per engagement. Drive it deterministically:

1. **Ingest the corpus → per-endpoint fixtures:** `python3 tools/fixture_ingest.py <openapi|postman|har> -o fixtures.json` normalizes every operation into a request template (method, url with path params filled, sampled body, `object_ref` for id-like path params, security requirement) and STRIPS baked-in auth (the harness injects tokens). This is what turns a large (thousands-of-operations) OpenAPI/Postman corpus into a resumable matrix instead of an untested pile.
2. **Acquire per-role sessions:** via [`authenticated-session-acquisition`](../authenticated-session-acquisition/SKILL.md) (MFA/OTP/SRP → reusable tokens) into the harness's token store.
3. **Replay the per-role authz matrix:** `python3 tools/auth_replay_harness.py --requests fixtures.json --tokens tokens.json [--proxy <vantage>]` replays every endpoint under every role (and cross-tenant), flags BOLA/BFLA where a role got `authorized` on an object/action it should not, and logs an `evidence_id` per (endpoint × role). Egress-route via the provisioned vantage for allowlisted APIs.
4. **Protocol-specific authz:** OData ([`odata-deep-authz.md`](reference/scenarios/rest/odata-deep-authz.md)), Cognito ([`cognito-unauth-and-srp.md`](reference/scenarios/rest/cognito-unauth-and-srp.md)), authenticated WebSocket ([`authenticated-per-role-authz.md`](reference/scenarios/websocket/authenticated-per-role-authz.md)).

The batch is resumable (checkpoint the harness results) so flapping auth never zeroes the run — the recurring at-scale gap. Run the FULL matrix so a clean result is an evidenced negative, not an untested surface.

## Reference

- `reference/graphql*.md` - GraphQL attack techniques and labs
- `reference/scenarios/rest/*.md` - REST API security testing (BOLA/BOPLA, mass assignment, SSPP, content-type confusion)
  - [`scenarios/rest/odata-deep-authz.md`](reference/scenarios/rest/odata-deep-authz.md) - OData `$metadata` enum + `$filter`/`$orderby`/`$expand` cross-tenant BOLA & injection
  - [`scenarios/rest/cognito-unauth-and-srp.md`](reference/scenarios/rest/cognito-unauth-and-srp.md) - Cognito UNSIGNED unauthenticated posture (self-signup/enumeration) + SRP authenticated session
- `reference/websockets*.md` - WebSocket vulnerability testing
  - [`scenarios/websocket/authenticated-per-role-authz.md`](reference/scenarios/websocket/authenticated-per-role-authz.md) - authenticated per-role relay: BOLA/BFLA/channel-authz over the socket
- `reference/web-llm*.md` - Web-LLM attack techniques and labs

© transilienceai · MIT · transilienceai/communitytools

Similar skills

All skills for Security →

From the same set42

The whole set →
osint osint — a skill for passive intelligence gathering across code repositories, developer accounts, and exposed secrets. Discovers company repositories, scans commit history for sensitive data, maps API endpoints and internal infrastructure. CX Codex +1 251installs reconnaissance Runs domain reconnaissance: subdomains, open ports, endpoints and APIs, then sorts the attack surface by risk. CX Codex +1 248installs cve-poc-generator The cve-poc-generator skill researches a CVE, writes a safe Python PoC, and produces a vulnerability report. Use it when you need sourced verification and remediation details. CX Codex +1 236installs social-engineering social-engineering is a Claude Code skill for planning authorized tests of human-factor security. It covers phishing, pretexting, voice-based attacks, and physical security checks. CX Codex +1 224installs web-app-logic web-app-logic — a skill for finding vulnerabilities in web application logic that automated scanners miss: workflow bypass, race conditions, access control flaws, cache poisoning, and information disclosure. CX Codex +1 219installs source-code-scanning source-code-scanning guides automated SAST, CVE scanning across project dependencies, and secrets detection to locate vulnerabilities before deployment. CX Codex +1 217installs techstack-identification techstack-identification is a Claude Code skill that finds a company’s technology stack from public signals. It delegates research to specialist sub-skills and combines their findings in a report. CX Codex +1 215installs hackthebox A skill for HackTheBox competitions that spins up machines, handles credentials, delegates attacks to subagents, and posts breach reports to Slack. CX Codex +1 213installs

Project sponsors

Companies that keep this analytics open