Skip to content

Commit d25d51d

Browse files
authored
chore: remove consideration of line break characters to reduce whitespace false positives (#1205)
Instead of considering \s, which includes line break whitespace, we only consider space and \t. Signed-off-by: Carl Flottmann <[email protected]>
1 parent 736dbf8 commit d25d51d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/macaron/resources/pypi_malware_rules/obfuscation.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,6 @@ rules:
321321
severity: ERROR
322322
pattern-either: # The 50 here is the threshold for excessive spacing , more than that is considered obfuscation
323323
# there is excessive spacing after a ";", marking the end of a statement, then additional code.
324-
- pattern-regex: ;[\s]{50,}(\S)+
324+
- pattern-regex: ;[\t ]{50,}(\S)+
325325
# there is excessive spacing before a ";", and any amount of whitespace before additional code.
326-
- pattern-regex: '[\s]{50,};[\s]*(\S)+'
326+
- pattern-regex: '[\t ]{50,};[\t ]*(\S)+'

0 commit comments

Comments
 (0)