Skip to content

Commit fa4cb75

Browse files
author
Kinnaird McQuade
committed
Fix mentions of --file since it is --input now
1 parent c9cf53c commit fa4cb75

File tree

14 files changed

+29
-28
lines changed

14 files changed

+29
-28
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ This will generate a file in your current directory titled `exclusions.yml`.
141141
Now when you run the `scan` command, you can use the exclusions file like this:
142142

143143
```bash
144-
cloudsplaining scan --exclusions-file exclusions.yml --file examples/files/example.json --output examples/files/
144+
cloudsplaining scan --exclusions-file exclusions.yml --input examples/files/example.json --output examples/files/
145145
```
146146

147147
For more information on the structure of the exclusions file, see [Filtering False Positives](#filtering-false-positives)
@@ -153,7 +153,7 @@ Now that we've downloaded the account authorization file, we can scan *all* of t
153153
Run the following command:
154154

155155
```bash
156-
cloudsplaining scan --exclusions-file exclusions.yml --file examples/files/example.json --output examples/files/
156+
cloudsplaining scan --exclusions-file exclusions.yml --input examples/files/example.json --output examples/files/
157157
```
158158

159159
It will create an HTML report like [this](https://opensource.salesforce.com/cloudsplaining/):
@@ -243,7 +243,7 @@ exclude-actions:
243243
Now when you run the `scan` command, you can use the exclusions file like this:
244244

245245
```bash
246-
cloudsplaining scan --exclusions-file exclusions.yml --file examples/files/example.json --output examples/files/
246+
cloudsplaining scan --exclusions-file exclusions.yml --input examples/files/example.json --output examples/files/
247247
```
248248

249249

@@ -252,7 +252,7 @@ cloudsplaining scan --exclusions-file exclusions.yml --file examples/files/examp
252252
You can also scan a single policy file to identify risks instead of an entire account.
253253

254254
```bash
255-
cloudsplaining scan-policy-file --file examples/policies/explicit-actions.json
255+
cloudsplaining scan-policy-file --input examples/policies/explicit-actions.json
256256
```
257257

258258
The output will include a finding description and a list of the IAM actions that do not leverage resource constraints.
@@ -283,13 +283,13 @@ cloudsplaining download --profile someprofile
283283
cloudsplaining download --profile all
284284
285285
# Scan Authorization details
286-
cloudsplaining scan --file default.json
286+
cloudsplaining scan --input default.json
287287
# Scan Authorization details with custom exclusions
288-
cloudsplaining scan --file default.json --exclusions-file exclusions.yml
288+
cloudsplaining scan --input default.json --exclusions-file exclusions.yml
289289
290290
# Scan Policy Files
291-
cloudsplaining scan-policy-file --file examples/policies/wildcards.json
292-
cloudsplaining scan-policy-file --file examples/policies/wildcards.json --exclusions-file examples/example-exclusions.yml
291+
cloudsplaining scan-policy-file --input examples/policies/wildcards.json
292+
cloudsplaining scan-policy-file --input examples/policies/wildcards.json --exclusions-file examples/example-exclusions.yml
293293
```
294294

295295
## FAQ

cloudsplaining/command/create_exclusions_file.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,4 +46,4 @@ def create_exclusions_file(output_file):
4646
)
4747
print("\tcloudsplaining download")
4848
print("You can use this with the scan command as shown below: ")
49-
print("\tcloudsplaining scan --exclusions-file exclusions.yml --file default.json")
49+
print("\tcloudsplaining scan --exclusions-file exclusions.yml --input default.json")

cloudsplaining/command/expand_policy.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,17 @@
2020
short_help="Expand the * Actions in IAM policy files to improve readability"
2121
)
2222
@click.option(
23-
"--file",
23+
"--input",
2424
type=click.Path(exists=True),
2525
required=True,
2626
help="Path to the JSON policy file.",
2727
)
2828
@click_log.simple_verbosity_option(logger)
29-
def expand_policy(file):
29+
def expand_policy(input): # pylint: disable=redefined-builtin
3030
"""
3131
Expand the * Actions in IAM policy files to improve readability
3232
"""
33+
file = input
3334
with open(file) as json_file:
3435
logger.debug(f"Opening {file}")
3536
data = json.load(json_file)

cloudsplaining/command/scan_policy_file.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
short_help="Scan a single policy file to identify identify missing resource constraints."
3030
)
3131
@click.option(
32-
"--file",
32+
"--input",
3333
type=click.Path(exists=True),
3434
required=True,
3535
help="Path of to the IAM policy file.",
@@ -50,9 +50,9 @@
5050
" (Resource Exposure, Privilege Escalation, Data Exfiltration). This can help with prioritization.",
5151
)
5252
@click_log.simple_verbosity_option(logger)
53-
def scan_policy_file(file, exclusions_file, high_priority_only):
53+
def scan_policy_file(input, exclusions_file, high_priority_only): # pylint: disable=redefined-builtin
5454
"""Scan a single policy file to identify missing resource constraints."""
55-
55+
file = input
5656
# Get the exclusions configuration
5757
with open(exclusions_file, "r") as yaml_file:
5858
try:

cloudsplaining/output/templates/guidance/2-triage-guidance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ To recap: you've followed these steps to generate this report:
3535
<ul><li><code>cloudsplaining create-exclusions-file --output-file exclusions.yml</code></li></ul>
3636
<li>Generated the report</li>
3737
<ul>
38-
<li><code>cloudsplaining scan --file default-account-details.json --exclusions-file exclusions.yml</code></li>
38+
<li><code>cloudsplaining scan --input default-account-details.json --exclusions-file exclusions.yml</code></li>
3939
<li>This generates three files: (1) The single-file HTML report, (2) The triage CSV worksheet, and (3) The raw JSON data file</li>
4040
</ul>
4141
</ul>
@@ -149,7 +149,7 @@ Add whatever values you want to the above depending on your organization's conte
149149
* Now, run the scan to generate a *new* Cloudsplaining report that considers your exclusions criteria. This way, you are working with a report version that consists of True Positives only.
150150

151151
```bash
152-
cloudsplaining scan --file default.json --exclusions-file exclusions.yml
152+
cloudsplaining scan --input default.json --exclusions-file exclusions.yml
153153
```
154154

155155
You can now proceed to the Remediation stage.

cloudsplaining/output/templates/guidance/4-validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ After you've rewritten your IAM policy, we suggest two options for validating th
1313

1414
You can validate that your remediated policy passes Cloudsplaining by running the following command:
1515

16-
```cloudsplaining scan-policy-file --file policy.json --exclusions-file exclusions.yml```
16+
```cloudsplaining scan-policy-file --input policy.json --exclusions-file exclusions.yml```
1717

1818
When there are no more results, it passes!
1919

docs/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ Now when you run the `scan` command, you can use the exclusions file like this:
5959

6060
```bash
6161
cloudsplaining scan --exclusions-file exclusions.yml \
62-
--file examples/files/example.json \
62+
--input examples/files/example.json \
6363
--output examples/files/
6464
```
6565

@@ -73,6 +73,6 @@ Run the following command:
7373

7474
```bash
7575
cloudsplaining scan --exclusions-file exclusions.yml \
76-
--file examples/files/example.json \
76+
--input examples/files/example.json \
7777
--output examples/files/
7878
```

docs/report/triage.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ To recap: you've followed these steps to generate this report:
2929
* Generated your custom exclusions file
3030
- `cloudsplaining create-exclusions-file --output-file exclusions.yml`
3131
* Scanned the Account authorization details
32-
- `cloudsplaining scan --file default-account-details.json --exclusions-file exclusions.yml`
32+
- `cloudsplaining scan --input default-account-details.json --exclusions-file exclusions.yml`
3333
- This generates three files: (1) The single-file HTML report, (2) The triage CSV worksheet, and (3) The raw JSON data file
3434

3535
## Triaging workflow

docs/report/validation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ Leveraging [Parliament](https://github.com/duo-labs/parliament/) by Duo-Labs, co
1010

1111
You can validate that your remediated policy passes Cloudsplaining by running the following command:
1212

13-
```cloudsplaining scan-policy-file --file policy.json --exclusions-file exclusions.yml```
13+
```cloudsplaining scan-policy-file --input policy.json --exclusions-file exclusions.yml```
1414

1515
When there are no more results, it passes!
1616

docs/user-guide/create-exclusions-file.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@ This will generate a file in your current directory titled `exclusions.yml`.
1515
Now when you run the `scan` command, you can use the exclusions file like this:
1616

1717
```bash
18-
cloudsplaining scan --exclusions-file exclusions.yml --file examples/files/example.json --output examples/files/
18+
cloudsplaining scan --exclusions-file exclusions.yml --input examples/files/example.json --output examples/files/
1919
```

0 commit comments

Comments
 (0)