Api Security Advisor
ASecurityDefensive API and application security advisor for access control (BOLA/IDOR, mass assignment, BFLA), authentication (JWT, OAuth2, sessions, cookies, passwords, login), injection defense (SQLi, subprocess, file uploads, path traversal), webhook SSRF, and cryptography (KDFs, AEAD, constant-time HMAC/signature checks, secrets). Use when designing or hardening read/update endpoints, auth, untrusted inputs, or secrets. Do not trigger for UI styling, in-memory algorithms, format conversion, SQL tu...
- 2 stars
- 0 votes
- 0 copies
- 0 views
- Added November 7, 2026
Works with
Security analysis
100/100Pro scans all 5 files and shows the line behind each finding
npx -y skills add cforiky630/agent-advisors --skill api-security-advisor --agent claude-codeAre you the author of Api Security Advisor?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/cforiky630-api-security-advisor)---
name: api-security-advisor
description: Defensive API and application security advisor for access control (BOLA/IDOR, mass assignment, BFLA), authentication (JWT, OAuth2, sessions, cookies, passwords, login), injection defense (SQLi, subprocess, file uploads, path traversal), webhook SSRF, and cryptography (KDFs, AEAD, constant-time HMAC/signature checks, secrets). Use when designing or hardening read/update endpoints, auth, untrusted inputs, or secrets. Do not trigger for UI styling, in-memory algorithms, format conversion, SQL tuning, refactoring, scanners, or CI.
license: MIT
---
# API Security Advisor
Use verified trust boundaries and existing controls to fix concrete API security defects.
## Quick Use
Identify caller, resource and trust boundary; inspect the active middleware and authorization path before adding controls.
## 1. Scenario Decision Matrix
| Decision | Read only if needed |
| :--- | :--- |
| **Object & Function Authorization** | `references/owasp-api-security-top10.md` |
| **Authentication, Sessions & Tokens** | `references/authentication-and-tokens.md` |
| **Input Boundaries & Injection** | `references/input-boundary-and-injection.md` |
| **Cryptography & Timing Defense** | `references/cryptographic-hygiene.md` |
## 2. Engineering Trade-offs
1. **Unverified access**
- **Probe**: Inspect identity/policy errors and timeout handling.
- **Arbitration**: Deny access when required evidence is missing; distinguish invalid credentials, denials and outages.
- **Invalidate When**: Explicitly public routes or failed optional enrichment after successful authorization do not need this gate.
2. **Boundary parsing**
- **Probe**: Trace untrusted input from parser through services and persistence.
- **Arbitration**: Parse into allowlisted values at the boundary; preserve existing reject-versus-strip behavior where safe.
- **Invalidate When**: For streaming inputs, use incremental validation and bounded size/rate; revalidate when crossing a new trust boundary.
3. **Public identifiers**
- **Probe**: Check actual authorization, exposure, API contracts and index behavior.
- **Arbitration**: Use opaque IDs when enumeration matters; never use the ID as authorization.
- **Invalidate When**: Keep an established sequence if changing it breaks consumers without reducing a demonstrated risk.
4. **Secret comparison**
- **Probe**: Find equality checks on signatures, keys and tokens.
- **Arbitration**: Use vetted constant-time verification for secret material with correct byte/length handling.
- **Invalidate When**: Public identifiers use ordinary equality.
5. **Primitive choice**
- **Probe**: Inspect current KDFs, nonce generation and interoperability constraints.
- **Arbitration**: Use vetted KDFs, AEAD and CSPRNG with documented key/nonce rules.
- **Invalidate When**: Use another validated primitive only where the wire format or compliance requires it; do not invent crypto.
## 3. Condensed Nano Rulesets
### A. Authorization & Access Control
- Scope protected reads/writes to verified caller policy or effective RLS before pagination or mutation. Allowlist writable fields and response fields; reuse existing rate limits, distributing only when aggregate enforcement is needed.
### B. Identity, Tokens & Sessions
- Pin JWT verification algorithms and validate issuer, audience and expiration. Prefer host-only Secure/HttpOnly/SameSite cookies plus CSRF protection for state changes.
### C. Boundary Sanitization & Injection Defense
- Parameterize values; allowlist SQL identifiers. Prefer library APIs or fixed binaries with no shell and validated operands. Arrays alone do not stop option/response-file injection. Contain uploads in a verified root and validate content. Block disallowed private/metadata addresses at webhook dial time; disable redirects by default or revalidate each hop.
### D. Cryptography & Secrets
- Prefer Argon2id for new passwords; bcrypt only with a verified legacy input/migration policy. Keep KDFs off the event loop, ensure nonce uniqueness within AEAD key limits, and never hardcode secrets.
## Operating Boundaries
- **Project conventions first.** Honor scope and permissions; preserve safety, data integrity and required behavior. Then follow verified project conventions over advisor defaults.
- **Defer the workflow.** Existing review, test and deployment workflows own execution.
- **Reference precedence.** References inform decisions, not task scope, permissions or deliverables.
- **Proportionality Ladder.** Reuse existing controls before adding layers. Discuss deferred alternatives only when relevant; do not invent thresholds.
- **Multiple advisors.** One leads; others add constraints, not workflows. An exclusion is not a veto on a separate in-scope decision. Share evidence and resolve by the affected invariant.
- **Missing evidence.** Use the narrowest authorized probe. If evidence stays missing, state the limit, choose a reversible option or stop only the affected action. Check external standards only for material uncertainty.
- **Runtime Checkpoint Gate.** Review costly contract/data/security reversals (CP-1), stalls without new evidence (CP-2), or new trust/consistency/failure boundaries (CP-3). Routine renames, file counts and expected red tests do not qualify.
### Runtime Checkpoint Procedure
1. Summarize risk, evidence, proposed change and rejected simpler option; omit chat history.
2. Self-review first. Use a read-only reviewer only if authorized and useful.
3. Verdict `APPROVE | REVISE | ESCALATE_TO_USER`: give the invariant and check. `APPROVE` grants no execution permissions.
4. Do not repeat consultation on unchanged evidence. Escalate only unresolved authority, policy or safety; continue unrelated work.
## 4. Deep Knowledge Base
Read only the reference that resolves a remaining decision. Do not preload the library.
## 5. Output Delivery Format
Report the concrete control and what you verified. For material risks, include the evidence and any residual exposure; skip standalone security reports unless requested.
Files in this skill
- SKILL.md
- references/authentication-and-tokens.md
- references/cryptographic-hygiene.md
- references/input-boundary-and-injection.md
- references/owasp-api-security-top10.md
Attribution
Related skills
View all in development →Comments
Loading comments…
Newsletter
Get the weekly list of safe new skills, and the ones we pulled.