diff --git a/help/commands-docs/_EXAMPLES.md b/help/commands-docs/_EXAMPLES.md index 62cef8bdae..eba062382b 100644 --- a/help/commands-docs/_EXAMPLES.md +++ b/help/commands-docs/_EXAMPLES.md @@ -24,6 +24,7 @@ See `snyk container --help` for more details and examples: See `snyk iac --help` for more details and examples: - $ snyk iac test /path/to/Kubernetes.yaml + $ snyk iac test /path/to/cloudformation_file.yaml + $ snyk iac test /path/to/kubernetes_file.yaml $ snyk iac test /path/to/terraform_file.tf $ snyk iac test /path/to/tf-plan.json diff --git a/help/commands-docs/iac-examples.md b/help/commands-docs/iac-examples.md index c3b230c085..0afd321e96 100644 --- a/help/commands-docs/iac-examples.md +++ b/help/commands-docs/iac-examples.md @@ -2,8 +2,11 @@ [For more information see IaC help page](https://snyk.co/ucT6Q) +- `Test CloudFormation file`: + \$ snyk iac test /path/to/cloudformation_file.yaml + - `Test kubernetes file`: - \$ snyk iac test /path/to/Kubernetes.yaml + \$ snyk iac test /path/to/kubernetes_file.yaml - `Test terraform file`: \$ snyk iac test /path/to/terraform_file.tf diff --git a/help/commands-docs/iac.md b/help/commands-docs/iac.md index 30223645ed..6b081fae62 100644 --- a/help/commands-docs/iac.md +++ b/help/commands-docs/iac.md @@ -36,6 +36,16 @@ Find security issues in your Infrastructure as Code files. Save test output in JSON format directly to the specified file, regardless of whether or not you use the `--json` option. This is especially useful if you want to display the human-readable test output via stdout and at the same time save the JSON format output to a file. +- `--org`=: + Specify the to run Snyk commands tied to a specific organization. This will influence private tests limits. + If you have multiple organizations, you can set a default from the CLI using: + + `$ snyk config set org`= + + Setting a default will ensure all newly tested projects will be tested + under your default organization. If you need to override the default, you can use the `--org`= argument. + Default: uses that sets as default in your [Account settings](https://app.snyk.io/account) + - `--sarif`: Return results in SARIF format. @@ -49,4 +59,4 @@ Find security issues in your Infrastructure as Code files. It enables to control whether the scan should analyse the full final state (e.g. `planned-values`), or the proposed changes only (e.g. `resource-changes`). Default: If the `--scan` flag is not provided it would scan the proposed changes only by default. Example #1: `--scan=planned-values` (full state scan) - Example #2: `--scan=resource-changes` (proposed changes scan) \ No newline at end of file + Example #2: `--scan=resource-changes` (proposed changes scan) diff --git a/src/cli/commands/test/iac-local-execution/file-parser.ts b/src/cli/commands/test/iac-local-execution/file-parser.ts index 3e7e3a1cb7..5cbeb3e013 100644 --- a/src/cli/commands/test/iac-local-execution/file-parser.ts +++ b/src/cli/commands/test/iac-local-execution/file-parser.ts @@ -166,8 +166,8 @@ export class FailedToDetectJsonConfigError extends CustomError { ); this.code = IaCErrorCodes.FailedToDetectJsonConfigError; this.strCode = getErrorStringCode(this.code); - this.userMessage = `We were unable to detect whether the JSON file "${filename}" is a valid Kubernetes file or Terraform Plan. For Kubernetes it is missing the following fields: "${REQUIRED_K8S_FIELDS.join( + this.userMessage = `We were unable to detect whether the JSON file "${filename}" is either a valid Kubernetes file, CloudFormation file or a Terraform Plan. For Kubernetes it is missing the following fields: "${REQUIRED_K8S_FIELDS.join( '", "', - )}". For Terraform Plan it was expected to contain fields "planned_values.root_module" and "resource_changes". Please contact support@snyk.io, if possible with a redacted version of the file`; + )}". For CloudFormation required fields are: "Resources". For Terraform Plan it was expected to contain fields "planned_values.root_module" and "resource_changes". Please contact support@snyk.io, if possible with a redacted version of the file`; } }