api-security — скилл для Claude Code: что делает и как установить
Скилл api-security проверяет API на уязвимости REST, GraphQL, WebSocket и Web-LLM. Помогает находить BOLA, инъекции промптов и ошибки авторизации на больших корпусах запросов.
MIT 220 установок ★ 632 обновлён 2026-07-29
npx skills add transilienceai/communitytools --skill api-security -a claude-codeЧто делает api-security
Скилл систематизирует аудит безопасности эндпоинтов. Он покрывает интроспекцию и вложенные запросы в GraphQL, обход авторизации и массовое назначение в REST, перехват сессий в WebSocket, а также утечки данных и чрезмерные полномочия в интерфейсах к LLM.
Для работы с объёмными спецификациями Swagger, дамповыми коллекциями Postman или HAR предусмотрен запуск локальных скриптов. Скрипт python3 tools/fixture_ingest.py парсит операции в фикстуры со снятой авторизацией, а python3 tools/auth_replay_harness.py прогоняет матрицу прав по ролям для фиксации BOLA и BFLA.
Без установленного Python 3 и подготовленных тестовых токенов пакетный прогон авторизационной матрицы не запустится.
Какие задачи решает
- Найти BOLA и IDOR при пакетной проверке эндпоинтов REST
- Проверить схему GraphQL на batching-атаки и глубокую вложенность запросов
- Протестировать WebSocket-каналы на подмену сообщений и обход ролей
- Сконвертировать дамп HAR или Postman в нормализованные фикстуры
Примеры запросов агенту
- Проанализируй спецификацию openapi.yaml на уязвимости BOLA и ошибки разграничения ролей
- Запусти fixture_ingest.py для файла postman_collection.json и собери матрицу запросов
- Проверь эндпоинт GraphQL на интроспекцию и риск атак вложенными запросами
Как установить api-security
1Через Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill api-security -a claude-code2Вручную: положить файлы
~/.claude/skills/api-security/SKILL.mdПапка скилла целиком; для одного проекта — .claude/skills/api-security/
1Через Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill api-security -a codex2Вручную: положить файлы
.agents/skills/api-security/SKILL.mdДля всех проектов — ~/.agents/skills/
1Через Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill api-security -a cursor2Вручную: положить файлы
.cursor/skills/api-security/SKILL.mdCursor читает и .agents/skills/, и .claude/skills/
1GitHub CLI
gh skill install transilienceai/communitytools skills/api-security2Вручную: положить файлы
.github/skills/api-security/SKILL.md1Через Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill api-security -a gemini-cli2Командой платформы
gemini skills install https://github.com/transilienceai/communitytools --path skills/api-securityВручную: положить файлы
.devin/skills/api-security/SKILL.mdСтарый путь .windsurf/skills/ тоже читается
Через Skills CLI (Vercel)
npx skills add transilienceai/communitytools --skill api-security -a opencodeClaude.ai
Упакуйте папку в zip и загрузите в Settings → Capabilities → Skills
По шагам, с командами для каждой платформы: Как установить скилл в Claude Code: пять способов
Вопросы об api-security
Как установить api-security в Claude Code?
Выполните команду npx skills add transilienceai/communitytools --skill api-security -a claude-code. Файлы скилла сохранятся по пути ~/.claude/skills/api-security/SKILL.md.
Какие типы API проверяет api-security?
Скилл содержит сценарии тестирования для REST API, OData, схем GraphQL, соединений WebSocket и интеграций с LLM.
Как скилл работает с большими коллекциями Swagger или HAR?
Он нормализует пути в fixtures.json утилитой python3 tools/fixture_ingest.py, убирает зашитую авторизацию и перезапускает запросы по ролям через python3 tools/auth_replay_harness.py.
Исходный текст
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