lab7: безопасность, mTLS, OpenBao и PKI lifecycle

This commit is contained in:
Vladislav Kunetskiy
2026-11-10 10:58:07 +03:00
parent 3d216fbd50
commit 3441f2269a
183 changed files with 216667 additions and 3165 deletions
-8
View File
@@ -12,12 +12,6 @@ PATTERNS = {
'private key': re.compile(r'BEGIN (?:RSA |EC |OPENSSH )?PRIVATE KEY'),
'bearer token': re.compile(r'Bearer\s+[A-Za-z0-9._-]{20,}'),
}
ALLOW = {
'PASSWORD=messenger',
'PASSWORD=messenger',
'password: messenger',
'POSTGRES_PASSWORD: messenger',
}
def main():
failures = []
@@ -31,8 +25,6 @@ def main():
for name, pattern in PATTERNS.items():
for match in pattern.finditer(text):
line = text[text.rfind('\n', 0, match.start()) + 1:text.find('\n', match.end())].strip()
if any(allowed in line for allowed in ALLOW):
continue
failures.append(f'{path.relative_to(ROOT)}: {name}: {line[:160]}')
if failures:
print('FAIL: evidence scanner found possible secrets/signatures')