Any CLI option can be set as an environment variable. The environment variable name are similar to the CLI option name, with the following augmentations:
Any setting can be set in a YAML file. By default, config file named trivy.yaml is read from the current directory where Trivy is run. To load configuration from a different file, use the --config flag and specify the config path to load: trivy --config /etc/trivy/myconfig.yaml.
The structure and settings of the YAML config file is documented in the Config file document.