agentleFS
n-n-coden-n-code/n-n-code-skills/.agents/skills/security-identity-access/SKILL.md

security-identity-access

Skill4 starsChanged 11 days agoMITView on GitHub

Companion overlay used only with `security` when explicitly security-focused review, threat model, or implementation centers on authentication, sessions, recovery, MFA or passkey lifecycle, federation or account linking, identity-provider or recovery callbacks, invitations, or tenant authorization. Never use alone or for routine login, signup, user-model, RBAC, or backend work without a security objective.

The file

We split this skill into the rules it gives an agent

11 rules. About 0 are common, 10 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈10

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use this companion only with security.

    line 8
  2. Distinctive:

    Use these compact invariants:

    line 46
  3. Distinctive:

    Read only the references that match the boundary under review:

    line 71
  4. Distinctive:

    Check framework, provider, and repository protections before reporting.

    line 85
  5. Distinctive:

    Verify version- or protocol-dependent conclusions against current official specifications and the deployed implementation.

    line 86
  6. Distinctive:

    Keep authentication, account linking, membership, and authorization as separate decisions.

    line 101
  7. Distinctive:

    Treat enrollment, replacement, removal, recovery, and trusted-device changes as privileged identity transitions, not merely profile updates.

    line 108
  8. Distinctive:

    Do not flag client-selected tenant context when a mandatory trusted server layer re-derives and enforces applicable authoritative or …

    line 113
  9. Distinctive:

    Do not require every authorization check to appear in the endpoint when a demonstrably mandatory lower layer enforces the same invariant.

    line 116
  10. Distinctive:

    Do not report persistent sessions, federated login, syncable passkeys, or redirects as vulnerabilities by category alone.

    line 118
  11. Distinctive:

    Do not import assurance levels, time limits, algorithms, or provider assumptions from a standard without showing that the deployment adopts …

    line 121

≈ “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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Security Identity Access

Use this companion only with security. If security is not applicable, do not apply this overlay.

Composition Contract

security remains primary and owns investigation authority, attacker and trust boundary analysis, evidence outcomes, severity and confidence, remediation, validation, and report shape.

This companion owns identity-specific state and transition modeling, authentication and session invariants, recovery and federation risks, tenant authorization, and routing to selectively needed identity detail. Matching backend and language skills still own ordinary implementation mechanics.

Model The Identity Boundary

Map the repository's actual objects and names. Do not invent states merely to fit this model.

ObjectState or binding to establish
principal or accountlifecycle state and usable identifiers
authenticator or factorpending, bound, active, replaced, lost, or revoked
transaction or capabilitypurpose, subject, initiating context, expiry, and unused or consumed state when one-time
session or tokenprincipal, authentication event, issue time, expiry, rotation, and revocation
membership or grantprincipal, tenant, role or capability, resource scope, and lifecycle state
external identitytrusted issuer or security domain plus its stable subject identifier

For every security-relevant transition, establish as applicable:

  • who or what may initiate it
  • which authenticated, verified, or recent state it requires
  • which principal, purpose, transaction, client, tenant, and destination it is bound to
  • whether authorization is re-evaluated at use time
  • whether consumption and state mutation are atomic
  • which sessions, credentials, grants, caches, or notifications it affects

Use these compact invariants:

accepted state-changing transition =
  valid actor or proof and authorized transition
  and required valid transaction, event, assertion, or capability bindings
  and atomic or otherwise replay-safe authoritative mutation

effective authority =
  principal, applicable grant or membership, and policy state
  are authoritative or sufficiently current for the accepted revocation window
  and target action/resource is within server-authorized scope

Client-selected identity, tenant, role, redirect, or resource values may select a candidate context. They do not grant authority.

Workflow

  1. Confirm that security is primary and identify its active mode. Stop using this companion if the task is only routine auth implementation or generic access-control design.
  2. Inspect the actual identity objects, entrypoints, storage, middleware, provider configuration, and deployment boundaries before forming findings.
  3. Model the relevant states, bindings, transitions, and invalidation effects.
  4. Read only the references that match the boundary under review:
    • Sessions for session, cookie, token, refresh, logout, or revocation behavior
    • Recovery, invitations, and factor lifecycle for verification, recovery, enrollment, replacement, backup-code, or trusted-device flows
    • Federation, account linking, and passkeys for OAuth, OIDC, SAML, SSO, external identities, or WebAuthn
    • Tenant authorization for membership, role, organization switching, resource scope, or cross-tenant paths
  5. Trace a concrete abuse path from an attacker-reachable or attacker-influenceable condition, or stale identity state, through an accepted transition or authorization decision to an impacted account, credential, privilege, or tenant asset.
  6. Check framework, provider, and repository protections before reporting. Verify version- or protocol-dependent conclusions against current official specifications and the deployed implementation.
  7. Fix or report through security. Add the violated identity invariant, state transition, relevant binding, and invalidation effect to its normal evidence and impact analysis.

Critical Correctness Rules

  • An absolute callback URL is only syntactically absolute; it is not thereby trusted. Require the applicable protocol's registered-target and transaction-binding rules, or trusted server-side construction for non-protocol callbacks.
  • Protect authenticator material according to how verification uses it. One-way-verifiable backup codes, reversibly needed OTP seeds, passkey public credentials, and trusted-device tokens do not share one storage rule.
  • Keep authentication, account linking, membership, and authorization as separate decisions. A valid external identity or session does not establish local tenant authority.
  • Re-evaluate authorization for privilege changes, tenant switches, invitations, and sensitive resource access against authoritative or sufficiently current server-controlled state with an explicit acceptable revocation window.
  • Treat enrollment, replacement, removal, recovery, and trusted-device changes as privileged identity transitions, not merely profile updates.

False-Positive Guards

  • Do not flag client-selected tenant context when a mandatory trusted server layer re-derives and enforces applicable authoritative or sufficiently current grants and resource scope on every sensitive path.
  • Do not require every authorization check to appear in the endpoint when a demonstrably mandatory lower layer enforces the same invariant.
  • Do not report persistent sessions, federated login, syncable passkeys, or redirects as vulnerabilities by category alone. Demonstrate a broken binding, transition, invalidation rule, or attacker-reachable trust failure.
  • Do not import assurance levels, time limits, algorithms, or provider assumptions from a standard without showing that the deployment adopts that profile.

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.