From skillry-security
Use when you need to review authorization, roles, row-level access, tenancy, privilege checks, and denied paths.
How this skill is triggered — by the user, by Claude, or both
Slash command
/skillry-security:49-authz-permission-reviewThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Audit authorization logic across the codebase: RBAC/ABAC role definitions, row-level security, multi-tenant data isolation, IDOR exposure, privilege escalation paths, and the presence of a default-deny posture. Produce a graded finding list with file references and remediation steps.
Audit authorization logic across the codebase: RBAC/ABAC role definitions, row-level security, multi-tenant data isolation, IDOR exposure, privilege escalation paths, and the presence of a default-deny posture. Produce a graded finding list with file references and remediation steps.
req.user / session.userId reference used as a filter but not validated against the resource owner.Map the permission model. Read role/permission definitions: look for roles, permissions, policies, guards, casl, casbin, oso, or hand-rolled arrays. Note whether it is RBAC (role-based), ABAC (attribute-based), or ad-hoc.
Enumerate entry points. List every HTTP route, GraphQL resolver, RPC handler, WebSocket event, and background job that touches user data. Cross-reference against middleware chains to confirm each entry point has an auth check before data access.
Check row-level isolation. For every DB query that returns potentially sensitive records, verify the WHERE clause includes tenant_id, org_id, or owner_id tied to the authenticated user — not just passed in from the request body.
Hunt for IDOR. Search for patterns where an ID from the request (path param, query string, body) is used directly in a lookup without ownership validation: findById(req.params.id) without AND owner = currentUser.
Verify default-deny. Confirm that a route/resource without an explicit allow rule is blocked, not allowed. Check the fallback/catch-all handler. Look for allowAll() or skipAuth() annotations and confirm they are intentional and documented.
Inspect privilege escalation paths. Look for self-service role assignment endpoints: can a regular user set role: "admin" in an update payload? Are role fields stripped before upsert?
Audit cross-tenant operations. In multi-tenant apps, check admin/support routes that bypass tenant filters. Confirm they require an explicit elevated role and log access.
Verify denied path responses. Confirm that unauthorized access returns 403 (not 404 leaking existence, not 200 with empty data that implies the resource does not exist). Check that error messages do not reveal tenant or user IDs.
Check test coverage. Look for tests that assert denied behavior: a user accessing another user's resource should return 403, not 200 or 404.
tenant_id filter only in some model methods, not all.credentials: true lets any origin make authenticated requests.role claim in a non-verified token grants elevated access.GET /resource/:id has ownership check but PUT /resource/:id does not./admin/ rely solely on path prefix, not on role assertion in middleware.Return a structured findings list:
## Authorization Review Findings
### Critical
- [FILE:LINE] Description of issue, attack vector, recommended fix.
### High
- ...
### Medium
- ...
### Low / Informational
- ...
### Verified OK
- List of patterns checked and confirmed safe.
### Coverage gaps
- Entry points without test coverage for denied paths.
Include: total routes/resolvers inspected, permission model identified, and the single highest-priority fix.
npx claudepluginhub fluxonlab/skillry --plugin skillry-securityProvides CDSS development patterns for drug interaction checking, dose validation, clinical scoring (NEWS2, qSOFA), and alert classification integrated into EMR workflows.