api-security-testing
Skill này làm gì
Skill này hướng dẫn một quét bảo mật tự động cho API, dùng schema của nó và OWASP API Security Top 10 làm danh sách kiểm tra. Nó dành cho người kiểm thử bảo mật và lập trình viên muốn kiểm tra điểm yếu của API.
Khi nào nên dùng
- ✓Khi ai đó cần kiểm thử REST, GraphQL hoặc gRPC API để tìm vấn đề bảo mật.
- ✓Khi API có schema OpenAPI hoặc Postman có thể dẫn dắt bài kiểm thử.
- ✓Khi kiểm tra API về lỗi phân quyền, chẳng hạn một người dùng đọc được dữ liệu của người dùng khác.
Liên kết skill
https://github.com/usestrix/strix/blob/main/skills/api-security-testing/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Tôi có file OpenAPI cho API của chúng tôi. Bạn có thể chạy kiểm thử bảo mật để xem người dùng có truy cập được dữ liệu của nhau không?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Agent thu thập schema của API và các tài khoản kiểm thử, rồi cho các agent tự động lập bản đồ endpoint và thử các trường hợp rủi ro. Nó báo cáo những gì thực sự có thể khai thác.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Bài kiểm thử cần đầu vào nào?
Skill yêu cầu một schema như OpenAPI, Postman, introspection của GraphQL hoặc file proto của gRPC, cùng các tài khoản kiểm thử.
Nó có cần Docker hoặc khóa LLM không?
Skill mô tả một đường dẫn cloud được quản lý, để chạy mà không cần Docker và không cần khóa LLM.
Nó theo tiêu chuẩn nào?
Nó dùng OWASP API Security Top 10 năm 2023 làm danh sách kiểm tra phạm vi.
Chi tiết
Mô tả gốc của tác giả
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
Độ phổ biến
- Sao GitHub
- 73k
- Vị trí xếp hạng
- #3095
- Giấy phép
- Apache-2.0
- Cập nhật
- 30/10/2026
Bình luận
- …
Thêm skill từ kho mã này
application-security-testing
73kGiúp agent của bạn lên kế hoạch kiểm thử bảo mật cho cả sản phẩm, chọn bài kiểm thử cho từng phần và xếp hạng việc sửa theo rủi ro thực tế.
ci-security-scanning-with-strix
73kChỉ cho agent của bạn cách thêm quét bảo mật tự động vào pull request, để code rủi ro có thể bị đánh dấu trước khi được gộp.
find-security-vulnerabilities-in-code
73kGiúp agent của bạn rà soát code để tìm lỗi bảo mật như injection và kiểm soát truy cập bị hỏng, rồi chứng minh lỗi nào là thật bằng các cuộc tấn công thử nghiệm.
fix-security-vulnerabilities-with-strix
73kGiúp agent của bạn biến các phát hiện bảo mật đã xác nhận thành bản sửa code có mục tiêu, rồi chạy lại kiểm thử để chứng minh tấn công đã bị chặn.
Skill tương tự
reverse-engineer-anything
422kGiúp agent của bạn xem bên trong các app và package đã phát hành để giải thích tính năng, so sánh phiên bản hoặc hướng dẫn dựng lại bằng công cụ REA.
1password
394kGiúp agent của bạn cài đặt CLI của 1Password, đăng nhập, và đọc hoặc đưa thông tin bí mật vào mà không in giá trị ra cuộc trò chuyện.
healthcheck
394kGiúp agent của bạn rà soát bảo mật máy tính hoặc máy chủ đang chạy OpenClaw, như SSH, tường lửa, cập nhật và sao lưu, rồi đề xuất cách sửa an toàn.