---
name: api-security-testing-79da477c8928
description: "Security testing checklist for HTTP APIs—authn/z, input validation, rate limits, sensitive data exposure, and common OWASP API issues. Use when reviewing or testing REST/GraphQL endpoints before release."
allowed-tools: Read, Glob, Grep
---

# API security testing

## Preconditions

- Test in **non-production** unless explicitly authorized.
- Use dedicated test accounts; never real customer PII in payloads.

## Test matrix (prioritized)

### Authentication and session

- [ ] Missing/invalid token rejected (401)
- [ ] Expired or revoked credentials rejected
- [ ] Session fixation / cookie flags (HttpOnly, Secure, SameSite) where applicable

### Authorization

- [ ] Horizontal: user A cannot access user B's resource IDs
- [ ] Vertical: non-admin cannot invoke admin routes
- [ ] IDOR on path/query/body identifiers

### Input and abuse

- [ ] Oversized payloads rejected
- [ ] Injection surfaces parameterized (SQL, command, template)
- [ ] Rate limiting on auth and expensive endpoints

### Data exposure

- [ ] Errors do not leak stack traces or secrets in prod-like config
- [ ] Responses omit internal fields (tokens, hashes, full PAN)
- [ ] Pagination does not bypass auth filters

### Transport and config

- [ ] HTTPS enforced; HSTS where applicable
- [ ] CORS not `*` with credentials
- [ ] Security headers on API gateway if present

### Web-facing surfaces (when API serves or pairs with UI)

- [ ] CSP or explicit script policy documented
- [ ] CSRF protection on cookie-based mutations
- [ ] Clickjacking headers (`X-Frame-Options` or CSP `frame-ancestors`) where relevant
- [ ] File upload: type/size limits, virus scan hook if required by policy

## Reporting

For each finding: endpoint, steps, impact, severity, remediation, retest status.

## Boundaries

- Defensive testing only; no unauthorized production scanning.
- For deep pen-test, engage formal AppSec process.


---
Source attribution: charlieviettq
Original project: https://github.com/charlieviettq/awesome-agent-skill/blob/c567ae426d55fa498e919fc0f5a37c582d5c7a2c/.claude/skills/api-security-testing/SKILL.md
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Dave AI.

## Upstream license notice

MIT License

Copyright (c) 2026 charlieviettq

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Dave AI resource metadata

Creator / publisher: charlieviettq
Original project: https://github.com/charlieviettq/awesome-agent-skill/blob/c567ae426d55fa498e919fc0f5a37c582d5c7a2c/.claude/skills/api-security-testing/SKILL.md
Attribution basis: Source repository record

Fields of work: Development & Engineering
Roles: Security Engineer, QA / Test Engineer, Backend Developer
Specialties: API, Testing
Tools: Read, Glob, Grep
Country applicability: Country not specified
Classification basis: Source category, role and specialization labels
Instruction SHA-256: 474629ab12016e64fc80dd904b123956b88acfcb263d0c9df0fd537a228983e1
