# Crypto mis-use pre-scan

- target: `sample-repo`
- source files scanned: 2
- findings: HIGH 10 · MEDIUM 0 · LOW 1 · INFO 0

_Deterministic pre-scan — not an audit. Line-based; no dataflow, no runtime. A clean report is not proof of sound crypto._


## HIGH

- `auth.py:10` **PASSWORD-FASTHASH** — password hashed with a fast hash — use bcrypt/argon2/scrypt/PBKDF2
- `auth.py:14` **WEAK-RNG** — non-CSPRNG used where predictability may matter (secrets/tokens need crypto.random / secrets / SecureRandom / crypto/rand)
- `auth.py:18` **TLS-VERIFY-OFF** — TLS certificate verification disabled — MITM-exposes the connection
- `auth.py:22` **JWT-NOVERIFY** — JWT decoded without signature verification
- `auth.py:25` **HARDCODED-KEY** — literal key material assigned in source — move to env/secret store
- `session.ts:5` **WEAK-RNG** — non-CSPRNG used where predictability may matter (secrets/tokens need crypto.random / secrets / SecureRandom / crypto/rand)
- `session.ts:9` **JWT-NONE** — JWT alg=none — unsigned tokens, trivially forgeable
- `session.ts:13` **NODE-LEGACY-CIPHER** — deprecated createCipher/createDecipher — weak key derivation (MD5, no salt); use createCipheriv with random key+IV
- `session.ts:21` **STATIC-IV** — static/zero IV or nonce — IVs must be fresh and unpredictable per message
- `session.ts:23` **ECB-MODE** — ECB mode — leaks plaintext structure; use CBC/GCM w/ random IV

## LOW

- `session.ts:18` **WEAK-RNG** — non-CSPRNG used where predictability may matter (secrets/tokens need crypto.random / secrets / SecureRandom / crypto/rand)
