mejbaurbahar/awesome-qa-agent-skills/42crunch-api-security-testing
Claude Code and agent skill by mejbaurbahar/awesome-qa-agent-skills
- community
Checking that the SKILL.md file is still in the repository.
Use when auditing, scanning, or remediating OpenAPI/Swagger API definitions for security vulnerabilities — 42Crunch audit scoring, OWASP API Security Top 10 compliance, BOLA/BFLA prevention, schema strictness, and shift-left API CI/CD testing.
Install
npx vskill@latest install mejbaurbahar/awesome-qa-agent-skills/42crunch-api-security-testingSKILL.md
The same SKILL.md was published earlier as mejbaurbahar/software-tester-skills/42crunch-api-security-testing.
42Crunch API Security Testing
Overview
42Crunch provides automated, contract-driven API security testing. It enforces security at the OpenAPI/Swagger definition layer and verifies live implementation conformance, enabling an automated Audit -> Scan -> Remediate -> Validate cycle directly within AI-assisted developer workflows.
The Continuous API Security Loop
1. OpenAPI Security Audit Criteria (Scoring 0–100)
A high 42Crunch audit score requires comprehensive, strict contract definitions:
Authentication & Authorization
- Every endpoint (except explicit public endpoints like login/register) must define a
securityrequirement. - Global security definitions must declare granular scopes (e.g.
read:users,write:orders). - Unauthenticated endpoints must explicitly set
security: []with documented rationale.
Strict Schema Definition & Input Constraints
- Strings: Must specify
maxLengthand where applicable a restrictivepattern(regex) orformat(e.g.,uuid,email,uri). - Numbers/Integers: Must specify
minimumandmaximumboundaries to prevent integer overflows or resource exhaustion. - Arrays: Must specify
maxItemsandminItemsto prevent unbounded payload attacks (DoS). - Objects: Must specify
additionalProperties: falseto mitigate Mass Assignment vulnerabilities. - Enums: Restrict input values to known permitted sets rather than arbitrary strings.
Response Contracts
- Explicit definitions for all HTTP response codes:
200/201/204with strict output schemas.400 Bad Requestwith standardized validation error schema.401 Unauthorized&403 Forbiddenfor auth failures.404 Not Foundfor resource lookups.429 Too Many Requestswith rate limit headers.500 Internal Server Errorwith generic, non-leaking error responses (never stack traces).
2. OWASP API Security Top 10 (2023) Mapping
| Risk | Name | 42Crunch Verification Rule | |
|---|---|---|---|
| API1 | BOLA (Broken Object Level Authorization) | Enforce path parameter format (e.g. uuid pattern), verify auth tokens on object IDs, assert tenant isolation. | |
| API2 | Broken Authentication | Flag weak schemes (e.g. Basic Auth over HTTP); require OAuth2/Bearer JWT with expiration; rate limit login endpoints. | |
| API3 | Broken Object Property Level Auth | Prevent Mass Assignment by enforcing additionalProperties: false on request bodies and filtering sensitive attributes (e.g. role, isAdmin) from response schemas. | |
| API4 | Unrestricted Resource Consumption | Mandate maxLength, maxItems, pagination query parameters (limit with max boundary), and 429 rate limiting contracts. | |
| API5 | BFLA (Broken Function Level Auth) | Enforce strict role/scope requirements on administrative endpoints (e.g., /admin/* requires admin scope). | |
| API6 | Unrestricted Sensitive Business Flows | Identify high-frequency critical endpoints (e.g. checkout, coupon-redeem, password-reset) requiring CAPTCHA or velocity throttling. | |
| API7 | Server-Side Request Forgery (SSRF) | Restrict URL/webhook parameter schemas with strict regex patterns; disallow loopback/internal CIDR ranges. | |
| API8 | Security Misconfiguration | Disallow wildcard CORS (*), mandate HTTPS-only server URLs, remove detailed stack traces from 5xx schemas. | |
| API9 | Improper Inventory Management | Flag undocumented/deprecated API versions; enforce API version prefixes (/v1/, /v2/); remove debug endpoints. | |
| API10 | Unsafe Consumption of APIs | Validate responses from third-party integrations with strict schema filters before internal processing. |
3. Remediation Patterns (Before vs. After)
Example 1: Preventing Mass Assignment & Unbounded Strings
❌ Vulnerable Spec (Audit Score: ~35/100)
✅ Remediated Spec (Audit Score: ~95/100)
4. Automation & CI/CD Shift-Left
GitHub Actions Integration
CLI Quick Audit
When 42Crunch CLI (42c) or VS Code extension is installed:
5. Review Checklist for Agents
When reviewing or authoring an API contract:
- [ ] Is
securitydefined at root and per-endpoint? - [ ] Does every string have
maxLengthand apatternorformat? - [ ] Does every numeric value have
minimumandmaximum? - [ ] Does every array have
maxItems? - [ ] Is
additionalProperties: falseset on all request payload schemas? - [ ] Are all error status codes (
400,401,403,404,429,500) documented with schemas? - [ ] Are internal/admin paths guarded by distinct role scopes?
- [ ] Has the audit score achieved ≥ 85/100?
Security
- Security scanPassed, 90 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/42crunch-api-security-testing/SKILL.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/mejbaurbahar/awesome-qa-agent-skills/42crunch-api-security-testing)