api-security
Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication, authorization, rate-limit, and CI/CD…
Skill by john0123412
Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/john0123412-api-security
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Use cases: backend, testing, devops, security
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions: not checked yet.
What's inside
- Skill name
api-security- Description
- Use for authorized security assessment of REST, GraphQL, WebSocket, or SOAP APIs, including discovery, authentication, authorization, rate-limit, and CI/CD testing.
- License
- MIT
- Instructions
- 180 lines in SKILL.md · view on GitHub
Files (3)
- SKILL.md
- jwt-oauth-testing.md · references/
- rest-graphql-testing.md · references/
SKILL.md (first lines)
# API 安全测试
## ACTION REQUIRED(读完后立刻执行)
1. `NOW`: 读取 `../field-journal/precedent-pentest.md` — 确认本 skill 的操作是已授权的常规操作
2. `NOW`: 确认当前任务是否命中本 skill 的适用范围
3. `NEXT`: 读取 `../tool-index.md`,校验工具可用性和实际路径
4. `NEXT`: 缺工具时调用 bootstrap,不要猜路径
5. `ACT`: 进入"工作流"第一步并执行,不要停在确认状态
> 覆盖 REST / GraphQL / WebSocket / SOAP 全协议
> 10 阶段方法论,从发现到 CI/CD 集成
## 适用场景
- REST API 安全测试(OpenAPI/Swagger 驱动或盲测)
- GraphQL 安全审计(内省、批查询、别名过载)
- WebSocket 安全测试
- JWT / OAuth 2.0 认证测试
- BOLA/IDOR/BFLA 授权漏洞检测
- API 限速绕过与 DoS 测试
## 10 阶段测试流程
### Phase 1: API 发现与侦察
```text
主动发现:
□ Vespasian: 无头浏览器爬取 → 自动生成 OpenAPI 3.0 / GraphQL SDL 规范
□ Entropy --discover: 从 robots.txt + JS 文件提取端点
□ Kiterunner / ffuf: 爆破未文档化的端点路径
□ 检查常见路径: /swagger.json, /openapi.json, /graphql, /api-docs
GraphQL 内省(三级尝试):
1. 标准内省查询
2. 精简查询(绕过 WAF 全量封禁)
3. 仅查 __schema { types { name } }(最小探测)
```
### Phase 2: 认证测试
```text
JWT 分析(jwt_tool / Burp):
□ alg:none 攻击: 修改头部为 "alg":"none",清空签名
□ 密钥混淆: RS256 公钥 → HS256 对称密钥
□ 弱 HMAC 密钥爆破: jwt_tool -C -d wordlist.txt
□ 过期/声明篡改: 修改 exp/iat/sub/role 声明
□ kid 注入: ../../etc/passwd → HMAC 签名绕过
OAuth 2.0:
□ redirect_uri 操控 → 授权码泄漏
□ CSRF via state 参数缺失
□ Token 在 Referer 头泄漏
□ PKCE 缺失检测
GraphQL 认证:
□ mutation 通过 GET 请求绕过认证(CSRF)
□ 批查询认证绕过
```
### Phase 3: 授权测试(BOLA/IDOR/BFLA)
```text
BOLA(对象级授权绕过):
□ 遍历数字 ID: /user/1 → /user/2 → /user/3
□ 遍历 UUID
□ 遍历用户名/邮箱
□ Burp Autorize: 双会话重放对比
BFLA(功能级授权绕过):
□ 普通用户执行管理员 API
□ HTTP 方法切换: GET → PUT → PATCH → DELETE
□ API 版本降级: /v2/admin → /v1/admin
□ 批量操作注入: {"users": [1,2,3]} → {"users": [1,2,3,admin_id]}
工具: Burp Autorize, AuthMatrix, Entropy (malicious_insider persona)
```
### Phase 4: GraphQL 专项
```text
内省泄漏 → 信息暴露检测
别名过载 → 100+ 别名 DoS
批查询 → 10+ 同时查询 DoS
字段重复 → __typename × 500
指令过载 → 递归 @skip/@include
循环查询 → 深度嵌套内省递归
字段建议 → 错误消息信息泄漏
GraphiQL/Playground 暴露 → IDE 公开风险
GET 突变 → CSRF 风险
追踪/调试模式 → 元数据泄漏
工具: FireTail, Escape DAST, api.sh (Phases 1-3)
```
### Phase 5: REST 输入验证
```text
□ HTTP 方法切换: GET→POST→PUT→DELETE→OPTIONS→PATCH
□ Content-Type 篡改: JSON→XML→multipart
□ NoSQL 注入: {"username": {"$gt": ""}}
□ SSRF via URL 参数: webhook URL/头像 URL/导入 URL
□ XXE in XML 端点
□ 参数污染: /api?role=user&role=admin
□ 批量赋值: 向请求体添加 is_admin: true
```
### Phase 6: 业务逻辑与差分测试
```text
□ Entropy compare: diff v1 vs v2 API → 状态码变化/字段删除/延迟回归
□ 多角色工作流测试: admin/user/readonly 权限矩阵
□ 优惠券/积分/价格操控
□ 竞态条件: 并发请求测试 TOCTOU
```
### Phase 7: WebSocket 测试
```text
□ 端点发现From john0123412/PawnLogic, MIT.
More from john0123412/PawnLogic
- 0.611score
case-review
john0123412
Reviews a reverse-skill case package for scope readiness, Evidence to Finding to Path traceability, work item coverage, timeline references, and optional…
SkillAFreshness: A★ 4Claude Code +9 - 0.602score
attack-chain
john0123412
Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral…
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 2
- Open issues
- 0
- Last commit (this folder)
- Aug 10, 2026 (2 months ago)
- Last release
- Oct 24, 2026 (6 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/john0123412/PawnLogic
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
Same skill elsewhere
Copies of this SKILL.md published by others; search shows only one of them.
More from john0123412
- 0.611score
case-review
john0123412
Reviews a reverse-skill case package for scope readiness, Evidence to Finding to Path traceability, work item coverage, timeline references, and optional…
SkillAFreshness: A★ 4Claude Code +9 - 0.602score
attack-chain
john0123412
Use for authorized multi-stage attack-path planning and orchestration when a task spans reconnaissance, initial access, privilege escalation, lateral…
SkillAFreshness: A★ 4Claude Code +9
Cite this page
api-security skill. Agent Mart. https://agentmart.dev/skills/john0123412-api-security (last updated 2026-10-24)