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.
npx skills add tmj-90/gaffer --skill security-authzgit clone --depth 1 https://github.com/tmj-90/gafferWrote 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.
[](https://agentmods.dev/skills/tmj-90/gaffer/security-authz)<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.
<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>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.
| Model | Per session | Once 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 |
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.
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
- Learn the model. Call
search_lorefor 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. - 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_decisionwithseverity: security_requiredand your recommended answer. Do not invent policy: until it is answered, implement the cell as deny and say so in evidence. - 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. - 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,priceorstatus. Response serialisers expose only the fields this subject may read.
- 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 withSET LOCALinside the transaction so a pooled connection cannot carry it to the next request. - 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.
- 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_failevent (OWASP Logging Vocabulary) with user id and resource id, and never with the data. - Test through the real entry point (the
add-integration-testskill). 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.
- Evidence. Run the suite and record the command and summary as
test_outputthrough therecord-evidenceskill, with the matrix in the diff summary. Then stop. The runner submits the ticket.
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.
- 2mo ago Changed · +67 lines 208859e848cc
- 3mo ago First seen · 51 lines · 69 tokens per session scan A ea8ef0107432
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.
security-authz compared with skills from other repositories
| Mod | Type | Stars | Last push | Licence | Scan | Tokens | Works with |
|---|---|---|---|---|---|---|---|
| security-authztmj-90/gaffer | Skill | 1 | 4d ago | Apache-2.0 | A | 69 | Claude Code, Codex |
| bulwark-brainstormQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 50 | Claude Code |
| plan-creationQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 38 | Claude Code |
| anthropic-validatorQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 40 | Claude Code |
| create-subagentQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 42 | Claude Code |
| test-auditQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 0 | Claude Code |
| code-reviewQBall-Inc/the-bulwark | Skill | 9 | yesterday | MIT | A | 61 | Claude Code |