Skip to content

fix HexHighEntropyString to be greater then, and not equel greater than - #297

Merged
omriyoffe-panw merged 1 commit into
masterfrom
bugfix/HexHighEntropyString
Aug 19, 2026
Merged

fix HexHighEntropyString to be greater then, and not equel greater than#297
omriyoffe-panw merged 1 commit into
masterfrom
bugfix/HexHighEntropyString

Conversation

@GillSami

@GillSami GillSami commented Aug 19, 2026

Copy link
Copy Markdown
  • Please check if the PR fulfills these requirements
  • Tests for the changes have been added
  • Docs have been added / updated
  • All CI checks are green

Fix: restore exclusive entropy limit comparison

The entropy check was changed from > to >= in #294 (released in 1.5.48), making the limit inclusive. Values landing exactly on the limit are now reported — admin123 has entropy of exactly 3.0 and checkov configures a limit of exactly 3, so the same fixture string was flagged as CKV_SECRET_6 across 11 ARM test files and broke CI on unrelated PRs (bridgecrewio/checkov#7650). Confirmed as a regression: scanning those files with 1.5.47 is clean, 1.5.49 gives 11 findings, and the operator is the only difference.

This reverts the comparison to > and adds a regression test for the exact case that broke. It also fixes test_hex_string_at_threshold_is_detected, added in the same PR as the operator change — it asserted an 8-char string is detected at limit=3.0, which is unsatisfiable under exclusive comparison (8 chars caps at log2(8) = 3.0). It only passed because it was coupled to the bug, which is why this shipped green in 1.5.48 and 1.5.49. Its limit is now below 3.0 so it tests the short-circuit length boundary it was written for.

@omriyoffe-panw
omriyoffe-panw merged commit a12d54c into master Aug 19, 2026
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants