api-security-testing
できること
このスキルは、APIのスキーマとOWASP API Security Top 10をチェックリストとして使い、自動のセキュリティスキャンを導きます。APIの弱点を調べたいセキュリティテスターや開発者向けです。
使う場面
- ✓REST、GraphQL、gRPCのAPIのセキュリティ問題をテストする必要があるとき。
- ✓OpenAPIかPostmanのスキーマがあり、テストの手がかりにできるとき。
- ✓認可の欠陥、例えばあるユーザーが別のユーザーのデータを読めてしまうことを確認したいとき。
スキルのリンク
https://github.com/usestrix/strix/blob/main/skills/api-security-testing/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“私たちのAPIのOpenAPIファイルがあります。ユーザーが互いのデータにアクセスできないかを確認するセキュリティテストを実行してください。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、APIのスキーマとテスト用のアカウントを集めます。その後、自動のエージェントがエンドポイントをマッピングし、危険なケースを試します。実際に悪用できたものを報告します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Security-test an API
APIs fail differently from web UIs: there is no rendered surface to crawl, the interesting bugs are authorization-shaped rather than injection-shaped, and the same endpoint behaves differently per token. This workflow targets those specifics with Strix's autonomous agents, using the current OWASP API Security Top 10 (2023) as the coverage checklist. For the web-app equivalent, the current edition is the OWASP Top 10:2025 — see owasp-top-10-testing.
Install, LLM setup, full CLI flags, and the managed-cloud path are in the penetration-testing-with-strix skill. Read it if strix --version fails or the target is not an API. For a run with no Docker and no LLM key, the same binary drives the managed platform: strix cloud login, then strix cloud scans start ... (details in managed-pentesting-with-strix).
1. Gather what the agents need
APIs are near-impossible to test blind, so collect first:
| Input | Why it matters |
|---|---|
Schema — OpenAPI/Swagger file, Postman collection, GraphQL endpoint (introspection), or a gRPC .proto |
Turns guesswork into full endpoint enumeration. Biggest single win in coverage. An OpenAPI/Swagger or Postman spec (.json/.yaml/.yml) is a target Strix takes directly; a .proto is not, so pass it with --workspace-file. |
| Two sets of credentials/tokens, ideally in different tenants | BOLA/IDOR — API1:2023, still the #1 API risk — can only be proven by accessing tenant A's objects with tenant B's token. |
| A low-privilege and a high-privilege token | Required to prove broken function-level authorization (API5:2023 — a user calling admin-only routes). |
| Example object IDs | Lets agents test ID tampering immediately instead of hunting for valid identifiers. |
| Out-of-scope routes | Payments, mass notification, destructive admin endpoints. |
| Rate limits / WAF in front of the API | Avoids agents burning budget on throttled requests; mention them so testing adapts. |
Ask the user for anything missing — do not fabricate tokens or scan an API they do not own.
2. Run the scan
Pass the spec as a target, not as prose in the instruction — Strix parses OpenAPI/Swagger (.json/.yaml) and Postman collection exports directly, so the agents start from the real endpoint list:
strix -n -t ./openapi.yaml -t https://api.staging.example.com --max-budget 20 \
--instruction "Tenant A token: <tokenA> (org 1111, user id 11, order id 501).
Tenant B token: <tokenB> (org 2222, user id 22).
Admin token: <tokenAdmin>.
Focus: BOLA across orgs (API1), function-level authz on /admin/* (API5), object property level authz on PATCH /users/{id} — both mass assignment and over-exposed fields in list responses (API3), unrestricted resource consumption (API4).
Out of scope: POST /billing/*, POST /notifications/broadcast."
- Postman instead of OpenAPI: a collection export works as a target (
-t ./collection.postman_collection.json), or pull one live with-t postman://<collection-uuid>(optionally"postman://<collection-uuid>?env=<environment-uuid>"), which needsPOSTMAN_API_KEYin the environment. - Many services at once: put one target per line in a file and pass
--target-list ./targets.txt, repeatable and combinable with-t. - Add the backend source for depth:
-t ./services/api -t https://api.staging.example.com. With code access the agents can reason about authorization checks and object ownership rather than inferring them from responses. - gRPC: target the endpoint and pass the definition as a workspace file,
-t https://grpc.staging.example.com --workspace-file ./service.proto. Only.json,.yaml, and.ymlspecs are recognized as targets, so-t ./service.protofails with "Path exists but is not a directory". - GraphQL: point at the GraphQL endpoint and say whether introspection is enabled; call out that you want batching/aliasing abuse, depth/complexity limits, and per-field authorization tested.
- Internal/private APIs unreachable from your machine: use the managed platform's network connector — see managed-pentesting-with-strix.
- Use
--instruction-filewhen the credential/context block gets long, and keep tokens out of shell history and out of committed files. - Supporting files the agents should read but not test, such as an endpoint wordlist or handwritten notes about the tenancy model: pas
よくある質問
テストにはどんな入力が必要ですか?
このスキルは、OpenAPI、Postman、GraphQLのイントロスペクション、gRPCのprotoファイルなどのスキーマと、テスト用のアカウントを求めます。
DockerやLLMのキーは必要ですか?
このスキルは、Dockerもモデルのキーも不要な、マネージドなクラウドの経路を説明しています。
どの規格に従っていますか?
2023年版のOWASP API Security Top 10を、対象範囲のチェックリストとして使っています。
詳細
作者による元の説明
Security-test a REST, GraphQL, or gRPC API with Strix — autonomous agents that enumerate endpoints from an OpenAPI/GraphQL schema (or by crawling), then actually exploit the API-specific vulnerability classes in the OWASP API Security Top 10 (2023) — broken object-level authorization (BOLA/IDOR), broken object property level authorization (excessive data exposure and mass assignment), broken function-level authorization, unrestricted resource consumption, SSRF, injection, and auth/token flaws. Every finding comes with a working proof-of-concept request. Use when the user asks to pentest, secur
repo: usestrix/strix
人気
- GitHubのスター
- 73k
- ランキング
- #3095
- ライセンス
- Apache-2.0
- 更新日
- 2026/10/30
コメント
- …
このリポジトリの他のスキル
application-security-testing
73kエージェントが製品全体のセキュリティテストを計画し、各部分に適したテストを選んで実行し、修正を実際のリスクの順に並べるよう支援します。
ci-security-scanning-with-strix
73kエージェントがプルリクエストに自動のセキュリティスキャンを追加する方法を示し、マージの前に危険なコードにフラグを立てられるようにします。
find-security-vulnerabilities-in-code
73kエージェントがインジェクションや壊れたアクセス制御などのセキュリティの欠陥についてコードを確認し、テスト攻撃で実際に機能する問題を証明するよう支援します。
fix-security-vulnerabilities-with-strix
73kエージェントが、確認されたセキュリティの問題を的を絞ったコードの修正に変え、テストを再度実行して、各攻撃がもう機能しないことを証明するよう支援します。
似ているスキル
reverse-engineer-anything
422kREAツールを使って、出荷済みのアプリやパッケージの中身を調べ、機能の説明、版の比較、再構築の手順をエージェントが支援します。
1password
394k1Password CLIをセットアップし、サインインして、秘密情報の値を会話に表示せずに読み取ったり注入したりするようエージェントを支援します。
healthcheck
394kOpenClawを動かすコンピューターやサーバーを、SSH、ファイアウォール、更新、バックアップなどのセキュリティリスクについて監査し、安全な修正案を提案するようエージェントを支援します。