Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: xDizzix <[email protected]>
  • Loading branch information
babenek and xDizzix authored Dec 12, 2024
1 parent 91156b5 commit 1506a9d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion credsweeper/filters/value_base64_part_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def run(self, line_data: LineData, target: AnalysisTarget) -> bool:
if hunk_size == 3 * len_value:
# simple analysis for maximal data size
if self.base64_pattern.match(line[left_start:right_end]):
# obviously case: all characters are base64 standard
# obvious case: all characters are base64 standard
return True
elif right_end - left_start >= 2 * len_value:
# simple analysis for data too large to yield sensible insights
Expand Down
2 changes: 1 addition & 1 deletion credsweeper/filters/value_entropy_base64_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
class ValueEntropyBase64Check(Filter):
"""Check that candidate have Shanon Entropy > 3 (for HEX_CHARS or BASE36_CHARS) or > 4.5 (for BASE64_CHARS)."""

# less size does not stable entropy - will be zero
# If the value size is less than this value the entropy evaluation gives an imprecise result
min_length = 12

def __init__(self, config: Config = None) -> None:
Expand Down

0 comments on commit 1506a9d

Please sign in to comment.