Build order step 3. Pure text -> findings detector ported from the llm-security entropy-scanner seed: - Length-calibrated Shannon-entropy classification (CRITICAL 5.4/128, HIGH 5.1/64, MEDIUM 4.7/40). - Shape floor: base64-like (len>100) / hex (len>64) reach at least MEDIUM even when entropy alone does not trigger — the only path that catches hex (16-symbol alphabet caps H at 4.0 < 4.7). - Decode-and-rescan (must-have): base64 blobs that decode to printable text are exposed on EntropyResult.decoded for a later lexicon rescan. - FP suppression scoped to the text-relevant subset (base64 media data-URI prefixes + SRI sha*- prefix); source-code-specific seed rules omitted. Exposes ported primitives shannon_entropy / is_base64_like / is_hex_blob / try_decode_base64. 16 new tests; full suite 31 green. Stdlib-only. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01K8GmKRCdsPjWYAKWsNgeQS |
||
|---|---|---|
| .. | ||
| test_entropy.py | ||
| test_report.py | ||
| test_sanitize.py | ||