api-security
/api-security
Secure an API by enforcing per-object authorization, per-caller quota, and schema-validated input on every endpoint. Use when building or reviewing an HTTP or GraphQL API that serves authenticated users, machine clients, or partner integrations.
- Author
- Amey-Thakur ↗
- Repository
- AI-SKILLS ↗
- Licence
- MIT
- Last repository change
- 05.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 05.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Secure an API by enforcing per-object authorization, per-caller quota, and schema-validated input on every endpoint. Use when building or reviewing an HTTP or GraphQL API that serves authenticated users, machine clients, or partner integrations.
Original author description
Secure an API by enforcing per-object authorization, per-caller quota, and schema-validated input on every endpoint. Use when building or reviewing an HTTP or GraphQL API that serves authenticated users, machine clients, or partner integrations.
How it works
- Method
- Checks
- Boundaries
SKILL.md preview
--- name: api-security description: Secure an API by enforcing per-object authorization, per-caller quota, and schema-validated input on every endpoint. Use when building or reviewing an HTTP or GraphQL API that serves authenticated users, machine clients, or partner integrations. --- # API security Every endpoint makes a silent promise about who may touch which object and in what shape. The flaws that dominate the OWASP API Top 10 are dull, not clever: a handler that trusts the ID in the path, a parser that swallows fields it was never told about, an endpoint with no ceiling that one client drains. Each one ships green through functional tests and breaks on the first deliberate probe. ## Method 1. **Authorize the object, not only the route.** Once the caller is authenticated, verify this caller may access this exact record before you return it. `GET /invoices/5567` must confirm invoice 5567 belongs to the token's tenant. Broken object-level authorization (BOLA) is the most exploited API flaw, and route middleware never sees the record ID. 2. **Validate the body against a closed schema.** Model every request with Zod, Pydantic, or JSON Schema that pins types, formats, bounds, and `additionalProperties: false`. Reject unknown keys outright so a client cannot slip `is_admin: true` into a profile update that mass-assigns. 3. **Serialize through an output allowlist.** Build responses from an explicit field list, never the raw ORM row. Dumping the whole record leaks `password_hash`, internal flags, and columns from joined tables. 4. **Meter every caller and weight expensive calls.** Give each token a rate bucket, charge search and export more than a point read, and cap page size and GraphQL query depth so one call cannot pull 50,000 rows or nest resolvers without limit. 5. **Issue machine clients scoped, expiring credentials.** Grant API keys or OAuth client-credentials the narrowest scopes the integration uses, set an expiry, and support rotation with overlap. One omnipotent static key is a single leak away from full compromise. 6. **Return errors that say nothing extra.** Send 401 versus 403 correctly but keep bodies generic: no stack traces, no SQL fragments, no "wrong password" message that confirms an account exists. ## Checks - Does requesting another tenant's object ID return 403 rather than the data? - Does a body with one unexpected field get rejected, not silently accepted? - Does a scripted loop actually hit a per-caller quota and get throttled? - Do 500 responses omit stack traces and internal identifiers? ## Boundaries This covers authorization, input, and quota at the application layer. It does not replace transport security (see tls-configuration), a gateway's network controls, or the identity provider that mints tokens. Framework defaults rarely enforce object-level checks: assume you write those by hand.
Versions
| Repository | Score | Licence |
|---|---|---|
| This page · Amey-Thakur/AI-SKILLS | 90 | MIT |
| coco-research/coco | 100 | MIT |
| jefflester/claude-skills-supercharged | 100 | MIT |
| claude-dev-suite/claude-dev-suite | 100 | MIT |
| andreibesleaga/gabbe | 90 | CC-BY-4.0 |
Database snapshot: 13.11.2026 · package version 54aa00947804 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 95memstack-security-api-audit
Use this skill when the user says 'audit API', 'check API security', 'API routes security', 'endpoint audit', 'check my routes', or needs to verify API route protection. Reviews API endpoints for authentication, authorization, and input validation gaps. Do NOT use for frontend… - 100api-audit
Audit REST, GraphQL, and RPC APIs against the OWASP API Security Top 10 (2023). Use when the user mentions 'API security,' 'API audit,' 'BOLA,' 'broken object level authorization,' 'BFLA,' 'function-level authorization,' 'mass assignment,' 'API rate limiting,' 'GraphQL… - 90graphql-security
Secure GraphQL API deployments against introspection leaks, deep query abuse, and authorization bypass. Use when building, reviewing, or auditing GraphQL schemas, resolvers, or gateway configurations. - 100secure-api-design
Design secure REST, GraphQL, and RPC APIs. Use when adding endpoints or changing API contracts, authentication/authorization rules, or resource access policies. - 95api-review
API security checklist for reviewing endpoints before deployment. Use when creating or modifying API routes to ensure proper authentication, authorization, and input validation. - 100golang-security
Secure Go backend services against common vulnerabilities. Use when implementing input validation, crypto, or SQL injection prevention in Go.