regex_and_entropy_config.toml 741 B

1234567891011121314151617
  1. # This config contains a single rule which defines a regex and a range of entropy values. If a rule has
  2. # both regex and entropy then that rule uses BOTH the regex and entropy in combination when performing an scan.
  3. # In other words, if a line of code has an entropy value that is within the range of the entropies defined and
  4. # a regex match is found then that line of code contains a leak.
  5. # So, for this example if a line of code has an entropy value of 4.6 AND matches the regex below then we got a leak.
  6. [[rules]]
  7. description = "entropy and regex"
  8. regex = '''(?i)key(.{0,20})?['|"][0-9a-zA-Z]{16,45}['|"]'''
  9. tags = ["entropy"]
  10. [[rules.Entropies]]
  11. Min = "4.5"
  12. Max = "5.7"
  13. [[rules.Entropies]]
  14. Min = "5.5"
  15. Max = "6.3"