Authentication failures

From thejefflarson/soundcheck · View interactive version

Authentication failures is an AI agent skill from the GitHub repository thejefflarson/soundcheck. 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

How to use this skill

Skill file

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

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.

  1. 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.

  1. 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.

  1. Password and API-key comparisons are constant-time — use the language's

documented constant-time comparison primitive, never a plain equality operator.

  1. 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):

References

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.