skills/sentinel/skills/api/SKILL.md
API security audit aligned with OWASP API Top 10. Use when the user asks to "check API security", "audit REST API", "find BOLA vulnerabilities", "check for mass assignment", "analyze API rate limiting", "detect excessive data exposure", or mentions "API security", "BOLA", "IDOR", "mass assignment", "rate limiting", "broken function-level authorization", "excessive data exposure", or "OWASP API Top 10". Invoke with /sentinel:api.
npx skillsauth add 0x1337c0d3/claude-security apiInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Analyze REST and RPC APIs for security vulnerabilities aligned with the OWASP API Security Top 10 (2023), including Broken Object-Level Authorization (BOLA), mass assignment, missing rate limiting, broken function-level authorization, and excessive data exposure.
OWASP API Security Top 10 (2023):
Key CWEs:
Prioritize these file patterns:
**/routes/**, **/api/**, **/endpoints/**)**/controllers/**, **/handlers/**, **/views/**)**/serializers/**, **/dto/**, **/schemas/**)**/middleware/**, **/middlewares/**)**/config/**, **/limiters/**)Run if available:
semgrep scan --config auto --json --quiet <target> — filter for BOLA, mass assignment, authorization patternsbandit -r <target> -f json -q — Python API security patternsbrakeman -q -f json -o /dev/stdout — Rails mass assignment, authorizationAPI endpoints that accept resource IDs and return data without verifying the requesting user owns or is authorized to access that resource.
# Vulnerable: no ownership check — any authenticated user can access any order
@app.route('/api/orders/<order_id>')
@require_auth
def get_order(order_id):
return Order.get(order_id) # Missing: verify order belongs to current user
Request body fields bound directly to model attributes without explicit allowlisting.
// Vulnerable: attacker can set role, isAdmin, balance
const user = await User.create(req.body); // all fields accepted
// Fix: User.create({ name: req.body.name, email: req.body.email })
No rate limiting on authentication, data-intensive, or mutation endpoints.
// Vulnerable: unlimited login attempts
app.post('/api/auth/login', async (req, res) => {
const user = await authenticate(req.body); // no rate limit
...
});
Admin or privileged endpoints accessible to regular users because they check authentication but not authorization role/permissions.
# Vulnerable: checks login but not admin role
@app.route('/api/admin/users')
@require_login
def list_all_users():
return User.query.all() # Missing: @require_admin
API responses include sensitive fields the client does not need.
// Vulnerable: returns password hash, internal tokens, PII
res.json(await User.findById(req.params.id));
// Fix: res.json({ id: user.id, name: user.name, email: user.email })
API endpoints accept unbounded inputs with no max length or type validation.
# Vulnerable: no max length on search term (ReDoS potential)
results = db.search(req.query.get('q'))
Deprecated API versions still routed and accessible. Check for:
/api/v1/ still active when /api/v2/ is current[API-XXX] Title
Severity: CRITICAL/HIGH/MEDIUM/LOW | OWASP API: API1:2023/API3:2023/...
Location: file:line | Confidence: HIGH/MEDIUM/LOW
OWASP API category: [Category name]
Attack scenario:
1. [Attacker sends crafted request]
2. [Missing control in code]
3. [Data/access obtained]
Evidence:
[vulnerable code snippet]
Fix:
[corrected code with ownership check / allowlist / rate limit]
CWE: [CWE-XXX] | Sentinel OWASP mapping: [OWASP 2021 category]
| Severity | Criteria | |----------|----------| | CRITICAL | BOLA on sensitive data (financial, medical, PII), mass assignment on role/privilege fields | | HIGH | BOLA on user-scoped data, missing auth on admin endpoints, mass assignment on price/status | | MEDIUM | Missing rate limiting on auth endpoints, excessive data exposure of non-critical fields | | LOW | Minor data over-exposure, rate limit too generous but present |
API security findings complement Sentinel's SAST scan. Sentinel's semgrep rules catch some injection and auth issues in API handlers; this skill adds authorization logic, data exposure, and rate limiting checks Sentinel misses. Map findings to SENTINEL-XXX findings where they overlap. API findings map to OWASP A01 (Broken Access Control), A04 (Insecure Design), and A05 (Misconfiguration).
Format your final output following the standard Sentinel report structure defined in
${CLAUDE_SKILL_DIR}/../../templates/report.md. Use your skill's domain-specific
finding IDs (e.g. STRIDE-SPOOF-001, RT-SK-001, API-001) in the Finding ID column.
Include the Security Scorecard and Findings sections as a minimum. Omit the
Cross-Validation Summary section if you ran only AI analysis (no tool comparison).
development
STRIDE threat modeling. Use when the user asks to "run STRIDE", "threat model with STRIDE", "check for spoofing/tampering/repudiation/info disclosure/DoS/ privilege escalation", or invokes /sentinel:stride. Analyzes the codebase across all 6 STRIDE threat categories (Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege).
data-ai
Adversarial analysis from 6 attacker personas. Use when the user asks to "red team this", "think like an attacker", "simulate an attack", "threat model as an adversary", or wants to understand how their app would be attacked by a script kiddie, insider, organized crime, nation-state, hacktivist, or supply chain attacker. Invoke with /sentinel:red-team.
testing
Detect race condition vulnerabilities. Use when the user asks to "check for race conditions", "find TOCTOU bugs", "analyze concurrency issues", "detect double-spend vulnerabilities", "check for check-then-act patterns", or mentions "race condition", "TOCTOU", "double-spend", "concurrency", "atomicity", or "thread safety" in a security context. Invoke with /sentinel:race-conditions.
testing
Detect business logic security vulnerabilities. Use when the user asks to "check business logic security", "find logic flaws", "audit workflow security", "check for coupon abuse", "detect negative amount exploits", "analyze state machine security", or mentions "business logic", "workflow bypass", "negative amount", "coupon abuse", "self-referral", "state manipulation", or "price manipulation" in a security context. Invoke with /sentinel:business-logic.