Authentication security
Skill ahtishamshahzad/agent_dev_flow/.ai/skills/security/authentication-security
Tool-neutral AI Engineering System: 174 reusable skills (installable as Claude Code plugins) for planning and building software with AI agents. Classify → plan → approve → build under quality gates. Works with Claude Code, Codex, Cursor, Windsurf, Copilot & Antigravity. Canonical in .ai/.
npx -y skills add ahtishamshahzad/agent_dev_flow --skill authentication-securityAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
2 things to look at
- 20 days oldThe repository was created 20 days ago. New is not bad, but a brand new repository carrying a familiar-sounding name is the shape a typosquat arrives in, and there has been no time for anyone else to find a problem with it.
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Use to review authentication for security weaknesses — credential storage, session/token handling, brute-force and enumeration resistance, reset/OTP/MFA flows, and logout/revocation. The security-review lens on identity; backend-authentication is the design/build skill.
SKILL.md
5.3 KB, as published. Nobody here has run it
Authentication Security
Purpose
Assess whether the system's identity handling resists attack: are credentials stored safely, tokens/sessions handled correctly, flows enumeration- and brute-force-resistant, and revocation real. The review/audit lens; the design and construction live in ../../backend/backend-authentication.
When to Use
- Reviewing authentication design or an existing implementation for security.
- As the identity slice of
../../security-reviewandthreat-modelingspoofing/elevation threats. - Not for building auth (
../../backend/backend-authentication) or authorization (authorization-security).
Inputs
- The authentication design/implementation (
../../backend/backend-authentication). - Threat model's identity threats (
threat-modeling).
Discovery Questions
- How are passwords stored (adaptive hash?), and are secrets/tokens ever logged?
- Session vs JWT — is revocation actually possible, and does logout/password-change invalidate?
- Are login/reset flows resistant to brute force (
abuse-prevention) and account enumeration? - Are reset tokens/OTPs single-use, expiring, and attempt-limited? Is MFA (if present) implemented soundly?
Responsibilities
- Verify credential storage: adaptive hashing (bcrypt/argon2/scrypt), never plaintext or fast hashes; no credentials/tokens in logs, errors, or URLs.
- Assess session/token handling: httpOnly/secure/sameSite cookies for browsers (not localStorage tokens); short-lived access + rotating refresh with reuse detection for JWTs; signing keys managed (
secrets-audit). - Verify revocation is real: logout and password change invalidate sessions/tokens; a pure-stateless JWT with no denylist can't truly revoke — flag the gap.
- Check brute-force + enumeration resistance: login/reset/OTP throttled and CAPTCHA-guarded (
abuse-prevention); responses don't reveal whether an account exists. - Review flows: reset tokens single-use + expiring; OTP attempt-limited + expiring; MFA/recovery-code secrets stored safely; verification flows sound.
- Confirm findings become security regression tests (
security-regression-testing).
Required Workflow
- Review credential storage + secret handling.
- Assess session/token issuance, expiry, rotation, revocation.
- Check brute-force + enumeration resistance on public flows.
- Review reset/OTP/MFA flows for reuse/expiry/limits.
- Record findings (Confirmed vs Potential); route mitigations to build skills + regression tests.
Decision Rules
- Fast-hash or plaintext passwords = confirmed high-severity finding.
- If revocation is required but the token scheme can't do it, that's a design finding, not a nitpick.
- Enumeration-revealing responses on login/reset are real findings — attackers harvest valid accounts.
- Client-held auth state is a hint, never proof; server must verify every request.
Rules
- Never print discovered secrets/credentials — reference location, flag rotation (
secrets-audit). - Findings separated Confirmed vs Potential; never declare auth "secure" (
../../security-review). - Each finding maps to a fix + a regression test.
Anti-Patterns
- Reviewing auth as if "logged in" implied "authorized" (that's
authorization-security). - Passing an implementation with unrevocable long-lived tokens.
- Ignoring account enumeration in error messages/timing.
- Reset links that don't expire or reused OTPs.
- Treating rate limiting as the whole brute-force defense (it's one layer).
Validation Checklist
- Credential storage: adaptive hashing; no secret logging.
- Session/token: secure cookies / rotating refresh; keys managed.
- Revocation real (logout/password-change invalidate).
- Brute-force + enumeration resistance verified.
- Reset/OTP/MFA flows: single-use, expiring, attempt-limited.
- Findings → fixes → regression tests.
Definition of Done
A recorded authentication security assessment — credential storage, session/token handling, revocation, brute-force/enumeration resistance, and account flows — with Confirmed/Potential findings routed to fixes and security regression tests, and no "secure" claim.
Related Skills
../../backend/backend-authentication, authorization-security, abuse-prevention, secrets-audit, security-regression-testing, ../../security-review, threat-modeling, web-security, mobile-security.
Related Knowledge
../../../knowledge/ (identity threats, provider constraints).
Related References
../../../references/security/ (auth review checklists, when populated).
Context Loading Guidance
- Requires: the authentication design/impl, identity threats.
- Does not require: authorization model, unrelated code.
- May load:
../../backend/backend-authentication,abuse-prevention. - Stop when: findings + routed mitigations/regression tests are recorded.
Token Efficiency Guidance
The finding table (area → issue → severity → fix → test) is the artifact; never echo real credentials/secrets.