一键导入
cryptographic-failures
Checks for weak or missing encryption before any code handling passwords, tokens, PII, or sensitive data is written or modified.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Checks for weak or missing encryption before any code handling passwords, tokens, PII, or sensitive data is written or modified.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Full pre-ship security review that runs all ten OWASP Top 10 checks in sequence. Use before any significant feature ships to production.
Checks for server-side request forgery risk before any code that makes outbound HTTP requests based on user-supplied URLs or parameters is written or modified.
Requires structured security event logging before any authentication, authorization, or sensitive data access code ships.
Checks deserialization safety, CI/CD pipeline integrity, and dependency integrity before any code that deserializes objects or executes pipeline scripts is written or modified.
Enforces secure authentication patterns before any login, session, token, or credential management code is written or modified.
Checks CVE status, license compatibility, and maintenance health of any new dependency before it enters the codebase.
| name | cryptographic-failures |
| description | Checks for weak or missing encryption before any code handling passwords, tokens, PII, or sensitive data is written or modified. |
| when_to_use | Apply automatically when writing or modifying code that handles passwords, API keys, tokens, PII, health data, financial data, or any data transmitted over a network. |
Cryptographic failures happen when sensitive data is exposed because it was stored or transmitted without adequate protection. An agent generating data persistence or transmission code defaults to what works, not what is safe. MD5 works. SHA1 works. Storing passwords in plaintext works. None of them are acceptable.
1. Passwords Must be stored using an adaptive hashing algorithm: bcrypt, scrypt, Argon2, or PBKDF2. MD5, SHA1, SHA256, and SHA512 are not password hashing algorithms. If the code stores a password, the hash function must be one of the four above.
2. Sensitive data at rest PII, financial data, health records, and API keys must be encrypted at rest. "Stored in the database" is not the same as "encrypted." Check whether the column, file, or object is encrypted. If the ORM or storage layer does not handle it, application-level encryption is required.
3. Sensitive data in transit All transmission of sensitive data must use TLS 1.2 or higher. HTTP endpoints that accept credentials, tokens, or PII are a block condition.
4. Weak algorithms Flag and block use of: MD5, SHA1, DES, 3DES, RC4, ECB mode for block ciphers. These are broken or deprecated for security use.
5. Hardcoded secrets API keys, passwords, encryption keys, or tokens hardcoded in source code are a block condition. Secrets belong in environment variables or a secrets manager, not in code.
## Cryptographic Failures Check
**Data type handled:** [passwords / PII / tokens / financial / other]
**Storage method:** [database column / file / object store / in-memory only]
**Transmission method:** [HTTPS / HTTP / internal only]
### Findings
- Password hashing algorithm: [algorithm name or "not applicable"]
- Encryption at rest: [yes / no / not applicable]
- Transport security: [TLS version or "HTTP — BLOCKED"]
- Weak algorithms detected: [list or "none"]
- Hardcoded secrets detected: [yes / no]
### Verdict
[CLEAR / BLOCKED — list each block condition]
Block and require resolution before writing code if:
# Good: Argon2 for password hashing
from argon2 import PasswordHasher
ph = PasswordHasher()
hashed = ph.hash(user_password)
# Good: secrets from environment
import os
api_key = os.environ["THIRD_PARTY_API_KEY"]
# Bad: SHA256 for password storage
import hashlib
hashed = hashlib.sha256(password.encode()).hexdigest()
# Bad: hardcoded secret
API_KEY = "sk-live-abc123def456"