Configure Mend for Azure Repos for IaC
Overview
Mend for Azure Repos offers several parameters to configure your IaC scans, checks, and issues.
Getting it Done
Note: IaC scans can only be performed on base branches.
Configuration at the local repository level is done via the .whitesource file. To set up your configuration file for IaC scans, see the Parameters section provided in this documentation. Below is an example of fine-tuning an IaC scan within a repository’s .whitesource file:
{
"scanSettings": {
"enableIaC": true,
"baseBranches": ["integration"]
},
"checkRunSettings": {
"useMendCheckNames": true
}
}
Note: For global configuration, parameters are set via the repo-config.json file. See our Set up a global configuration for Mend for Azure Repos documentation for more information.
Reference
Parameters
Scan Settings (scanSettings
)
Parameter | Type | Description |
---|---|---|
enableIaC | boolean | Optional. Default Value: Notes:
|
baseBranches | Array | Optional. Default Value: Example usage:
CODE
This will set both Notes:
|
Check Run Settings (checkRunSettings
)
Note: Mend for Azure Repos utilizes the Azure DevOps Checks API that provides checks in commits and pull requests on any repository branch.
Parameter | Type | Description |
---|---|---|
useMendCheckNames | Boolean | Optional. Default Value:
Note: When a .whitesource file is created, the value of useMendCheckNames is |
Issue Settings (issueSettings
)
Note:
IaC Issues are meant to be opened for the default branch only and if they are opened for additional baseBranches (
scanSettings
), then the branch name will not be shown.When an IaC issue is closed it will not be detected in the future scans.
Parameter | Type | Description |
---|---|---|
iacIssues | Boolean | Optional. Default Value:
Note: This parameter is relevant only if the IaC scan is enabled by setting scanSettings.enableIaC to Default Behavior Explained:
|
customLabels | Array | Optional. Default Value: N/A. Define labels that will be added to the Azure DevOps Repos Issues created after the scan. Usage example:
CODE
Following labels are not available for the use:
|
Supported Environments
The following IaC environments and their configuration files are supported:
Terraform
Bicep
CloudFormation
Kubernetes
ARM Templates
Serverless
Helm