|
Option C Tools
|
Classes | |
| class | TestShannonEntropy |
| class | TestCheckEntropyViolations |
| class | TestEntropyIntegration |
| class | TestDocstringThresholds |
| class | TestFieldNameExclusions |
| class | TestExclusionValidation |
| class | TestWaiverModule |
Variables | |
| str | _B64_TEST_STR = "aB3dE7fG9hJ2kL5mN8pQ1rS4tU6vW0xY" |
| str | _MID_ENTROPY_STR = "abcdefghijklmnopqrstuvwxyz01" |
| str | _HIGH_ENTROPY_STR = "abcdefghijklmnopqrstuvwxyz0123456789AB" |
Purpose
-------
FS-507 regression coverage for Shannon entropy-based secret detection.
Responsibilities
----------------
- Validate ``_shannon_entropy()`` for known inputs.
- Validate ``_check_entropy_violations()`` for AST-level detection.
- Validate that ``check_no_hardcoded_secrets()`` integrates entropy checking.
- Validate threshold configurability and the ``--no-entropy`` opt-out.
Diagnostics
-----------
Domain: SECRET-SCAN-TESTS
Levels:
L2 — test lifecycle
L3 — assertion details
L4 — deep tracing
Contracts
---------
- Tests operate on in-memory strings and AST snippets; no files are
written.
|
protected |
Definition at line 205 of file test_entropy_detection.py.
|
protected |
Definition at line 209 of file test_entropy_detection.py.
|
protected |
Definition at line 207 of file test_entropy_detection.py.