Fix rule for private keys (#1072)

* refactor: fix rule for private keys

Wouldn't match old keys which have been created with the BLOCK statement at the beginning and end of the key.

* fix: rule for private keys

* fix: missing comma

Co-authored-by: Fabian F Groß <fabian.f.gross@deutschebahn.com>
This commit is contained in:
very-doge-wowandFabian F Groß authored and GitHub committed 2023-01-12 08:38:48 -06:00
1 parent d805fb9144
commit e002920355
2 files changed
+5 -2

No files matched your search

+1 -1
View File
@@ -2411,7 +2411,7 @@ keywords = [
[[rules]]
description = "Private Key"
id = "private-key"
regex = '''(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY----'''
regex = '''(?i)-----BEGIN[ A-Z0-9_-]{0,100}PRIVATE KEY( BLOCK)?-----[\s\S-]*KEY( BLOCK)?----'''
keywords = [
"-----begin",
]