Insecure design

From thejefflarson/soundcheck · View interactive version

Insecure design is an AI agent skill from the GitHub repository thejefflarson/soundcheck. Detects missing security controls — rate limits, MFA, re-auth — that should have been designed in from the start. Use when designing authentication flows, implementing rate limiting, building business logic for financial or access-sensitive operations, or writing code that enforces security requirem

How to use this skill

Skill file

Insecure Design Security Check (A06:2025)

What this checks

Catches security controls that were never designed in. Missing rate limiting,

skippable workflow steps, and unenforced re-authentication enable account takeover,

fraud, and privilege escalation.

Vulnerable patterns

Fix immediately

Flag the vulnerable code and explain the risk. Translate the principles below to the

audited file's language, web framework, and rate-limiter or session library — use that

stack's documented middleware rather than rolling your own.

For each finding, establish these properties:

  1. **Every credential-accepting endpoint has a rate limit or lockout keyed on a

caller-controlled identifier** (IP, username, email, or account id). Apply to

every such endpoint — login, password reset, MFA verify, token exchange,

re-auth — not just login. Unlimited retries are never acceptable.

  1. **Authentication failure responses do not distinguish "user not found" from

"wrong password"** — same message, same status code, same timing. Always

compute the password hash even when the user is missing (compare against a

dummy hash to equalize latency); short-circuit branches leak account existence.

  1. **Sensitive state changes (password change, email change, fund transfer, account

deletion, permission grant) require a check stronger than "session exists"** —

re-prompt for the current password, verify a step-up token, or require MFA.

  1. Multi-step workflows read the current step from server-side state —

session, database, or a signed token — never from a client-supplied parameter.

The server owns the progression.

  1. **No security-relevant decision (lockout status, step progression,

authorization level) is read from request parameters, cookies, or headers that

the client can freely modify.**

Verification

Confirm these properties hold for every endpoint present (language-agnostic;

criteria apply only to patterns actually present):

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.