We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28ee726 commit 4ceff67Copy full SHA for 4ceff67
detect_secrets/filters/heuristic.py
@@ -165,6 +165,8 @@ def is_indirect_reference(line: str) -> bool:
165
166
secret = request.headers['apikey']
167
"""
168
+ # Constrain line length as the heuristic's intention is to target lines that resemble
169
+ # function calls. The constraint avoids catastrophic backtracking failures of the regex.
170
if len(line) > 1000:
171
return False
172
return bool(_get_indirect_reference_regex().search(line))
0 commit comments