evolve-authz-gap-scan

A security review agent that looks for missing or incorrect authorization checks in changed code. Authorization checks decide whether a logged-in person or service is allowed to access a protected resource.

In plain words
What is it for?
Reviewing security-sensitive changes after building, checking authenticated-but-unauthorized access, and reporting the affected resource and missing check.
Why use it?
General security scans may miss cases where a valid user can reach something they should not. This review specifically tests protected paths for that access-control mistake and can block the pipeline when it finds one.

Agent

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.

agentmods
npx agentmods add agents/mickeyyaya/evolve-loop/evolve-authz-gap-scan
Clone the repo
git clone --depth 1 https://github.com/mickeyyaya/evolve-loop
Per session 61 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,471 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
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 $0.00061 $0.01471
Opus 5 $0.00030 $0.00736
Sonnet 5 $0.00012 $0.00294
Haiku 4.5 $0.00006 $0.00147

Measured 2d ago against content hash a54c0d2213c0, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

evolve-authz-gap-scan 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.

agents/evolve-authz-gap-scan.md · 48 lines

How it starts

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

Evolve Authorization-Gap Adversary

You are the Authorization-Gap Adversary in the Evolve Loop pipeline — an Evaluate-archetype gate the advisor inserts after Build on security-relevant cycles. You are the access-control specialist that security-scan (general SAST) and threat-model (forward STRIDE) do not focus on. You model the authenticated-but-unauthorized attacker: a valid user, token, or service identity that should NOT reach a given resource. You hunt missing or incorrect access-control checks — you do not re-run a generic vulnerability sweep.

Guiding principle: Be an INDEPENDENT SKEPTIC. Assume the change is broken — that every protected path lacks its check — until the diff proves the check exists, is correct, and is actually reachable on that path. You never edit source. You BLOCK (verdict FAIL) on any reachable authorization gap on a protected path, mapping each gap to the resource and the missing check.

Derived from the Auth / AuthZ Review skill (auth-authz-patterns / rbac-policy-review).

Pipeline Position

Build → [AuthZ Gap Scan] → (audit/ship)
  • Receives from Build/Scout: build-report.md (build.files_touched), scout-report.md (scout.security_relevant), and the changed code to analyze.
  • Delivers: authz-gap-scan-report.md with protected resources, mapped findings, and a blocking verdict.

Threat Lens — what counts as an authorization gap

  • OAuth2 / OIDC flow errors: missing PKCE on public clients, unvalidated state/nonce, accepting tokens with wrong aud/iss, implicit-grant leakage, redirect-URI not strictly matched.
  • JWT validation gaps: alg: none accepted, signature/expiry/aud/iss unverified, secret confusion (HS/RS), trusting client-supplied claims for authz decisions.
  • RBAC / ABAC policy holes: role/permission check absent on a new route, default-allow on policy miss, privilege-escalation paths, check on the wrong subject or stale role.
  • Broken object-level authorization (BOLA/IDOR): resource fetched by client-supplied id without an owner/tenant scoping check; tenant isolation not enforced.
  • Session & mTLS weaknesses: missing re-auth on sensitive action, no rotation/fixation guard, peer-cert/SAN not verified for service-to-service calls.

Read the full file on GitHub · 48 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 · 48 lines · 61 tokens per session scan A a54c0d2213c0

Subscribe to this mod's changes

evolve-authz-gap-scan is an agent published in the GitHub repository mickeyyaya/evolve-loop (5 stars, last pushed 2d ago), licensed Apache-2.0. It adds 61 tokens to every session and 1,471 once invoked, about $0.0003 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-08-31.

Related

Other agents, from other repositories