AGENT
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination,…
Reusable, concrete mitigations indexed by STRIDE category. Use these as a starting point — then make each one *specific* to the threat it addresses (name the endpoint, the field, the store). A mitigation that could be copy-pasted into any model unchanged is too vague to verify.
$ npx -y skills add vanara-agents/skills --agent claude-codeHow it fires
How this agent gets triggered: by you, by Claude, or both.
Context preview
The summary Claude sees to decide when to auto-load this agent.
Reusable, concrete mitigations indexed by STRIDE category. Use these as a starting point — then make each one *specific* to the threat it addresses (name the endpoint, the field, the store). A mitigation that could be copy-pasted into any model unchanged is too vague to verify.
Reusable, concrete mitigations indexed by STRIDE category. Use these as a starting point — then make each one *specific* to the threat it addresses (name the endpoint, the field, the store). A mitigation that could be copy-pasted into any model unchanged is too vague to verify.
Every mitigation should be **testable**: you should be able to write a test or a check that proves it is present and working.
| Control | Notes | |---|---| | Strong authentication (OIDC/OAuth2, WebAuthn) | Avoid rolling your own; use established protocols | | MFA on sensitive accounts and actions | Step-up auth for high-value operations (transfers, role changes) | | Mutual TLS for service-to-service | Each service proves its identity, not just the client | | Short-lived, signed tokens (JWT with `exp`, audience, issuer checks) | Validate signature, expiry, `aud`, `iss` server-side every request | | Anti-automation on login (rate limit, lockout, CAPTCHA/proof-of-work) | Defends credential stuffing and brute force |
| Control | Notes | |---|---| | TLS for all data in transit | Prevents on-path modification | | Server-side input validation against an allow-list/schema | Validate at the trust boundary, before use; never trust client checks | | Parameterized queries / prepared statements | Eliminates SQL injection tampering | | HMAC or digital signatures on critical messages | Detects modification of webhooks, tokens, inter-service messages | | Integrity checks on stored data (checksums, append-only stores) | Detect or prevent at-rest modification | | Subresource Integrity (SRI) on third-party scripts | Detects tampered CDN assets |
| Control | Notes | |---|---| | Tamper-evident audit log of security-relevant actions | Append-only or signed; actor, action, timestamp, before/after | | Logs stored outside the actor's control | An admin should not be able to edit logs of their own actions | | Synchronized, trusted timestamps | NTP; record server time, not client-claimed time | | Correlation/request IDs across services | Reconstruct an action end-to-end |
| Control | Notes | |---|---| | Encryption at rest for sensitive stores | DB/disk/bucket encryption; manage keys in a KMS | | TLS in transit (see Tampering) | Confidentiality + integrity together | | Least-privilege data access; field-level authz | Return only what the caller is entitled to | | Generic error messages externally; detail in server logs only | Don't leak stack traces, SQL, or existence (404 vs 403) | | Scrub secrets/PII from logs and telemetry | Redact tokens, card numbers, emails before logging | | Avoid IDOR | Check resource *ownership*, not just authentication |
| Control | Notes | |---|---| | Rate limiting and quotas per client/key | Return `429` + `Retry-After`; defend per-tenant | | Timeouts and circuit breakers on outbound calls | Stop a slow dependency from exhausting your threads | | Input size and complexity limits | Cap payload size, page size, query depth, regex complexity (ReDoS) | | Resource pooling and back-pressure | Bounded queues; shed load instead of collapsing | | CDN/WAF and autoscaling for public surfaces | Absorb volumetric floods upstream |
| Control | Notes | |---|---| | Centralized, server-side authorization on every action | Deny by default; never rely on hidden UI or client checks | | Principle of least privilege for processes and tokens | Minimal DB grants, scoped tokens, no ambient admin | | Sandboxing / isolation of untrusted input handling | Separate parsing/deserialization from privileged logic | | Avoid unsafe deserialization, template injection, path traversal | Allow-list types/paths; canonicalize before checks | | Re-check authz after any state or role change | Don't cache a stale privilege decision across a privilege change |
owner and rationale — see `AGENT.md` output format.
🐒 Free agents, skills & packs for Claude Code One subscription. An army of Claude Code agents. 30 production-grade agents, skills, and packs for Claude Code — free, Apache-2.0, install with one command.
Repo: vanara-agents/skills
Use when designing a new HTTP/GraphQL API or changing an existing one — modeling resources, defining endpoint contracts, choosing status codes, pagination,…
This shows how the api-designer agent reviews a flawed draft. Findings are severity-ranked so the implementer fixes the contract-breakers first. Severity…
The contract is the deliverable. Express it as an **OpenAPI 3.1** document so it is human-readable *and* machine-checkable. This reference covers how to…
Run through this before declaring an API contract done. It is ordered the way you should *design*: resources first, cross-cutting rules last. Every box is a…
APIs are forever once published: a consumer you've never met may depend on any field you expose. Design so you can **add without breaking**, and version…
Copy-paste templates for leaving review comments. Keep each comment to one finding: an anchor, the problem, and the fix.