Skip to content

Commit 04dbd2d

Browse files
committed
Merge branch 'main' into awsm
2 parents d4e825d + 03aca63 commit 04dbd2d

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

constants.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@
66
OTHER_CATEGORY = "Other"
77
PRIVATE_KEY_CATEGORY = "PEM Private Key"
88
# the rules may have multiline markup and should be skipped for single line obfuscation
9-
MULTI_PATTERN_RULES = ("AWS Multi", "Google Multi", "JWK", OTHER_CATEGORY, PRIVATE_KEY_CATEGORY)
9+
MULTI_PATTERN_RULES = ("AWS Multi", "Google Multi", "JWK")
10+
# the rules may be multiline
11+
MULTI_LINE_RULES = MULTI_PATTERN_RULES + (OTHER_CATEGORY, PRIVATE_KEY_CATEGORY)

review_data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
from colorama import Fore, Back, Style
2020

21-
from constants import LABEL_OTHER, LABEL_FALSE, LABEL_TRUE, MULTI_PATTERN_RULES, OTHER_CATEGORY
21+
from constants import LABEL_OTHER, LABEL_FALSE, LABEL_TRUE, OTHER_CATEGORY, MULTI_LINE_RULES
2222
from meta_cred import MetaCred
2323
from meta_row import read_meta, MetaRow
2424

@@ -201,7 +201,7 @@ def review(meta_dir: str,
201201
print(f"Too long for Password TRUE markup!\n{row}", flush=True)
202202
errors += 1
203203

204-
if row.LineStart != row.LineEnd and not any(x in row.Category.split(':') for x in MULTI_PATTERN_RULES) and 'Multi' not in row.Category :
204+
if row.LineStart != row.LineEnd and not any(x in row.Category.split(':') for x in MULTI_LINE_RULES):
205205
print(f"Check multiline markup - may be not suitable for the category!\n{row}", flush=True)
206206
errors += 1
207207

0 commit comments

Comments
 (0)