-
Install the tfsec task in your Azure DevOps organization (hit the
Get it free
button above). -
Add the task to your
azure-pipelines.yml
in a project where you'd like to run tfsec:
- task: tfsec@1
You can supply several inputs to customise the task.
Add debug logs to the task output.
- task: tfsec@1
inputs:
debug: true
Run a specific version of tfsec.
- task: tfsec@1
inputs:
version: v1.26.0
- task: tfsec@1
inputs:
args: --workspace my-workspace --config-file ./tfsec.yml
- task: tfsec@1
inputs:
dir: ./terraform
Avoid results showing the in 'Tests' tab of the Pipelines UI.
- task: tfsec@1
inputs:
publishTestResults: false
If you'd like to see the tfsec results in your build, but avoid causing it to fail when issues are discovered, you can add the --soft-fail
flag to your command line arguments using:
- task: tfsec@1
inputs:
args: --soft-fail