audit-auth-and-access-control
Skill4 starsChanged 2 months agoMITView on GitHub
Audit authentication, session management, authorization checks, admin access, password reset flows, token storage, and cross-user data isolation. Use when reviewing login flows, protected routes, controllers, policies, database queries, or launch readiness for missing access controls and user data exposure risks.
In this repository25 other files it gives its agents.
- audit-asset-pipelineSkill
- audit-corsSkill
- audit-database-performanceSkill
- audit-input-validationSkill
- audit-rate-limitingSkill
- audit-resilience-and-observabilitySkill
- audit-secrets-and-configSkill
- audit-type-safetySkill
- ios-prelaunch-checklistSkill
- security-reviewSkill
- code-review-loopSkill
- error-logging-reviewSkill
- hive-parallel-review-loopSkill
- hive-review-loopSkill
- input-contract-hardeningSkill
- microskills-review-generatorSkill
- microskills-review-runnerSkill
- parallel-code-review-loopSkill
- perf-optimizationSkill
- parallel-plan-implementationSkill
- phase-commit-reviewerSkill
- product-implementation-plannerSkill
- product-plan-compilerSkill
- test-quality-reviewSkill
- verified-commit-splitSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 1 is distinctive, and 2 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈1
Distinctive · estimate
This author's own choices. Worth a look.
2
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 18
Check the required controls:
- Very specific: line 19
No auth tokens in localStorage or other XSS-exposed persistent storage unless the app has an explicit, documented threat-model exception.
- Very specific: line 43
Search for auth and ownership terms such as current_user, user_id, account_id, tenant_id, organization_id, role, admin, policy, authorize, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Audit Auth And Access Control
Find authentication and authorization paths where a user can stay logged in too long, escalate privileges, or access another user's data.
Workflow
- Map identity flows:
- Sign up, sign in, sign out, token refresh, session creation, password reset, email verification, magic links, OAuth callbacks, and mobile auth callbacks.
- Locate where auth tokens or session identifiers are stored on the client.
- Map protected surfaces:
- Server routes, controllers, page loaders, API handlers, admin routes, background actions, websocket channels, and storage/download endpoints.
- Identify the current-user lookup and authorization policy pattern used by the codebase.
- Check the required controls:
- No auth tokens in
localStorageor other XSS-exposed persistent storage unless the app has an explicit, documented threat-model exception. - Sessions and refresh tokens have TTLs and revocation paths.
- Password reset, email verification, and magic links expire and are single-use.
- Admin routes have role or permission checks at the server boundary.
- User-owned records are always scoped by the authenticated user or an explicit membership/permission relationship.
- No auth tokens in
- Review tests for negative cases:
- Unauthenticated access.
- Wrong role.
- Expired or reused reset token.
- User A reading, updating, deleting, exporting, or downloading user B's records.
Cross-User Data Isolation
For every handler that accepts an ID or slug, trace the query. Flag any path where lookup happens by record ID alone before checking ownership, membership, tenant, organization, or role. Prefer queries that include the current-user or current-tenant constraint in the database lookup itself.
Examples of risky patterns:
find(id)followed by no ownership check.- Client-supplied
user_id,account_id,tenant_id, ororganization_idtrusted directly. - Download routes or signed URLs generated without checking record ownership.
- Admin-only routes relying on hidden UI instead of server authorization.
Useful Searches
Search for auth and ownership terms such as current_user, user_id, account_id, tenant_id, organization_id, role, admin, policy, authorize, session, token, refresh, reset, magic, verify, localStorage, find, get, delete, update, and download.
Output
Lead with critical findings. For each finding include:
- File and line reference.
- Affected route or flow.
- Exploit sketch using realistic user roles.
- Existing control, if any.
- Suggested fix using the app's auth/policy conventions.
- Missing test that would prevent regression.
Include a coverage summary with counts for checked routes, protected routes, admin routes, and cross-user record lookups.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

