security-authz

security-authz is a skill for Claude Code, Codex from tmj-90/gaffer. It costs 69 tokens per session (1,722 once invoked), scanned A, original, Apache-2.0.

A set of practices for deciding who can perform an action or access a specific resource in an application.

In plain words
What is it for?
Use it when adding roles, permissions, ownership checks, tenant isolation, or server-side access checks.
Why use it?
It prevents users from reaching data or actions they do not own or have permission to use, including across tenants.

Skill for Claude CodeCodex

Written for no agent in particular: nothing here depends on one.

Good fit Use it when adding roles, permissions, ownership checks, tenant isolation, or server-side access checks.

Compare 6 skills from other repositories ↓
Install with agentmods
npx agentmods add skills/tmj-90/gaffer/security-authz
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.

Any agent
npx skills add tmj-90/gaffer --skill security-authz
Clone the repo
git clone --depth 1 https://github.com/tmj-90/gaffer

Made for: Claude Code, Codex.

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 security-authz

README.md
[![agentmods](https://agentmods.dev/badge/skills/tmj-90/gaffer/security-authz/github.svg)](https://agentmods.dev/skills/tmj-90/gaffer/security-authz)
Your own site
<a href="https://agentmods.dev/skills/tmj-90/gaffer/security-authz"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/security-authz/github.svg" alt="Measured on agentmods" height="20"></a>

Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.

agentmods 80×15 button for security-authz

Your own site · 80×15
<a href="https://agentmods.dev/skills/tmj-90/gaffer/security-authz"><img src="https://agentmods.dev/badge/skills/tmj-90/gaffer/security-authz.svg" alt="Reviewed on agentmods" width="80" height="20"></a>
Per session 69 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,722 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.00069 $0.01722
Opus 5.5 $0.00028 $0.00689
Sonnet 5.5 $0.00014 $0.00344
Haiku 4.5 $0.00007 $0.00172

Measured 2mo ago against content hash 208859e848cc, method: parsed. Prices are Anthropic first-party input rates as of 2026-10-07, from the pricing page.

Security

Grade A, and why

security-authz 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 2mo 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.

runner/skills/security-authz/SKILL.md · 118 lines

How it starts

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

Enforce authorization

Every protected operation must check, on the server, that this subject may do this action on this specific object and these fields. Broken access control is the most common serious web flaw (OWASP Top 10 A01), and it gets past review because the code works fine for the user who owns the data. This skill covers authorization only. For identity (login, sessions, tokens), use the auth-session-and-oauth skill.

Procedure

  1. Learn the model. Call search_lore for the repo's authz model: where identity is resolved, the policy helper or middleware, the role/permission scheme, and how tenant or owner scoping works (query scope, repository filter, Postgres RLS). An ADR on access control is binding. Open one existing protected handler and follow the same pattern.
  2. Write the access matrix before any code. Make a table with one row per operation the ticket touches (read, list, create, update, delete, export, each admin action) and one column per subject: anonymous, owner, same-tenant non-owner, lower role, other tenant, admin. Mark each cell allow or deny. Put the table in your plan. If a cell depends on a policy the ticket does not state, raise request_decision with severity: security_required and your recommended answer. Do not invent policy: until it is answered, implement the cell as deny and say so in evidence.
  3. Enforce at the trusted layer, deny by default. Put the check in the service or handler through the repo's policy helper (ASVS 8.3.1), never only in the UI, a route hidden from the client, or a client-supplied role/isAdmin/tenantId. A missing subject, a missing resource or an unknown permission must be denied. Exceptions in the check must deny too.
  4. Check the object, not only the function (ASVS 8.2.1–8.2.3):
    • Function level: the caller holds the permission for the action.
    • Object level (IDOR/BOLA): load the row with the scope in the predicate (WHERE id = ? AND tenant_id = ?), and write it with the same predicate. Do not fetch by id and compare afterwards, and do not re-fetch by id alone before the write, because that leaves a check-then-act gap. Unguessable ids do not count as access control.
    • Field level (BOPLA / mass assignment): bind input to an allow-listed DTO so a caller cannot set role, owner_id, tenant_id, price or status. Response serialisers expose only the fields this subject may read.
  5. Close the side doors. List, search, count, export, bulk and "include related" endpoints apply the same scope. So do files and static objects (signed URLs scoped and short-lived), caches (tenant in the cache key), background jobs, webhooks and queue consumers. Asynchronous work must carry the originating subject and re-check it, not run with the worker's privileged role (ASVS 8.3.3). With Postgres RLS, the request-path role must not be superuser or BYPASSRLS, and set the tenant with SET LOCAL inside the transaction so a pooled connection cannot carry it to the next request.
  6. Apply permission changes immediately (ASVS 8.3.2). If roles are cached or embedded in a token, revoke the cache or keep the token short-lived, and say which one in the evidence.
  7. Fail safely and log. Use the repo's standard 403, or 404 where existence itself is sensitive, with no protected detail in the body. Log denials as an authz_fail event (OWASP Logging Vocabulary) with user id and resource id, and never with the data.
  8. Test through the real entry point (the add-integration-test skill). Turn every deny cell of the matrix into a test that calls the HTTP route or service method with a real authenticated subject:
    • The other-tenant and non-owner tests must target an object that exists. A request for a nonexistent id returns 404 and proves nothing.
    • Assert both the status and that no state changed: re-read the row, and assert the other tenant's rows are absent from list and export output.
    • Add a test that tries to write a protected field and is rejected or ignored, and a test where a role is revoked and the next request is denied.
    • If the repo keeps a route inventory, extend it so every route declares a policy or is explicitly public. A new unguarded route should fail the build.
  9. Evidence. Run the suite and record the command and summary as test_output through the record-evidence skill, with the matrix in the diff summary. Then stop. The runner submits the ticket.

Read the full file on GitHub · 118 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. 2mo ago Changed · +67 lines 208859e848cc
  2. 3mo ago First seen · 51 lines · 69 tokens per session scan A ea8ef0107432

Subscribe to this mod's changes

security-authz is a skill published in the GitHub repository tmj-90/gaffer (1 stars, last pushed 4d ago), licensed Apache-2.0. It adds 69 tokens to every session and 1,722 once invoked, about $0.0003 per session on Opus 5.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-03.

Related

security-authz compared with skills from other repositories

security-authz next to 6 skills from other repositories
ModTypeStarsLast pushLicenceScanTokensWorks with
security-authztmj-90/gafferSkill14d agoApache-2.0A69Claude Code, Codex
bulwark-brainstormQBall-Inc/the-bulwarkSkill9yesterdayMITA50Claude Code
plan-creationQBall-Inc/the-bulwarkSkill9yesterdayMITA38Claude Code
anthropic-validatorQBall-Inc/the-bulwarkSkill9yesterdayMITA40Claude Code
create-subagentQBall-Inc/the-bulwarkSkill9yesterdayMITA42Claude Code
test-auditQBall-Inc/the-bulwarkSkill9yesterdayMITA0Claude Code
code-reviewQBall-Inc/the-bulwarkSkill9yesterdayMITA61Claude Code