Login Security Review
Reviews your login, session, JWT and OAuth code for the flaws that lead to account takeover.
Claude's review
7/10 Deep authentication review guide covering JWT pinning, host header reset links, MFA step up, passkeys, SAML wrapping and account linking, with severities and non findings.
We asked Claude the question you would ask: would I be glad I installed this? Two separate reviews, the second blind to the first, must both rate a skill 7 or higher before we sell it.
In detail
Use when the diff touches login, password storage, sessions, cookies, JWT verification, OAuth/OIDC or SAML flows, MFA and step-up, passkeys/WebAuthn, account linking and recovery, password reset, webhook signatures, API keys, mTLS identity or headers used to identify a caller
How you use it
- Add it to your pack, then download your pack (1 credit).
- In Claude, open Customize > Skills and upload the zip. Code execution needs to be on under Settings > Capabilities.
- Ask Claude for the job in your own words. It uses the skill when your request matches what it does. Step by step guide
Safety check
Nothing risky found: no hidden instructions, no download and run, no reading of saved passwords or keys.
An automated scan lowers risk but cannot promise zero risk. How we check skills
Preview
The first lines of SKILL.md
---
name: authn-sessions-and-tokens
category: security
description: Use when the diff touches login, password storage, sessions, cookies, JWT verification, OAuth/OIDC or SAML flows, MFA and step-up, passkeys/WebAuthn, account linking and recovery, password reset, webhook signatures, API keys, mTLS identity or headers used to identify a caller
tech_stack: Web & API
source: original; cloudflare/security-audit-skill (MIT) browser-session, federated-identity, MFA/passkey, account-transition, API-key and mTLS attack classes, adapted; informed by trailofbits/skills (CC BY-SA 4.0, ideas only, own wording); OWASP Top 10:2025 A07, ASVS 5.0 V6/V7/V9/V10 and CWE cited by name only
---
# Authentication, Sessions and Tokens
## Overview
Authentication bugs are rarely missing code; they are code that verifies the wrong thing, verifies with the wrong key, or trusts a value the attacker sends. Read every check as "what exactly is compared to what, and who chose each side?"
**Core principle:** the server decides the algorithm, the key, the audience and the identity — never the token, the header or the client.
## 1. Password Storage (CWE-916)
- ✅ argon2id, bcrypt (cost ≥ 10; note its 72-byte input limit), scrypt, or PBKDF2 with a high iteration count — through the framework's password hasher when there is one.
- ❌ MD5, SHA-1, SHA-256/512 (single or few rounds, salted or not), or reversible encryption of passwords.
```python
# ❌
user.password = hashlib.sha256(pw.encode()).hexdigest()
# ✅
user.password = argon2.PasswordHasher().hash(pw) # or Django's make_password
```
## 2. JWT Verification (CWE-347)
```js
// ❌ decode() does not verify; the header's alg is trusted
const claims = jwt.decode(token);
// ❌ no algorithm pinned: an RS256 public key can be used as an HS256 secret
const claims = jwt.verify(token, publicKey);
// ✅
const claims = jwt.verify(token, publicKey, { algorithms: ["RS256"], audience: "api", issuer: ISS });
```
```python
# ❌
...From makifbaysal's repository, Apache-2.0 licence.
Related skills
-
Checked
Codebase quality audit
Audits a whole code repo for bugs, security holes, slow paths and dead code, ranked in plain English.
7/101 credit -
Checked
Security and CVE audit
Runs a security and CVE audit on code in any language and scores it out of 100, with false alarms filtered.
7/101 credit -
Checked
OWASP code review
Reviews code for security flaws using the latest OWASP Top 10 lists, including those for AI and agent apps.
7/101 credit -
Checked
Code security hardening
Hardens code that handles user input, logins and data against the OWASP Top 10, starting from a threat model.
7/101 credit -
Checked
Android intent security
Audits Android components and incoming intents to fix redirection and unauthorised access holes in your app.
8/101 credit -
Checked
Fuzz harness planning
Plans fuzz harness scope and fuzzer choice for code you are authorised to test, so real bugs surface sooner.
7/101 credit