Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: help docs to include iac ignores #2151

Merged
merged 1 commit into from Aug 11, 2021

Conversation

ipapast
Copy link
Contributor

@ipapast ipapast commented Aug 10, 2021

What does this PR do?

Updates the --help docs for iac to include the new flags:

  • --policy-path
  • --ignore-policy

Where should the reviewer start?

Build locally and run
snyk iac --help to see the iac section include the 2 flags above under OPTIONS

Any background context you want to provide?

The functionality for IaC ignores is released on version 1.677.0

Screenshots

 snyk-dev iac --help
NAME
       snyk-iac - Find security issues in your Infrastructure as Code files

SYNOPSIS
       snyk iac [COMMAND] [OPTIONS] PATH

DESCRIPTION
       Find security issues in your Infrastructure as Code files.

       For more information see IaC help page https://snyk.co/ucT6Q

COMMANDS
       test   Test for any known issue.

OPTIONS
       --detection-depth=DEPTH
              (only in test command)
              Indicate  the  maximum depth of sub-directories to search. DEPTH
              must be a number.

              Default: No Limit
              Example: --detection-depth=3
              Will limit search to provided directory (or current directory if
              no PATH provided) plus two levels of subdirectories.

       --severity-threshold=low|medium|high
              Only report vulnerabilities of provided level or higher.

       --ignore-policy
              Ignores  all set policies. The current policy in .snyk file, Org
              level ignores and the project policy on snyk.io.

       --json Prints results in JSON format.

       --json-file-output=OUTPUT_FILE_PATH
              (only in test command) 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=ORG_NAME
              Specify the ORG_NAME to run Snyk commands tied to a specific or-
              ganization.  This  will  influence  private tests limits. If you
              have multiple organizations, you can set a default from the  CLI
              using:

              $ snyk config set org=ORG_NAME

              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=ORG_NAME argument. Default:
              uses ORG_NAME that sets as  default  in  your  Account  settings
              https://app.snyk.io/account

       --policy-path=PATH_TO_POLICY_FILE`
              Manually pass a path to a snyk policy file.

       --sarif
              Return results in SARIF format.

       --sarif-file-output=OUTPUT_FILE_PATH
              (only in test command) Save test output in SARIF format directly
              to the OUTPUT_FILE_PATH file, regardless of whether or  not  you
              use the --sarif option. This is especially useful if you want to
              display the human-readable test output via  stdout  and  at  the
              same time save the SARIF format output to a file.

       --scan=TERRAFORM_PLAN_SCAN_MODE
              Dedicated flag for Terraform plan scanning modes.
              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)

@ipapast ipapast requested a review from a team August 10, 2021 10:18
@ipapast ipapast requested review from a team as code owners August 10, 2021 10:18
@ipapast ipapast force-pushed the fix/update-docs-for-iac-ignores branch from b322d4c to 6c18b2b Compare August 10, 2021 10:20
Copy link

@ghost ghost left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note sure what's going on with the spacing in help/commands-txt/snyk-iac.txt. Seems to be an existing issue so not blocking.

@ipapast ipapast merged commit 00f677e into master Aug 11, 2021
@ipapast ipapast deleted the fix/update-docs-for-iac-ignores branch August 11, 2021 07:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants