Overview
This plugin executes thetrivy CLI - it lets you easily analyze your code so you could find misconfigurations and enforce built-in rules.
This plugin will install the trivy binary and execute a config command on the given directory.
For more information, check out the Trivy Plugin git repository.
For an example repository that integrates the Trivy plugin, here.
Inputs
To use the Trivy plugin, you need to pass the following inputs:version(Required) - the specific version of Trivy you wish to usedirectory(Required) - the path to the directory with the IaC code to analyze (the root folder is your project’s root folder)global-flags(Optional) - a string containing global flags as one string, read more hereflags(Optional) - a string containing additional flags as one string, read more here
Example
In this example, we will run trivy analysis on your root folder before theterraform plan step of the deployment. We will call that step “Execute Trivy”: