Skip to content

Commit

Permalink
Fix check bypass via square brackets Issue #857
Browse files Browse the repository at this point in the history
  • Loading branch information
tsigouris007 committed Jun 20, 2024
1 parent 10d13a8 commit f5be7c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion detect_secrets/core/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ def _process_line_based_plugins(
# filters return True.
for line_number, line in lines:
log.debug(f'Processing {filename}:{line_number}')
line = line.rstrip()
line = line.rstrip().replace("[", "\[").replace("]", "\]")
code_snippet = get_code_snippet(
lines=line_content,
line_number=line_number,
Expand Down

0 comments on commit f5be7c0

Please sign in to comment.