-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmyplugin.py
More file actions
27 lines (16 loc) · 743 Bytes
/
myplugin.py
File metadata and controls
27 lines (16 loc) · 743 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#detect-secrets scan --custom-plugins testing/custom_plugins_dir/ --custom-plugins testing/hippo_plugin.py
import re
from detect_secrets.plugins.base import RegexBasedDetector
class PluginKeyDetector(RegexBasedDetector):
"""
Scans for private keys.
This checks for private keys by determining whether the denylisted
lines are present in the analyzed string.
"""
secret_type = 'Summved Key'
denylist = [
#re.compile(r'(?:\s|=|:|"|^)PWD[a-zA-Z0-9]{10,}'),
#re.compile(r'(?:\s|=|:|"|^)SUMM[\dABCDEF][a-zA-Z0-9]{8,}'), # SUMM Password
re.compile(r'pass|pwd|password|token|key|access_key|', re.IGNORECASE),
#re.compile(r'pass|pwd|password|token|key|'),
]