Configure the Mend CLI for IaC
Overview
Configuring the Mend CLI for a IaC scan can be done via command line parameters.
Getting it done
Configure the Mend CLI IaC scan via command line parameters
You can configure the Mend CLI IaC scan at runtime by adding flags to the mend iac
command. The usage of the mend iac
command is as follows:
mend iac my-iac-folder [flags]
-20240807-190907.gif?inst-v=0c992ec6-e41a-4785-af35-f46f07283c11)
Reference
Mend CLI IaC parameters
Mend CLI IaC - Report parameters
Parameter | Description | Mend CLI Default Behavior |
---|---|---|
Command Line: | Optional. Generate a report locally of the Mend CLI Container Image scan results using the defined file name. The | Report generation is disabled. |
Command Line: | Optional. When used together with When used alone, define the format of the terminal output. The supported values are:
| Report generation is disabled. |
Mend CLI IaC - Terminal view parameters
Parameter | Description | Mend CLI Default Behavior |
---|---|---|
Command Line: | Optional. Filter findings by the CVSS score severity value. The supported values are:
| All vulnerability severity levels are shown in the scan results. |
Command Line: | Optional. Display the available parameters for the | N/A |
Command Line: | Optional. Mend CLI will run in non-interactive mode, suppressing use of colors, progress bar and any other graphic features in STDOUT. | Mend CLI output to STDOUT includes use of colors and progress bars, which are irrelevant in non-interactive session and may cause issues in some environments. |
Mend CLI IaC - Upload parameters
Parameter | Description | Mend CLI Default Behavior |
---|---|---|
Command Line: | Optional. Run the Mend CLI scan offline. This parameter disables the upload of the scan results to the Mend Application. | The Mend CLI will update your results within the Mend Platform Application. |
Command Line: | Optional. Set the scan scope for your image by specifying the hierarchy for the Mend Platform Application. The supported formats are:
Examples of
For Mend CLI scans that do not update the Mend Application, the Notes:
|
Scan results are available only on the CLI output at this stage. If
Tip: Use the Mend CLI
|
Mend CLI IaC - Offline parameters
Parameter | Description | Mend CLI Default Behavior |
---|---|---|
Command Line: | Optional. Save your scan results locally. The default file is saved in the .mend folder. | Scan results will be saved locally. |
Command Line: | Optional. Update the Mend application with your scan results. Should be followed by the --file flag to specify the specific local scan results. | The Mend application will get updated with your scan results. |
Command Line: | Optional. Specify a path to the local scan results file. |
|
Mend CLI IaC-supported frameworks
The following frameworks are supported by the Mend CLI for IaC scans:
Terraform .tf (Multi Cloud)
Cloud Formation (AWS)
K8s (YAML)
Helm
Dockerfiles
Mend CLI IaC exit codes
Note: For a comprehensive overview of Mend CLI IaC exit codes, please refer to our Mend CLI Exit Codes article.