authentication-failures
/authentication-failures
Detects weak password storage, flawed JWT validation, sessions surviving logout, and missing MFA in authentication code. Use when writing login flows, session management, password storage, JWT handling, MFA implementation, credential validation, or any code that authenticates users. Also invoke when implementing "remember me" functionality or API key management.
- Author
- thejefflarson ↗
- Repository
- soundcheck ↗
- Licence
- MIT
- Last repository change
- 30.07.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 3
No signals detected. Repository changed on 30.07.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Detects weak password storage, flawed JWT validation, sessions surviving logout, and missing MFA in authentication code. Use when writing login flows, session management, password storage, JWT handling, MFA implementation, credential validation, or any code that authenticates users. Also invoke when implementing "remember me" functionality or API key management.
Triggers from the description
Original author description
Detects weak password storage, flawed JWT validation, sessions surviving logout, and missing MFA in authentication code. Use when writing login flows, session management, password storage, JWT handling, MFA implementation, credential validation, or any code that authenticates users. Also invoke when implementing "remember me" functionality or API key management.
How it works
- What this checks
- Vulnerable patterns
- Fix immediately
- Verification
- References
SKILL.md preview
--- name: authentication-failures description: Detects weak password storage, flawed JWT validation, sessions surviving logout, and missing MFA in authentication code. Use when writing login flows, session management, password storage, JWT handling, MFA implementation, credential validation, or any code that authenticates users. Also invoke when implementing "remember me" functionality or API key management. --- # Authentication Failures Security Check (A07:2025) ## What this checks Protects identity and session integrity. Weak password storage, flawed JWT handling, and sessions that survive logout let attackers impersonate users, escalate privileges, and persist after credential rotation. ## Vulnerable patterns - JWT verification call with a weak, short, or hardcoded signing secret - JWT decode that disables signature verification or accepts the `none` algorithm - Logout handler that does not invalidate the session or token server-side - Login flow with no rate limiting or account lockout, allowing credential stuffing - Password or API-key comparison using a non-constant-time equality operator For password hashing issues (MD5/SHA), see `cryptographic-failures`. For hardcoded API keys/passwords in source, see `hardcoded-secrets`. ## Fix immediately Flag the vulnerable code and explain the risk. Then suggest a fix that establishes these properties: 1. **Signing keys come from outside the source tree** — environment variable, secret manager, or KMS. Enforce a minimum length or entropy check at load time so a misconfigured deploy fails loudly rather than silently using a tiny secret. 2. **JWT verification pins the accepted algorithm(s) to an explicit allowlist** that rejects `none` and rejects algorithm switching between symmetric and asymmetric families (the classic HS256-vs-RS256 public-key-as-HMAC attack). The check must be algorithm-specific, however the library expresses it. 3. **Logout invalidates credentials server-side.** Either delete a server session record, add the token to a revocation list, or rotate a per-user signing key. Short token expiry alone does not satisfy this — a stolen token works until it expires. The code must demonstrate an active revocation mechanism. 4. **Password and API-key comparisons are constant-time** — use the language's documented constant-time comparison primitive, never a plain equality operator. 5. **Login has a rate limit or lockout.** Credential stuffing is cheap; unbounded guess rates make every leaked password list a working brute-force dictionary. Translate these principles to the audited file's language and framework. Use the documented authentication and crypto APIs for that stack; do not roll your own. ## Verification Confirm these properties hold (language-agnostic): - [ ] JWT signing/verification keys are sourced from outside the source tree (environment variable, secret manager, KMS) AND the code enforces a minimum length/entropy check at load time — a comment asserting "must be ≥32 bytes" without a runtime check does not satisfy this - [ ] JWT verification pins the accepted algorithm(s) to an explicit allowlist that rejects `none` and rejects algorithm switching between symmetric and asymmetric families — whether expressed as a `algorithms=[...]` parameter, a `.withAlgorithm(...)` builder call, a `Validation::new(Algorithm::HS256)` constructor, or equivalent - [ ] A logout / session termination path exists that invalidates credentials server-side — either by deleting a server session record, adding the token to a revocation list (DB, Redis, in-memory set), or rotating a per-user signing key. Short token expiry alone does not satisfy this; the code must demonstrate an active revocation mechanism ## References - CWE-287 ([Improper Authentication](https://cwe.mitre.org/data/definitions/287.html)) - CWE-307 ([Improper Restriction of Excessive Authentication Attempts](https://cwe.mitre.org/data/definitions/307.html)) - [OWASP A07:2025 – Identification and Authentication Failures](https://owasp.org/Top10/A07_2021-Identification_and_Authentication_Failures/)
Versions
The database has no other skills named authentication-failures.
Database snapshot: 13.11.2026 · package version bb217469cac4 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 2 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100auth-system
Implement secure authentication and authorization systems with JWT, OAuth2, Session-based auth, and RBAC. Use when: (1) implementing user login/signup, (2) setting up JWT tokens, (3) OAuth2 integration (Google, GitHub, etc.), (4) role-based access control (RBAC), (5) password… - 100broken-auth-detector
OWASP A02 - Broken Authentication Detection. Use this skill when reviewing login systems, session management, password handling, or authentication flows. Activate when: login, authentication, password, session, token, JWT, OAuth, credentials, sign in, logout, remember me, forgot… - 90authentication-security
Review and harden authentication in a SaaS application — login, registration, password storage, sessions and cookies, JWT/API tokens, MFA, OAuth/SSO and account recovery. Use when touching auth code or auditing identity flows. - 90security-authentication-and-sessions
Assess and remediate authentication, sessions, identity tokens, mfa, federated sign-in and logout in frontend and associated web services. Use for login, session renewal or expiry, cookies, MFA, OAuth, OIDC, JWT, account recovery. - 90auth-mechanism-review
Reasons about authentication weaknesses (JWT flaws, session security, OAuth and OIDC flaws, brute-force surfaces, password storage) from code and docs evidence. Use when docs or route inventories describe login, sessions, token handling, OAuth callbacks, password reset or MFA. - 98reviewing-cryptography
Review cryptographic implementations and protocol usage for misuse — weak primitives, nonce and IV handling, key management, authentication of ciphertext, randomness, timing side channels, TLS and JWT configuration, and password storage. Use when auditing code that encrypts,…