Cryptographic failures

From thejefflarson/soundcheck · View interactive version

Cryptographic failures is an AI agent skill from the GitHub repository thejefflarson/soundcheck. Detects weak or broken cryptography that lets attackers recover plaintext passwords, forge tokens, or decrypt sensitive data. Use when writing code that encrypts or decrypts data, hashes passwords or tokens, generates random values for security purposes, manages cryptographic keys, or configures TLS

How to use this skill

Skill file

Cryptographic Failures Security Check (A04:2025)

What this checks

Protects against weak or broken cryptography that allows attackers to recover

plaintext passwords, forge tokens, or decrypt sensitive data. Failures here

directly enable credential stuffing, account takeover, and data breach.

Vulnerable patterns

Fix immediately

Flag the vulnerable code and explain the risk. Then suggest a fix that establishes

these properties:

  1. Passwords go through a slow, salted, memory-hard hash — bcrypt, scrypt, or

argon2. Never MD5, SHA1, or SHA256-alone: they're fast enough to brute-force

billions of candidates per second on consumer GPUs. The salt is per-password

and stored alongside the hash, not a global constant.

  1. Security-sensitive randomness comes from a CSPRNG — the language's

documented cryptographic random source. Never a general-purpose PRNG or

time-seeded generator for tokens, session IDs, nonces, or keys.

  1. Symmetric encryption uses an authenticated mode — AES-GCM, AES-CCM, or

ChaCha20-Poly1305. ECB never; CBC only with a separate MAC (encrypt-then-MAC).

A fresh nonce per message, never reused with the same key.

  1. Keys live outside the source tree — environment variable, secrets manager,

KMS, or OS keystore. Never hardcoded literals, never committed config files.

Rotation requires touching infrastructure, not source.

Translate these principles to the audited file's language and platform. Use the

documented cryptographic primitives for that stack — do not reimplement hashing,

random, or AEAD from lower-level building blocks.

Verification

Confirm the response:

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.