snyk 1.910.0 → 1.911.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -34,26 +34,28 @@ For more information see [Configure cloud providers](https://docs.snyk.io/produc
|
|
|
34
34
|
|
|
35
35
|
Use the `-d` option to output the debug logs.
|
|
36
36
|
|
|
37
|
-
##
|
|
37
|
+
## Required Arguments
|
|
38
38
|
|
|
39
|
-
**Note:** To use the `describe` command, you **must use
|
|
40
|
-
|
|
41
|
-
`--only-managed` or `--drift`\
|
|
42
|
-
Scan only managed resources from the Terraform states.
|
|
39
|
+
**Note:** To use the `describe` command, you **must use one of these options**:
|
|
43
40
|
|
|
44
41
|
`--only-unmanaged`\
|
|
45
|
-
|
|
42
|
+
Report resources not found in any Terraform states.
|
|
43
|
+
|
|
44
|
+
`--only-managed` or `--drift`\
|
|
45
|
+
Scan managed resources found in Terraform states for changes.
|
|
46
46
|
|
|
47
47
|
`--all`\
|
|
48
48
|
Scan both managed and unmanaged resources.
|
|
49
49
|
|
|
50
|
+
## Optional Arguments
|
|
51
|
+
|
|
50
52
|
See the list of options that follows for details.
|
|
51
53
|
|
|
52
54
|
### `--from=<STATE>[,<STATE>...]`
|
|
53
55
|
|
|
54
56
|
Specify multiple states to be read.
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
The `snyk iac describe` command supports reading Terraform states.
|
|
57
59
|
|
|
58
60
|
To read multiple states, pass `--from=` followed by a comma-separated list. You can also use glob patterns to match multiple state files at once.
|
|
59
61
|
|
|
@@ -77,7 +79,7 @@ Read and aggregate all Terraform states in a given directory:
|
|
|
77
79
|
|
|
78
80
|
Use any unsupported backend by using `terraform` to pipe your state in a file and then use this file:
|
|
79
81
|
|
|
80
|
-
`$ terraform state pull > state.tfstate
|
|
82
|
+
`$ terraform state pull > state.tfstate`
|
|
81
83
|
|
|
82
84
|
`$ snyk iac describe --all --from="tfstate://state.tfstate"`
|
|
83
85
|
|
|
@@ -114,20 +116,6 @@ This option cannot be used with a `.snyk` drift ignore rule; the content in `.sn
|
|
|
114
116
|
|
|
115
117
|
The supported services are: `aws_s3`, `aws_ec2`, `aws_lambda`, `aws_rds`, `aws_route53`, `aws_iam` , `aws_vpc`, `aws_api_gateway`, `aws_apigatewayv2`, `aws_sqs`, `aws_sns`, `aws_ecr`, `aws_cloudfront`, `aws_kms`, `aws_dynamodb`, `azure_base`, `azure_compute`, `azure_storage`, `azure_network`, `azure_container`, `azure_database`, `azure_loadbalancer`, `azure_private_dns`, `google_cloud_platform`, `google_cloud_storage`, `google_compute_engine`, `google_cloud_dns`, `google_cloud_bigtable`, `google_cloud_bigquery`, `google_cloud_functions`, `google_cloud_sql`, `google_cloud_run`
|
|
116
118
|
|
|
117
|
-
### `--all`
|
|
118
|
-
|
|
119
|
-
Display a report that shows changes for both managed and unmanaged resources.
|
|
120
|
-
|
|
121
|
-
### `--only-managed`
|
|
122
|
-
|
|
123
|
-
Display a report that shows changes only for resources found in aggregated Terraform states; filter out drift for resources that are not managed by Terraform. 
|
|
124
|
-
|
|
125
|
-
Alternative: `--drift`
|
|
126
|
-
|
|
127
|
-
### `--only-unmanaged`
|
|
128
|
-
|
|
129
|
-
Display a report that shows resources not found in any Terraform state; filter out drift for managed resources.
|
|
130
|
-
|
|
131
119
|
### `--quiet`
|
|
132
120
|
|
|
133
121
|
Prevent stdout from being used for anything but the scan result.
|
|
@@ -150,7 +138,7 @@ Output the report as JSON to stdout.
|
|
|
150
138
|
|
|
151
139
|
You can save the report to a file with a redirection:
|
|
152
140
|
|
|
153
|
-
`$ snyk iac describe --json > report.json
|
|
141
|
+
`$ snyk iac describe --json > report.json`
|
|
154
142
|
|
|
155
143
|
### `--html`
|
|
156
144
|
|
|
@@ -216,7 +204,7 @@ The `iac describe` command ignores service-linked resources by default (like ser
|
|
|
216
204
|
|
|
217
205
|
Note: when using the strict mode with an AWS account, you may experience unnecessary noise from resources that do not belong to you.
|
|
218
206
|
|
|
219
|
-
This can happen if you have an organization account in which you, by default, have a service-linked role associated to your the account, for example, **AWSServiceRoleForOrganizations
|
|
207
|
+
This can happen if you have an organization account in which you, by default, have a service-linked role associated to your the account, for example, **AWSServiceRoleForOrganizations**.
|
|
220
208
|
|
|
221
209
|
Usage:
|
|
222
210
|
|
|
@@ -226,9 +214,7 @@ Usage:
|
|
|
226
214
|
|
|
227
215
|
Enable deep mode for `--all`.
|
|
228
216
|
|
|
229
|
-
Deep mode enables retrieval of details for resources, for deeper and more detailed drift detection.
|
|
230
|
-
|
|
231
|
-
**Note:** this option is experimental. Enabling deep mode can lead to unexpected behavior: false positive drifts or undetected drifts.
|
|
217
|
+
Deep mode enables retrieval of details for resources, for deeper and more detailed drift detection.
|
|
232
218
|
|
|
233
219
|
Usage:
|
|
234
220
|
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
## Description
|
|
8
8
|
|
|
9
|
-
The `snyk iac update-exclude-policy` generates exclude policy rules to be used by `snyk iac
|
|
9
|
+
The `snyk iac update-exclude-policy` generates exclude policy rules to be used by `snyk iac describe`.
|
|
10
10
|
|
|
11
11
|
For a list of related commands see the [snyk iac](iac.md) help; `iac --help`
|
|
12
12
|
|
package/help/cli-commands/iac.md
CHANGED
|
@@ -10,10 +10,12 @@ The `snyk iac` subcommands find and report security issues in Infrastructure as
|
|
|
10
10
|
|
|
11
11
|
For more information see [Snyk CLI for Infrastructure as Code](https://docs.snyk.io/products/snyk-infrastructure-as-code/snyk-cli-for-infrastructure-as-code)
|
|
12
12
|
|
|
13
|
-
## Subcommands
|
|
13
|
+
## Subcommands and the help docs
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
All the `iac` commands are listed here with the help docs.
|
|
16
16
|
|
|
17
|
-
- [iac test](iac-test.md); `iac test --help
|
|
18
|
-
- [iac describe](iac-describe.md); `iac describe
|
|
19
|
-
|
|
17
|
+
- [`iac test`](iac-test.md); `iac test --help`: tests for any known security issue.
|
|
18
|
+
- [iac describe](iac-describe.md); `iac describe--help`: detects infrastructure drift and unmanaged cloud resources\
|
|
19
|
+
Example: `snyk iac describe --only-unmanaged` 
|
|
20
|
+
- [iac update-exclude-policy](iac-update-exclude-policy.md); `iac update-exclude-policy --help`: auto-generates `.snyk` exclusions for cloud resources\
|
|
21
|
+
Example: `snyk iac describe --json --all | snyk iac update-exclude-policy`
|
|
@@ -40,7 +40,7 @@ Use with `--all-projects` or `--yarn-workspaces` to indicate how many subdirecto
|
|
|
40
40
|
|
|
41
41
|
Default: 4 (the current working directory (0) and 4 subdirectories).
|
|
42
42
|
|
|
43
|
-
Example: Limit search to the specified directory (or the current directory if no `<PATH>` is specified) plus
|
|
43
|
+
Example: Limit search to the specified directory (or the current directory if no `<PATH>` is specified), zero (0) plus three levels of subdirectories.\
|
|
44
44
|
`--detection-depth=3`
|
|
45
45
|
|
|
46
46
|
### `--exclude=<GLOB>[,<GLOB>]...>`
|
|
@@ -41,7 +41,7 @@ Use with `--all-projects` or `--yarn-workspaces` to indicate how many subdirecto
|
|
|
41
41
|
|
|
42
42
|
Default: 4 (the current working directory (0) and 4 subdirectories).
|
|
43
43
|
|
|
44
|
-
Example: Limit search to the specified directory (or the current directory if no `<PATH>` is specified) plus three levels of subdirectories.\
|
|
44
|
+
Example: Limit search to the specified directory (or the current directory if no `<PATH>` is specified), zero plus three levels of subdirectories.\
|
|
45
45
|
`--detection-depth=3`
|
|
46
46
|
|
|
47
47
|
### `--exclude=<GLOB>[,<GLOB>]...>`
|