Skip to main content

Azure Bicep

This article shows you how to analyze your Azure Bicep templates using Qwiet AI by Harness.

Requirements​

See Prerequisites for more information.

Analyzing your Azure Bicep templates​

To analyze your Azure Bicep templates, run:

sl analyze --app <name> --bicep [<path>]
ParameterDescription
--app <name>The name of the project to be analyzed (maximum length: 100 characters)
--bicepThe flag identifying the application as an Azure Bicep project
<path>The path to the project to be analyzed

See the CLI reference for additional sl analyze options.

Additional parameters​

The analysis accepts additional parameters after a double hyphen --.

For example, the following skips the test.bicep file inside the tests directory:

sl analyze --app <name> --bicep . -- --skip-path tests/test.bicep
ParameterDescription
--skip-path <path>Path (file or directory) to skip, using regular expression logic, relative to the current working directory. Word boundaries are not implicit; i.e., specifying "dir1" will skip any directory or subdirectory named "dir1". Can be specified multiple times

Tagging results with your branch name​

To include the branch name in your Qwiet AI by Harness results, allowing you to distinguish one set of results from another, add the following to your invocation of Qwiet:

sl analyze --tag branch=`git symbolic-ref --short HEAD`

If you're working in a GitHub environment (e.g., GitHub Actions), you can also use --tag branch=${{ github.head_ref }} to populate your branch name.

If you don't provide a branch name, but Qwiet detects one available in your environment, it will use that name.