agentleFS
awarexoneawarexone/AXguard/authorization-analysis/SKILL.md

authorization-analysis

Skill17 starsChanged 47 days agoMITView on GitHub

Analyze authorization and access control — use for IDOR/BOLA, missing ownership checks, privilege escalation, and function-level authZ gaps (CWE-639 / CWE-862 / CWE-863 / A01:2021 / API1:2023 / API5:2023).

We split this skill into the rules it gives an agent

5 rules. About 0 are common, 2 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    After AXguard auth.* hits or /axguard-auth triage.

    line 45
  2. Very specific:

    Read/update/delete another user’s objects by ID.

    line 61
  3. Distinctive:

    Check role guards on admin functions.

    line 71
  4. Distinctive:

    Prefer proving missing checks in code.

    line 74
  5. Very specific:

    Never trust client-supplied user_id/isAdmin for decisions.

    line 93

≈ “Common” is an estimate: at least 1 in 5 of the 308,232 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Authorization Analysis

Purpose

Teach systematic detection of broken access control: authenticated (or anonymous) callers acting outside their permitted objects, tenants, or functions.

When to Use / When Not to Use

Use when:

  • Handlers load objects by client-supplied IDs, or expose admin/actions based on role claims.
  • After AXguard auth.* hits or /axguard-auth triage.
  • Multi-tenant apps with org_id / user_id in paths or bodies.

Do not use when:

  • The issue is proving identity (login/MFA) — use authentication-analysis.
  • Pure injection into a sink with no access-control question.

Security Concepts

Authorization answers “is this principal allowed to do this to that object?” UI hiding is not a control. Object-level (BOLA/IDOR) and function-level (BFLA) failures are distinct and both common in APIs.

Threat Model

Attacker goals:

  1. Read/update/delete another user’s objects by ID.
  2. Invoke admin APIs as a standard user.
  3. Cross-tenant data access in SaaS.
  4. Escalate via mass-assigned role fields (pair with api-security / CWE-915).

Analysis Workflow

  1. List sensitive operations (read/write/delete/export/admin).
  2. For each: identify how the object is selected (path/body/graphql id).
  3. Confirm server-side check binds object to current_user / tenant — not merely “is logged in.”
  4. Check role guards on admin functions; ensure middleware cannot be skipped by alternate routes.
  5. Review horizontal (same role, other user) and vertical (privilege escalation) cases.
  6. Inspect batch endpoints and exports for missing per-object checks.
  7. Prefer proving missing checks in code; authorized dual-account tests only on owned systems.

Evidence Requirements

  • Handler location and object lookup
  • Missing ownership/role predicate
  • Affected object type and action
  • Confidence: CONFIRMED only with code path + (when possible) dual-principal validation in authorized env

False Positive Controls

  • Public resources by design
  • Capability URLs that are high-entropy and revoked/expired properly (still review leakage)
  • Checks performed in a shared repository layer actually invoked by the handler

Remediation

  1. Centralize authZ policy (ownership + role + tenant).
  2. Deny by default; test with two users and two tenants.
  3. Never trust client-supplied user_id/isAdmin for decisions.
  4. Apply the same checks to GraphQL resolvers, WS topics, and job consumers.
  5. Log and alert authZ denials on sensitive resources.

Verification

Map object/function ops → Add ownership/role checks → Re-run axguard → Dual-user regression tests

Related Skills

  • api-security, graphql-security
  • authentication-analysis, jwt-security
  • security-triage, security-remediation

Framework Mapping

  • CWE-639, CWE-862, CWE-863
  • OWASP A01:2021 Broken Access Control
  • OWASP API1:2023, API5:2023

References

Research Provenance

Primary sources:

  • OWASP A01:2021; OWASP API1/API5:2023; CWE-639/862/863 (accessed 2026-09-15)

Secondary / internal:

  • AXGuard rules/auth.json, /axguard-auth
  • AwareXone Agentic-Bug-Hunter IDOR/authZ methodology (concepts only; not copied)

Datasets:

  • UVID HF dataset — category linkage concepts only (MIT license metadata review 2026-09-15)

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.