Skip to content

Commit

Permalink
Update comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jpdakran committed Feb 7, 2022
1 parent 222619e commit e87fbad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions detect_secrets/filters/heuristic.py
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ def is_indirect_reference(line: str) -> bool:
secret = request.headers['apikey']
"""
# Constain lines as the heuristics intention is to target relatively short function like strings
# This constraint also avoids catastrophic backtracking failures of the regex.
# Constrain line length as the heuristic's intention is to target lines that resemble
# function calls. The constraint avoids catastrophic backtracking failures of the regex.
if len(line) > 1000:
return False
return bool(_get_indirect_reference_regex().search(line))
Expand Down

0 comments on commit e87fbad

Please sign in to comment.