Skip to content
Skills Library
Security · Review & audit

crypto

/crypto

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 generation" in a security context. Maps to OWASP Top 10 2021 A02: Cryptographic Failures.

Repository
claude-code ↗
Licence
MIT
Last repository change
07.10.2026

Assessment and security

100/ 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.
Content35 / 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
2
Scripts
0
HTML comments
0
URLs in SKILL.md
0
Deprecation

No signals detected. Repository changed on 07.10.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

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 generation" in a security context. Maps to OWASP Top 10 2021 A02: Cryptographic Failures.

Triggers from the description

check for cryptographic issuesanalyze encryptionfind weak hashingaudit password storagecheck for hardcoded keyscryptographyencryptionhashing
Original author description

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 generation" in a security context. Maps to OWASP Top 10 2021 A02: Cryptographic Failures.

How it works

  1. Supported Flags
  2. Framework Context
  3. Detection Patterns
  4. Workflow
  5. What to Look For
  6. Scanner Integration
  7. Output Format
Original SKILL.md headings · 179 lines, 987 words
SKILL.md preview
---
name: crypto
description: >
  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 generation" in a security
  context. Maps to OWASP Top 10 2021 A02: Cryptographic Failures.
disable-model-invocation: true
---

# Cryptographic Failures (A02:2021)

Analyze source code for cryptographic weaknesses including use of broken or weak
algorithms, hardcoded encryption keys, improper password hashing, cleartext
transmission of sensitive data, missing encryption at rest, and insecure random
number generation.

## Supported Flags

Read `../../shared/schemas/flags.md` for the full flag specification. This skill
supports all cross-cutting flags. Key flags for this skill:

- `--scope` determines which files to analyze (default: `changed`)
- `--depth standard` checks imports, function calls, and configuration values
- `--depth deep` traces key material origin and data flow for sensitive values
- `--severity` filters output (crypto issues range from `low` to `critical`)

## Framework Context

Read `../../shared/frameworks/owasp-top10-2021.md`, section **A02:2021 -
Cryptographic Failures**, for the full category description, common
vulnerabilities, and prevention guidance.

Key CWEs in scope:
- CWE-261: Weak Encoding for Password
- CWE-327: Use of a Broken or Risky Cryptographic Algorithm
- CWE-328: Use of Weak Hash
- CWE-330: Use of Insufficiently Random Values
- CWE-331: Insufficient Entropy
- CWE-338: Use of Cryptographically Weak PRNG
- CWE-759: Use of a One-Way Hash without a Salt
- CWE-760: Use of a One-Way Hash with a Predictable Salt
- CWE-798: Use of Hard-coded Credentials

## Detection Patterns

Read `references/detection-patterns.md` for the full catalog of code patterns,
search heuristics, language-specific examples, and false positive guidance.

## Workflow

### 1. Determine Scope

Parse flags and resolve the file list per `../../shared/schemas/flags.md`.
Filter to files likely to contain cryptographic operations:

- Crypto/security utility modules (`**/crypto/**`, `**/security/**`, `**/utils/encrypt*`)
- Authentication modules (`**/auth/**`, `**/login/**`, `**/password*`)
- Configuration files (`**/.env*`, `**/config/**`, `**/settings*`)
- Database models with password fields (`**/models/**`)
- TLS/SSL configuration (`**/ssl/**`, `**/tls/**`, `**/certs/**`)

### 2. Check for Available Scanners

Detect scanners per `../../shared/schemas/scanners.md`:

1. `semgrep` — primary scanner for crypto pattern detection
2. `bandit` — Python-specific weak crypto detection
3. `gosec` — Go-specific crypto issues
4. `gitleaks` / `trufflehog` — hardcoded keys and secrets

Record which scanners are available and which are missing.

### 3. Run Scanners (If Available)

If semgrep is available:
```
semgrep scan --config auto --json --quiet <target>
```
Filter results to rules matching cryptographic patterns, weak hashing, hardcoded
keys, and TLS configuration. Normalize output to the findings schema.

If gitleaks is available (for hardcoded key detection):
```
gitleaks detect --source <target> --report-format json --report-path /dev/stdout --no-banner
```

### 4. Claude Code Analysis

Regardless of scanner availability, perform manual code analysis:

1. **Hash algorithm audit**: Grep for MD5, SHA1, SHA-256 (without key) used in
   security contexts (password hashing, token generation, signature verification).
2. **Key management**: Find encryption keys, API secrets, and IVs — check if
   they are hardcoded, loaded from environment, or from a key management service.
3. **Password storage**: Locate password hashing code and verify use of bcrypt,
   argon2, or scrypt with appropriate cost factors.
4. **Random number generation**: Find random value generation and verify
   cryptographically secure sources are used for security-sensitive operations.
5. **TLS configuration**: Check for TLS enforcement, certificate validation,
   and minimum protocol version.
6. **Encryption mode**: Identify block cipher usage and verify ECB mode is not
   used for anything beyond single-block encryption.

When `--depth deep`, additionally trace:
- Where encryption keys originate and how they flow through the application
- Whether sensitive data is encrypted before storage and in transit
- Key rotation mechanisms and lifecycle

### 5. Report Findings

Format output per `../../shared/schemas/findings.md` using the `CRYPT` prefix
(e.g., `CRYPT-001`, `CRYPT-002`).

Include for each finding:
- Severity and confidence
- Exact file location with code snippet
- Impact description specific to the cryptographic weakness
- Concrete fix with diff showing the secure alternative
- CWE and OWASP references

## What to Look For

These are the high-signal patterns specific to cryptographic failures. Each
maps to a detection pattern in `references/detection-patterns.md`.

1. **Weak hash algorithms for security** — MD5 or SHA1 used for password
   hashing, token generation, integrity verification, or digital signatures.

2. **Hardcoded encryption keys and IVs** — Symmetric keys, asymmetric private
   keys, or initialization vectors embedded directly in source code.

3. **Insecure random number generation** — `Math.random()`, `rand()`, or
   `random.random()` used for tokens, session IDs, or cryptographic operations.

4. **Password storage without proper hashing** — Passwords stored in plaintext,
   with reversible encryption, or with fast hashes (MD5, SHA-family) instead of
   purpose-built password hashing functions.

5. **ECB mode usage** — Block cipher encryption using ECB mode, which reveals
   patterns in the plaintext.

6. **Missing TLS enforcement** — HTTP used where HTTPS is required, disabled
   certificate validation, or outdated TLS versions allowed.

7. **Insufficient key derivation** — Using encryption keys directly from
   passwords without a proper key derivation function (PBKDF2, HKDF).

8. **Static or predictable IVs/nonces** — Initialization vectors or nonces
   that are hardcoded, reused, or derived from predictable sources.

## Scanner Integration

| Scanner | Coverage | Command |
|---------|----------|---------|
| semgrep | Weak crypto, hardcoded keys, insecure random | `semgrep scan --config auto --json --quiet <target>` |
| bandit | Python crypto issues (MD5, DES, hardcoded passwords) | `bandit -r <target> -f json -q` |
| gosec | Go crypto (weak TLS, hardcoded creds) | `gosec -fmt json ./...` |
| gitleaks | Hardcoded keys and secrets | `gitleaks detect --source <target> --report-format json --report-path /dev/stdout --no-banner` |

**Fallback (no scanner)**: Use Grep with patterns from `references/detection-patterns.md`
to find hash function calls, encryption operations, key assignments, and random
number generation. Report findings with `confidence: medium`.

Relevant semgrep rule categories:
- `python.cryptography.security.insecure-hash-*`
- `python.cryptography.security.insecure-cipher-*`
- `javascript.crypto.security.weak-*`
- `java.crypto.security.weak-*`
- `generic.secrets.security.detected-*`

## Output Format

Use the findings schema from `../../shared/schemas/findings.md`.

- **ID prefix**: `CRYPT` (e.g., `CRYPT-001`)
- **metadata.tool**: `crypto`
- **metadata.framework**: `owasp`
- **metadata.category**: `A02`
- **references.owasp**: `A02:2021`
- **references.stride**: `I` (Information Disclosure) or `T` (Tampering)

Severity guidance for this category:
- **critical**: Plaintext password storage, hardcoded production encryption keys, disabled TLS verification
- **high**: MD5/SHA1 for password hashing, ECB mode on sensitive data, `Math.random()` for tokens
- **medium**: Weak key derivation, outdated TLS versions (TLS 1.0/1.1), missing encryption at rest
- **low**: SHA-256 for password hashing (not broken but not ideal), non-security use of weak hash
Files in this package (2)
  • SKILL.md 8 KB
  • references/detection-patterns.md 22 KB

Versions

RepositoryScoreLicence
This page · florianbuetow/claude-code100MIT
cryptoquantofficial/cryptoquant-skills100MIT

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

Downloads in the last 30 days: 3 · ranking

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

Similar skills

  • 90cryptographic-review
    Finds cryptographic failures (weak hashing, insecure modes, hardcoded keys, weak PRNG, disabled TLS verification) from code evidence. Use when docs or code cover password storage, encryption, token or API key generation, outbound HTTPS or key management.
  • 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.
  • 90security-crypto-and-data
    Assess and remediate cryptography, transport security, data protection and privacy boundaries in frontend and associated web services. Use for encryption, TLS, PII, keys, hashing, secrets in storage, client data.
  • 100cryptography
    Application-level cryptography. Password hashing (bcrypt, argon2), encryption (AES-GCM), digital signatures, key management, and secure random generation. USE WHEN: user mentions "encryption", "hashing", "bcrypt", "argon2", "AES", "cryptography", "digital signature", "key…
  • 90cryptographic-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…
  • 90cryptographic-design-review
    Review cryptographic design and usage — algorithm and mode choices (AEAD, KDFs, password hashing), randomness, key management and rotation, TLS configuration, token signing (JWT/JWS), envelope encryption, crypto-agility and post-quantum migration planning (ML-KEM, ML-DSA). Use…

Feedback and reports

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