fix HexHighEntropyString to be greater then, and not equel greater than - #297
Merged
Conversation
omriyoffe-panw
approved these changes
Aug 19, 2026
tsila-hamer
approved these changes
Aug 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.