Skip to content

Commit 7bdfabd

Browse files
authored
Adds short command flags (fixes #171) (#175)
1 parent af95f5e commit 7bdfabd

File tree

6 files changed

+12
-1
lines changed

6 files changed

+12
-1
lines changed

cloudsplaining/command/create_exclusions_file.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
)
2525
@click.option(
2626
"--output-file",
27+
"-o",
2728
type=click.Path(exists=False),
2829
default=os.path.join(os.getcwd(), "exclusions.yml"),
2930
required=True,

cloudsplaining/command/download.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,15 @@
2323
)
2424
@click.option(
2525
"--profile",
26+
"-p",
2627
type=str,
2728
required=False,
2829
help="Specify 'all' to authenticate to AWS and analyze *all* existing IAM policies. Specify a non-default "
2930
"profile here. Defaults to the 'default' profile.",
3031
)
3132
@click.option(
3233
"--output",
34+
"-o",
3335
type=click.Path(exists=True),
3436
default=Path.cwd(),
3537
help="Path to store the output. Defaults to current directory.",

cloudsplaining/command/expand_policy.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
)
2121
@click.option(
2222
"--input-file",
23+
"-i",
2324
type=click.Path(exists=True),
2425
required=True,
2526
help="Path to the JSON policy file.",

cloudsplaining/command/scan.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,26 +31,30 @@
3131
)
3232
@click.option(
3333
"--input-file",
34+
"-i",
3435
type=click.Path(exists=True),
3536
required=True,
3637
help="Path of IAM account authorization details file",
3738
)
3839
@click.option(
3940
"--exclusions-file",
41+
"-e",
4042
help="A yaml file containing a list of policy names to exclude from the scan.",
4143
type=click.Path(exists=True),
4244
required=False,
4345
default=EXCLUSIONS_FILE,
4446
)
4547
@click.option(
4648
"--output",
49+
"-o",
4750
required=False,
4851
type=click.Path(exists=True),
4952
default=os.getcwd(),
5053
help="Output directory.",
5154
)
5255
@click.option(
5356
"--skip-open-report",
57+
"-s",
5458
required=False,
5559
default=False,
5660
is_flag=True,
@@ -59,6 +63,7 @@
5963
)
6064
@click.option(
6165
"--minimize",
66+
"-m",
6267
required=False,
6368
default=False,
6469
is_flag=True,

cloudsplaining/command/scan_multi_account.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ def _accounts(self) -> dict:
3434
return accounts
3535

3636

37-
3837
@click.command(
3938
short_help="Scan multiple AWS Accounts using a config file"
4039
)
@@ -96,6 +95,7 @@ def _accounts(self) -> dict:
9695
)
9796
@optgroup.option(
9897
"--write-data-file",
98+
"-w",
9999
is_flag=True,
100100
required=False,
101101
default=False,

cloudsplaining/command/scan_policy_file.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,14 @@
2828
)
2929
@click.option(
3030
"--input-file",
31+
"-i",
3132
type=str,
3233
# required=True,
3334
help="Path of the IAM policy file to evaluate.",
3435
)
3536
@click.option(
3637
"--exclusions-file",
38+
"-e",
3739
help="A yaml file containing a list of actions to ignore when scanning.",
3840
type=click.Path(exists=True),
3941
required=False,

0 commit comments

Comments
 (0)