-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcli.py
More file actions
42 lines (32 loc) · 1.06 KB
/
cli.py
File metadata and controls
42 lines (32 loc) · 1.06 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
"""
CLI argument configuration for SentinelScan.
Parses the target scan path and optional output controls.
"""
import argparse
parser = argparse.ArgumentParser(
description="Scan a directory for hardcoded secrets in Python files"
)
# Required target directory to scan.
parser.add_argument("path", help="Path to the directory to scan")
# Output findings as machine-readable JSON.
parser.add_argument("--json", action="store_true", help="Output findings as JSON")
# Limit displayed findings to a selected severity.
parser.add_argument(
"--severity",
choices=["LOW", "MEDIUM", "HIGH"],
help="Only show findings matching the selected severity",
)
# Limit displayed findings to a selected confidence level.
parser.add_argument(
"--confidence",
choices=["LOW", "MEDIUM", "HIGH"],
help="Only show findings matching the selected confidence level",
)
# Mask detected secret values in text or JSON output.
parser.add_argument(
"--redact",
action="store_true",
help="Redact detected secret values",
)
def return_args():
return parser.parse_args()