From appsec
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.
npx claudepluginhub florianbuetow/claude-code --plugin appsecThis skill uses the workspace's default tool permissions.
Analyze source code for cryptographic weaknesses including use of broken or weak
Acquire memory dumps from live systems/VMs and analyze with Volatility 3 for processes, networks, DLLs, injections in incident response or malware hunts.
Provides x86-64/ARM disassembly patterns, calling conventions, control flow recognition for static analysis of executables and compiled binaries.
Identifies anti-debugging checks like IsDebuggerPresent, NtQueryInformationProcess in Windows binaries; suggests bypasses via patches/hooks/scripts for malware analysis, CTFs, authorized RE.
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.
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)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:
Read references/detection-patterns.md for the full catalog of code patterns,
search heuristics, language-specific examples, and false positive guidance.
Parse flags and resolve the file list per ../../shared/schemas/flags.md.
Filter to files likely to contain cryptographic operations:
**/crypto/**, **/security/**, **/utils/encrypt*)**/auth/**, **/login/**, **/password*)**/.env*, **/config/**, **/settings*)**/models/**)**/ssl/**, **/tls/**, **/certs/**)Detect scanners per ../../shared/schemas/scanners.md:
semgrep — primary scanner for crypto pattern detectionbandit — Python-specific weak crypto detectiongosec — Go-specific crypto issuesgitleaks / trufflehog — hardcoded keys and secretsRecord which scanners are available and which are missing.
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
Regardless of scanner availability, perform manual code analysis:
When --depth deep, additionally trace:
Format output per ../../shared/schemas/findings.md using the CRYPT prefix
(e.g., CRYPT-001, CRYPT-002).
Include for each finding:
These are the high-signal patterns specific to cryptographic failures. Each
maps to a detection pattern in references/detection-patterns.md.
Weak hash algorithms for security — MD5 or SHA1 used for password hashing, token generation, integrity verification, or digital signatures.
Hardcoded encryption keys and IVs — Symmetric keys, asymmetric private keys, or initialization vectors embedded directly in source code.
Insecure random number generation — Math.random(), rand(), or
random.random() used for tokens, session IDs, or cryptographic operations.
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.
ECB mode usage — Block cipher encryption using ECB mode, which reveals patterns in the plaintext.
Missing TLS enforcement — HTTP used where HTTPS is required, disabled certificate validation, or outdated TLS versions allowed.
Insufficient key derivation — Using encryption keys directly from passwords without a proper key derivation function (PBKDF2, HKDF).
Static or predictable IVs/nonces — Initialization vectors or nonces that are hardcoded, reused, or derived from predictable sources.
| 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-*Use the findings schema from ../../shared/schemas/findings.md.
CRYPT (e.g., CRYPT-001)cryptoowaspA02A02:2021I (Information Disclosure) or T (Tampering)Severity guidance for this category:
Math.random() for tokens