Skip to content
Skills Library
Security · Review & audit

cryptographic-failures

/cryptographic-failures

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/SSL settings. Also invoke when storing sensitive data at rest.

Repository
soundcheck ↗
Licence
MIT
Last repository change
30.07.2026

Assessment and security

90/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content25 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
4
Deprecation

No signals detected. Repository changed on 30.07.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

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/SSL settings. Also invoke when storing sensitive data at rest.

Original author description

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/SSL settings. Also invoke when storing sensitive data at rest.

How it works

  1. What this checks
  2. Vulnerable patterns
  3. Fix immediately
  4. Verification
  5. References
Original SKILL.md headings · 56 lines, 404 words
SKILL.md preview
---
name: cryptographic-failures
description: 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/SSL settings. Also invoke when storing sensitive data at rest.
---

# 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

- Password hashed with a fast or unsalted algorithm such as MD5, SHA1, or bare SHA-256
- Security-sensitive token, session ID, nonce, or key generated from a non-cryptographic PRNG
- Encryption or signing key declared as a hardcoded string in source
- Symmetric encryption using ECB mode, or CBC mode with no separate MAC
- A nonce or IV that is constant, zero, or reused across messages with the same key

## 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.
2. **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.
3. **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.
4. **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:

- [ ] Passwords are hashed with bcrypt, scrypt, or argon2 — never MD5, SHA1, or SHA256 alone
- [ ] All security tokens use the language's cryptographic random source — never a general-purpose PRNG
- [ ] No keys or secrets appear in source code; all loaded from environment or a secrets manager
- [ ] Symmetric encryption uses an authenticated mode (GCM, CCM, ChaCha20-Poly1305) — not ECB or CBC without MAC

## References

- CWE-327 ([Use of a Broken or Risky Cryptographic Algorithm](https://cwe.mitre.org/data/definitions/327.html))
- CWE-326 ([Inadequate Encryption Strength](https://cwe.mitre.org/data/definitions/326.html))
- CWE-330 ([Use of Insufficiently Random Values](https://cwe.mitre.org/data/definitions/330.html))
- [OWASP A04:2025 Cryptographic Failures](https://owasp.org/Top10/A02_2021-Cryptographic_Failures/)

Versions

The database has no other skills named cryptographic-failures.

Database snapshot: 13.11.2026 · package version 61b934b36bde (SHA-256 digest of the entire package)

Downloads in the last 30 days: 1 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100crypto
    This skill should be used when the user asks to "check for cryptographic issues", "analyze encryption", "find weak hashing", "audit password storage", "check for hardcoded keys", or mentions "cryptography", "encryption", "hashing", "TLS", "certificates", or "random number…
  • 90cryptography-sanity-check
    Use when code does anything cryptographic — hashing passwords, encrypting data, signing tokens, generating randomness — catch the common crypto misuse and never let anyone roll their own.
  • 90crypto-review
    Reviews symmetric and asymmetric cryptography, password hashing, randomness, JWT, TLS and key management in code, with the exact line and the secure alternative. Use when the code encrypts, signs, hashes or generates tokens.
  • 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,…
  • 90cryptography-standards
    Enforce correct cryptographic algorithms, hashing, and TLS standards. Use when: encrypt data, hash passwords, set tls policy.
  • 90Cryptographic Failures
    This skill should be used when the user asks about "cryptographic failures", "weak encryption", "hardcoded secrets", "insecure random", "MD5", "SHA1", "weak hashing", or needs to find crypto-related vulnerabilities during whitebox security review.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.