You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* severity field on json output and option to filter results by severity
* fix type in option filter severity
* generate new example report
* add new dependencies to setup
* -f option on scan_policy_file and scan_multi_account and "critical" and "none" as options
* remove added dependencies
* removed js dependencies, fixed unit tests for new output format
* revert package-lock and fix mypy issues
* fix typo
Copy file name to clipboardExpand all lines: cloudsplaining/command/scan.py
+18-5
Original file line number
Diff line number
Diff line change
@@ -37,6 +37,8 @@
37
37
@click.option("-m", "--minimize", required=False, default=False, is_flag=True, help="Reduce the size of the HTML Report by pulling the Cloudsplaining Javascript code over the internet.")
38
38
@click.option("-aR", "--flag-all-risky-actions", is_flag=True, help="Flag all risky actions, regardless of whether resource ARN constraints or conditions are used.")
@click.option("-f", "--filter-severity", "severity", help="Filter the severity of findings to be reported.", multiple=True,type=click.Choice(['CRITICAL','HIGH', 'MEDIUM','LOW','NONE'], case_sensitive=False))
41
+
40
42
# fmt: on
41
43
defscan(
42
44
input_file: str,
@@ -46,6 +48,7 @@ def scan(
46
48
minimize: bool,
47
49
flag_all_risky_actions: bool,
48
50
verbosity: int,
51
+
severity: List[str],
49
52
) ->None: # pragma: no cover
50
53
"""
51
54
Given the path to account authorization details files and the exclusions config file, scan all inline and
@click.option("-f", "--filter-severity", "severity", help="Filter the severity of findings to be reported.", multiple=True,type=click.Choice(['CRITICAL','HIGH', 'MEDIUM','LOW','NONE'], case_sensitive=False))
55
+
54
56
defscan_multi_account(
55
57
config_file: str,
56
58
profile: str,
@@ -60,6 +62,7 @@ def scan_multi_account(
60
62
output_bucket: str,
61
63
write_data_file: bool,
62
64
verbosity: int,
65
+
severity: List[str],
63
66
) ->None:
64
67
"""Scan multiple accounts via AssumeRole"""
65
68
set_log_level(verbosity)
@@ -79,6 +82,7 @@ def scan_multi_account(
79
82
output_directory=output_directory,
80
83
output_bucket=output_bucket,
81
84
write_data_file=write_data_file,
85
+
severity=severity,
82
86
)
83
87
84
88
@@ -90,6 +94,7 @@ def scan_accounts(
90
94
profile: Optional[str] =None,
91
95
output_directory: Optional[str] =None,
92
96
output_bucket: Optional[str] =None,
97
+
severity: List[str] = [],
93
98
) ->None:
94
99
"""Use this method as a library to scan multiple accounts"""
95
100
# TODO: Speed improvements? Multithreading? This currently runs sequentially.
@@ -102,12 +107,14 @@ def scan_accounts(
102
107
target_role_name=role_name,
103
108
exclusions=exclusions,
104
109
profile=profile,
110
+
severity=severity,
105
111
)
106
112
html_report=HTMLReport(
107
113
account_id=target_account_id,
108
114
account_name=target_account_name,
109
115
results=results,
110
-
minimize=True,
116
+
## minimize has to be false because changes were made on javascript code so it cannot be pulled over the internet, unless these changes are updated on the internet code
0 commit comments