api-authorization-testing
Skill0 starsChanged 11 days agoMITView on GitHub
Test API authorization defensively — broken object-level authorization (BOLA/IDOR), broken function-level authorization, broken object property level authorization (mass assignment, excessive data exposure) and tenant isolation — with multi-user test matrices in authorized environments. Use when validating an API before release, investigating a suspected IDOR, or building automated authorization regression tests.
In this repository273 other files it gives its agents.
- ad-attack-path-analysisSkill
- adcs-security-reviewSkill
- ad-privileged-access-reviewSkill
- dcsync-detectionSkill
- gpo-security-reviewSkill
- kerberos-attack-detectionSkill
- agent-tool-permission-reviewSkill
- ai-incident-responseSkill
- llm-gateway-controlsSkill
- llm-security-evaluationSkill
- mcp-server-security-reviewSkill
- model-artifact-securitySkill
- prompt-injection-reviewSkill
- rag-security-reviewSkill
- api-abuse-detectionSkill
- api-inventorySkill
- api-schema-securitySkill
- dast-baselineSkill
- sast-triageSkill
- sca-dependency-riskSkill
- secure-code-reviewSkill
- security-requirementsSkill
- threat-modelingSkill
- asset-criticality-tieringSkill
- asset-inventory-reconciliationSkill
- external-attack-surface-reviewSkill
- shadow-it-discoverySkill
- aws-credential-compromiseSkill
- aws-iam-reviewSkill
- aws-org-guardrailsSkill
- cloudtrail-investigationSkill
- guardduty-triageSkill
- s3-exposure-reviewSkill
- azure-activity-investigationSkill
- azure-rbac-reviewSkill
- conditional-access-reviewSkill
- entra-audit-investigationSkill
- entra-signin-investigationSkill
- backup-assuranceSkill
- critical-service-mappingSkill
- ransomware-recoverySkill
- recovery-exerciseSkill
- cloud-exposure-reviewSkill
- cloud-incident-responseSkill
- cloud-logging-baselineSkill
- cloud-posture-assessmentSkill
- audit-evidence-packageSkill
- continuous-control-monitoringSkill
- control-mappingSkill
- control-testing-samplingSkill
- container-incidentSkill
- dockerfile-hardeningSkill
- image-scanningSkill
- runtime-detection-falcoSkill
- db-audit-loggingSkill
- db-exfiltration-investigationSkill
- db-hardeningSkill
- db-privilege-reviewSkill
- data-classificationSkill
- data-discoverySkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
1 rule. About 0 are common, 1 is distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 45
Only in environments and accounts you are authorized to test.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Authorization Testing
OWASP API Top 10 2023: API1 BOLA, API3 Broken Object Property Level Authorization, API5 Broken Function Level Authorization — the most common serious API flaws.
Test setup (staging or authorized test tenant)
- At least two users per role in two different tenants:
userA@tenant1,userB@tenant1,userC@tenant2, plus an admin and an unauthenticated client. - Objects owned by each user (orders, documents, profiles).
- Capture requests from the app/spec (Burp/ZAP proxy, OpenAPI).
Test matrix
| Test | Method | Expected |
| BOLA | Replay GET/PUT/DELETE /orders/{idOfUserA} with userB and userC tokens | 403/404, no data, logged |
| ID guessability | Are IDs sequential? UUIDs don't fix BOLA but reduce enumeration | Authorization still enforced |
| Function level | Call admin endpoints (/admin/*, POST /users/{id}/roles) with user token; try HTTP method switching (GET→DELETE) | 403 |
| Mass assignment | Add fields to updates ("role":"admin", "tenantId":"other", "price":0, "isVerified":true) | Ignored or rejected |
| Excessive data exposure | Inspect responses for fields not shown in UI (password hashes, tokens, other users' PII) | Only necessary fields |
| Tenant isolation | Use tenant-scoped IDs across tenants; filter params (?tenant=) manipulation | Denied |
| GraphQL | Query objects by ID via nested resolvers; introspection in prod | Per-resolver authorization |
Example with curl:
curl -s -H "Authorization: Bearer $TOKEN_USER_B" https://staging.example.com/api/v2/orders/1001 -o /dev/null -w '%{http_code}\n'Automate as integration tests in CI (parametrized over user × object × endpoint) so regressions are caught.
Fix guidance
Enforce authorization in a central layer using the authenticated principal (never IDs from the client to determine ownership), deny by default, response DTO allow-lists, schema validation rejecting unknown fields.
Safety
Only in environments and accounts you are authorized to test; do not access real customer data — if a production IDOR is found during incident work, stop, record minimal evidence, and escalate.
Related skills
api-schema-security, secure-code-review, dast-baseline, api-abuse-detection
References
- OWASP API Security Top 10 2023: https://owasp.org/API-Security/editions/2023/en/0x11-t10/
- OWASP Authorization Cheat Sheet: https://cheatsheetseries.owasp.org/cheatsheets/Authorization_Cheat_Sheet.html
- OWASP WSTG Authorization Testing: https://owasp.org/www-project-web-security-testing-guide/
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

