authz-security
БесплатноБез исполняемых скриптовНе проверенReview application source code for broken authorization — IDOR / Broken Object Level Authorization (OWASP API1), Broken Function Level Authorization (API5)…
от superagent-ai★ 82 звезды на GitHubОб этом скилле
Authorization Security Scanner
This skill turns the model into an authorization reviewer. Read the routes, controllers, resolvers, and data models; walk the detection passes; report each missing access-control check with a severity and a concrete, framework-correct fix. No tools to install, no app to run, no credentials — the analysis is the model reading the code.
Broken access control is the OWASP Top 10's #1 web risk (A01) and the top two API risks (API1 BOLA, API5 BFLA). It tops the lists precisely because automated tools miss it: there is no dangerous function call to grep for. The bug is the absence of a check, and confirming it requires understanding the application's ownership model — which is exactly what a model reading the code can do and a signature scanner cannot.
Mental model
Authentication answers who are you? Authorization answers are you allowed to do this, to this specific object? This skill is only about the second question. A handler can be perfectly authenticated and still be a critical vulnerability.
Every privileged operation can be escalated along two axes:
- Horizontal — acting on another user's object at the same privilege level. Manipulate an object identifier (
/orders/1042→/orders/1043) and you read someone else's data. This is BOLA / IDOR (OWASP API1). - Vertical — reaching a function above your privilege level. A normal user hitting an admin endpoint. This is BFLA (OWASP API5).
The defect is almost always missing code, not wrong code: a query that filters by object id but not by owner, an admin route guarded by "is logged in" but not "is admin," a body that binds straight to a model. So you are scanning for a gap, not a pattern.
When you cannot tell whether a check exists, assume it does not, and flag it for confirmation. The cost of a false positive is a review comment. The cost of a false negative is every user's data. This asymmetry governs every judgment call below.
Scan procedure
Walk these passes in order. Pass 0 builds the context the rest depend on — do not skip it.
Pass 0: map the ownership and tenancy model
You cannot tell that a check is missing until you know what "owning" an object means here. Before reading a single endpoint, read the data layer — ORM models, schema, migrations — and establish:
- For each resource, who owns it? Look for an owner/scope column:
user_id,account_id,org_id,tenant_id,team_id,workspace_id. A resource with such a column must never be returned or mutated without scoping to it. - What is the principal? Where does the authenticated identity come from —
request.userfrom a session,req.userset by auth middleware, a verified JWTsubclaim? This is the only trustworthy identity. Note it. - What is the tenancy strategy? Row-level (shared tables with a
tenant_idcolumn) is where almost all multi-tenant BOLA hides, because isolation depends on every single query remembering the filter. Schema- or database-per-tenant pushes the boundary lower and is harder to get wrong.
Write this map down (even informally). Every later finding is "principal P touched object O without confirming P may access O" — you need to know O's owner to make the call.
Pass 1: enumerate handlers and the objects they touch
List every entry point: REST routes, controller actions, GraphQL resolvers, RPC/gRPC methods, server actions. For each, record:
- HTTP method + path (or resolver name).
- The object(s) it reads or mutates.
- Where the object identifier comes from: path param, query string, request body, or the session/token.
Flag every handler that loads or mutates an object by a client-supplied identifier — those are the BOLA candidates for Pass 2. A handler that only ever uses the principal's own id from the session (GET /me, current_user.orders) is low risk and can be deprioritized.
Pass 2: object-level authorization (BOLA / IDOR) — OWASP API1
For every handler flagged in Pass 1, ask: is there a check that the principal owns or may access this specific object? An acceptable check takes one of three forms:
- Owner-scoped query — the lookup itself includes the owner, so a non-owned id simply isn't found:
invoice = Invoice.objects.get(id=id, org=request.user.org) # 404 on someone else's - Explicit post-load check — load, then compare to the principal and reject:
invoice = Invoice.objects.get(id=id) if invoice.org_id != request.user.org_id: raise PermissionDenied - Centralized policy / ability — a guard that encodes the rule:
authorize! :read, invoice(Pundit/CanCanCan),@PreAuthorize("hasPermission(#id,...)"), an OPA/Cedar/OpenFGA decision, a policy gate.
If the object is loaded by a client-supplied id with none of these — only the id, on the assumption that "you had to be logged in to get here" — that is the canonical IDOR. **Authentication is not authorizat
Установить authz-security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл authz-security?
Review application source code for broken authorization — IDOR / Broken Object Level Authorization (OWASP API1), Broken Function Level Authorization (API5), mass assignment (API3), multi-tenant isolation gaps, and privilege escalation. Reads routes, controllers, resolvers, and data models offline and reports the missing ownership/role check at file:line with a framework-correct fix. No running app, no credentials, no tools. Trigger when reviewing endpoints/handlers, auditing a PR diff that adds or changes routes, hardening a multi-tenant SaaS, or when the user asks "is this endpoint authorized?", "can a user access another user's data?", "IDOR", "BOLA", or "broken access control".
Как установить скилл authz-security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл authz-security запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
skill-creator
Create new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an…
от Anthropicdiscernment-nudge
After you give a substantive answer or draft that the user may act on — advice or recommendations, drafted artifacts such as goals, plans, pitches, proposals…
от Anthropicdata-consolidate
Joins the plant's scheduled exports and connector data into one working dataset — ERP items (NetSuite or Infor M3), sales orders, production work orders…
от Anthropicinspection-to-capa
Runs the quality chain end to end: writes the nonconformance against the requirement it violates, searches history at the moment of writing to say whether…
от Anthropic