api-security-testing

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

API Security Testing Workflow

API安全测试工作流

Overview

概述

Specialized workflow for testing REST and GraphQL API security including authentication, authorization, rate limiting, input validation, and API-specific vulnerabilities.
针对REST和GraphQL API安全的专用测试工作流,涵盖身份验证、授权、速率限制、输入验证以及API特有的漏洞检测。

When to Use This Workflow

何时使用此工作流

Use this workflow when:
  • Testing REST API security
  • Assessing GraphQL endpoints
  • Validating API authentication
  • Testing API rate limiting
  • Bug bounty API testing
在以下场景中使用此工作流:
  • 测试REST API安全性
  • 评估GraphQL端点
  • 验证API身份验证机制
  • 测试API速率限制
  • 漏洞赏金计划中的API测试

Workflow Phases

工作流阶段

Phase 1: API Discovery

阶段1:API发现

Skills to Invoke

需调用的技能

  • api-fuzzing-bug-bounty
    - API fuzzing
  • scanning-tools
    - API scanning
  • api-fuzzing-bug-bounty
    - API模糊测试
  • scanning-tools
    - API扫描

Actions

操作步骤

  1. Enumerate endpoints
  2. Document API methods
  3. Identify parameters
  4. Map data flows
  5. Review documentation
  1. 枚举端点
  2. 记录API方法
  3. 识别参数
  4. 映射数据流
  5. 查阅文档

Copy-Paste Prompts

可复制粘贴的提示语

Use @api-fuzzing-bug-bounty to discover API endpoints
Use @api-fuzzing-bug-bounty to discover API endpoints

Phase 2: Authentication Testing

阶段2:身份验证测试

Skills to Invoke

需调用的技能

  • broken-authentication
    - Auth testing
  • api-security-best-practices
    - API auth
  • broken-authentication
    - 身份验证测试
  • api-security-best-practices
    - API身份验证最佳实践

Actions

操作步骤

  1. Test API key validation
  2. Test JWT tokens
  3. Test OAuth2 flows
  4. Test token expiration
  5. Test refresh tokens
  1. 测试API密钥验证
  2. 测试JWT令牌
  3. 测试OAuth2流程
  4. 测试令牌过期机制
  5. 测试刷新令牌

Copy-Paste Prompts

可复制粘贴的提示语

Use @broken-authentication to test API authentication
Use @broken-authentication to test API authentication

Phase 3: Authorization Testing

阶段3:授权测试

Skills to Invoke

需调用的技能

  • idor-testing
    - IDOR testing
  • idor-testing
    - IDOR测试

Actions

操作步骤

  1. Test object-level authorization
  2. Test function-level authorization
  3. Test role-based access
  4. Test privilege escalation
  5. Test multi-tenant isolation
  1. 测试对象级授权
  2. 测试功能级授权
  3. 测试基于角色的访问控制
  4. 测试权限提升
  5. 测试多租户隔离

Copy-Paste Prompts

可复制粘贴的提示语

Use @idor-testing to test API authorization
Use @idor-testing to test API authorization

Phase 4: Input Validation

阶段4:输入验证测试

Skills to Invoke

需调用的技能

  • api-fuzzing-bug-bounty
    - API fuzzing
  • sql-injection-testing
    - Injection testing
  • api-fuzzing-bug-bounty
    - API模糊测试
  • sql-injection-testing
    - 注入测试

Actions

操作步骤

  1. Test parameter validation
  2. Test SQL injection
  3. Test NoSQL injection
  4. Test command injection
  5. Test XXE injection
  1. 测试参数验证
  2. 测试SQL注入
  3. 测试NoSQL注入
  4. 测试命令注入
  5. 测试XXE注入

Copy-Paste Prompts

可复制粘贴的提示语

Use @api-fuzzing-bug-bounty to fuzz API parameters
Use @api-fuzzing-bug-bounty to fuzz API parameters

Phase 5: Rate Limiting

阶段5:速率限制测试

Skills to Invoke

需调用的技能

  • api-security-best-practices
    - Rate limiting
  • api-security-best-practices
    - 速率限制测试

Actions

操作步骤

  1. Test rate limit headers
  2. Test brute force protection
  3. Test resource exhaustion
  4. Test bypass techniques
  5. Document limitations
  1. 测试速率限制头
  2. 测试暴力破解防护
  3. 测试资源耗尽攻击
  4. 测试绕过技术
  5. 记录限制机制

Copy-Paste Prompts

可复制粘贴的提示语

Use @api-security-best-practices to test rate limiting
Use @api-security-best-practices to test rate limiting

Phase 6: GraphQL Testing

阶段6:GraphQL测试

Skills to Invoke

需调用的技能

  • api-fuzzing-bug-bounty
    - GraphQL fuzzing
  • api-fuzzing-bug-bounty
    - GraphQL模糊测试

Actions

操作步骤

  1. Test introspection
  2. Test query depth
  3. Test query complexity
  4. Test batch queries
  5. Test field suggestions
  1. 测试自省机制
  2. 测试查询深度
  3. 测试查询复杂度
  4. 测试批量查询
  5. 测试字段建议

Copy-Paste Prompts

可复制粘贴的提示语

Use @api-fuzzing-bug-bounty to test GraphQL security
Use @api-fuzzing-bug-bounty to test GraphQL security

Phase 7: Error Handling

阶段7:错误处理测试

Skills to Invoke

需调用的技能

  • api-security-best-practices
    - Error handling
  • api-security-best-practices
    - 错误处理测试

Actions

操作步骤

  1. Test error messages
  2. Check information disclosure
  3. Test stack traces
  4. Verify logging
  5. Document findings
  1. 测试错误消息
  2. 检查信息泄露
  3. 测试堆栈跟踪
  4. 验证日志记录
  5. 记录发现的问题

Copy-Paste Prompts

可复制粘贴的提示语

Use @api-security-best-practices to audit API error handling
Use @api-security-best-practices to audit API error handling

API Security Checklist

API安全检查清单

  • Authentication working
  • Authorization enforced
  • Input validated
  • Rate limiting active
  • Errors sanitized
  • Logging enabled
  • CORS configured
  • HTTPS enforced
  • 身份验证功能正常
  • 授权机制已生效
  • 输入已完成验证
  • 速率限制已启用
  • 错误信息已脱敏
  • 日志记录已开启
  • CORS已正确配置
  • HTTPS已强制启用

Quality Gates

质量门禁

  • All endpoints tested
  • Vulnerabilities documented
  • Remediation provided
  • Report generated
  • 所有端点已完成测试
  • 漏洞已记录在案
  • 已提供修复建议
  • 已生成测试报告

Related Workflow Bundles

相关工作流包

  • security-audit
    - Security auditing
  • web-security-testing
    - Web security
  • api-development
    - API development
  • security-audit
    - 安全审计
  • web-security-testing
    - Web安全测试
  • api-development
    - API开发