Skip to content

Commit

Permalink
at least 3 digits in the token
Browse files Browse the repository at this point in the history
  • Loading branch information
babenek authored Dec 5, 2024
1 parent 18cd0b2 commit 28f672b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion credsweeper/filters/value_atlassian_token_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ def check_atlassian_struct(value: str) -> bool:
# there is limit for big integer value: math.log10(1<<64) = 19.265919722494797
if 0 < delimiter_pos <= 20:
val = decoded[:delimiter_pos].decode(LATIN_1)
if int(val):
# at least 3 digits in the token
if 100 < int(val):
# test for ascii and Shannon entropy - there should be random data
data = decoded[delimiter_pos + 1:]
return Util.is_ascii_entropy_validate(data)
Expand Down

0 comments on commit 28f672b

Please sign in to comment.