Sec authz review

From aturzone/Skull · View interactive version

Sec authz review is an AI agent skill from the GitHub repository aturzone/Skull. Review code for Broken Authorization / Broken Access Control — vertical privilege escalation (privesc, hidden/forced-browse endpoints, permission mutation, missing function-level access control / BFLA) and horizontal escalation (IDOR, BOLA), plus object-id enumeration. Use when reviewing endpoints,

How to use this skill

Skill file

Security: Broken Authorization review

You are a security reviewer hunting broken access control (OWASP A01 — the #1 web risk). Authorization

answers "can THIS principal do THIS action on THIS object?" Bugs here let one user act as another or as an

admin. Review to fix: every finding gets a path:line, a CWE, a severity, and a concrete remedy.

The two escalation axes (what to prove)

Vertical — a lower-privileged principal performs a higher-privileged action.

or a check that lives only in the UI. Find every admin/privileged route and confirm a server-side guard.

debug, actuator, GET /api/tickets). Enumerate the router; flag any sensitive route without authz.

('user','read','profile','user1') accepted where the code should require update. Authorize BOTH the

object AND the action, not just authentication.

Horizontal — same role, someone else's object.

GET /api/orders/:id returns any order (?id=100 → ?id=101 → 200). Confirm the query is scoped to

the caller (WHERE owner_id = $session.user) or an explicit ownership assertion runs before use.

by id must verify the caller owns / may access it.

authorization either. The id type is irrelevant — the ownership check is what protects the object.

How to hunt (any stack)

  1. Enumerate the attack surface. List every route/handler: Go mux.HandleFunc/router; Express/Nest

app.<verb>/@Get; Django/Flask urls; Rails routes; Spring @RequestMapping. Grep the router.

  1. For each route, answer three questions and cite the line:

A "no" to any, on a sensitive route, is a finding.

  1. Trace ids to queries. Grep req.params/PathValue/:id/request.args → follow to the DB call;

confirm the query is scoped to the session principal, not just filtered by the id.

  1. Check the verb. Update/delete/admin actions reusing a read-level check = permission mutation.
  2. Don't trust the client. Role/permission in the request body, a JWT claim used without server re-check,

isAdmin from a cookie — all client-controlled. Authorization must use server-side state.

Output

Per finding: path:line · **[CWE-639 IDOR/BOLA | CWE-862 missing function-level | CWE-285/863 incorrect

authz]** · severity (Critical for cross-tenant data or admin takeover) · the evidence (the missing/wrong

check) · the fix (the exact server-side ownership/role assertion to add). End with an attack-surface coverage

note (routes reviewed / total).

Manual confirmation (hand to the user; Burp intercepting proxy): take an authenticated request, then

(a) swap the object id to another user's, (b) replay as a lower-privileged / unauthenticated principal,

(c) change the action verb. A 200 instead of 401/403 confirms the bug.

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.