authorization-logic-review

authorization-logic-review is an agent for Claude Code from bdfinst/agentic-dev-team. It costs 41 tokens per session (961 once invoked), scanned A, original, MIT.

A security-review agent that maps an application's permission model and checks whether access rules are enforced consistently throughout the code.

In plain words
What is it for?
Use it to review role-based, attribute-based, or tenant-based access control across routes, middleware, policies, and permission definitions.
Why use it?
A system can declare roles or permissions correctly but enforce them incorrectly in one route or layer, allowing unauthorized access.

Agent for Claude Code

Written for Claude Code: effort in frontmatter. Also seen: model in frontmatter.

Part of the security-assessment plugin — 3 skills, 5 commands, 13 agents shipped together

Good fit Use it to review role-based, attribute-based, or tenant-based access control across routes, middleware, policies, and permission definitions.

Compare 6 agents from other repositories ↓
Install with agentmods
npx agentmods add agents/bdfinst/agentic-dev-team/authorization-logic-review
Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

Clone the repo
git clone --depth 1 https://github.com/bdfinst/agentic-dev-team

Made for: Claude Code.

Or install security-assessment, the plugin that ships this one along with the rest of its 3 skills, 5 commands, 13 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for authorization-logic-review

README.md
[![agentmods](https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/authorization-logic-review.svg)](https://agentmods.dev/agents/bdfinst/agentic-dev-team/authorization-logic-review)
Your own site
<a href="https://agentmods.dev/agents/bdfinst/agentic-dev-team/authorization-logic-review"><img src="https://agentmods.dev/badge/agents/bdfinst/agentic-dev-team/authorization-logic-review.svg" alt="Measured on agentmods" height="20"></a>
Per session 41 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 961 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. A grade says what 26 rules found in the file — not that it is safe.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00041 $0.00961
Opus 5 $0.00020 $0.00481
Sonnet 5 $0.00008 $0.00192
Haiku 4.5 $0.00004 $0.00096

Measured 2d ago against content hash 085786708f14, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-07, from the pricing page.

Security

Grade A, and why

authorization-logic-review scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/security-assessment/agents/authorization-logic-review.md · 116 lines

How it starts

The opening of the file, as written. The whole thing — 116 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Authorization Logic Review

Cites: [severity-floors]

Map the authorization model first, then check consistent enforcement. Report the gap between stated policy and observed implementation — not single suspicious lines.

Context needs: project-structure

Inputs

  1. Target repo files — RECON-scoped or grep-discovered
  2. memory/recon-<slug>.json — entry points + security surface
  3. knowledge/authz-review-categories.yaml — rule_id + CWE assignments

Output

  • memory/authz-review-<slug>.json — JSON array of unified findings. Schema: plugins/dev-team/knowledge/schemas/unified-finding-v1.json.

Required metadata: source: "llm-reasoning", cwe[], confidence (high|medium only), secondary_locations[] (≥ 1 policy + gap pairing), reasoning (2-3 sentences).

Procedure

1. Map the authorization model

Discover how the application declares and enforces access control:

  • Route decorators / middleware annotations (@require_auth, @roles_allowed, [Authorize(Roles=...)], router.use(authMiddleware))
  • Permission constants and role definitions (permissions.py, roles.js, AuthorizationPolicy.cs, scopes.go)
  • Middleware stacks (Express chain, Django middleware list, ASP.NET Core pipeline)
  • Tenancy models (tenant_id, organization_id, account_id in models or query builders)

Classify as RBAC, ABAC, ACL, tenancy-scoped, or mixed. Note where the predominant pattern is declared.

2. Identify enforcement points

Per route or operation class, note where authorization is enforced:

  • Controller / handler — checked before business logic runs
  • Service layer — checked inside business logic
  • Repository / data-access — enforced in the query (e.g. .where(tenant_id=current_tenant))
  • Not found — no enforcement located

Gaps in this {operation → enforcement} map are findings.

3. Tenant isolation consistency

If a tenancy model is present:

  • Grep direct object-load patterns that could return cross-tenant data: findById, getById, SELECT ... WHERE id = ? without a tenant filter.
  • Check whether ORM base query builder / repository base class enforces tenancy (global scope = OK; ad-hoc per-query = risky).
  • Note admin or superuser paths that bypass tenancy for legitimate reasons — acknowledged bypasses, not findings.

Read the full file on GitHub · 116 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 116 lines · 41 tokens per session scan A 085786708f14

Subscribe to this mod's changes

authorization-logic-review is an agent published in the GitHub repository bdfinst/agentic-dev-team (280 stars, last pushed 2d ago), licensed MIT. It adds 41 tokens to every session and 961 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-05.

Related

Other agents, from other repositories