Skip to content

Commit

Permalink
(Fix): Trivy config files and autorecommended (#849)
Browse files Browse the repository at this point in the history
`trivy-secret.yaml` is the old config file. Now the config file for
trivy is `trivy.yaml`, and there are also ignore files.

Also changes `suggest_if` to `config_present` while we investigate trivy
issues with shared cachedir.
  • Loading branch information
TylerJang27 authored Aug 19, 2024
1 parent ea6f1d9 commit bd59b6a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 3 additions & 2 deletions linters/trivy/plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ lint:
definitions:
- name: trivy
tools: [trivy]
suggest_if: files_present
suggest_if: config_present
description: A comprehensive and versatile security scanner
known_good_version: 0.44.1
# trivy supports --format template --template "@contrib/sarif.tpl", but it reports the wrong filepaths.
Expand Down Expand Up @@ -74,7 +74,8 @@ lint:
parser:
runtime: python
run: python3 ${plugin}/linters/trivy/trivy_config_to_sarif.py
direct_configs: [trivy-secret.yaml]
# trivy-secret.yaml is old config file https://aquasecurity.github.io/trivy/v0.27.1/docs/secret/configuration/
direct_configs: [trivy.yaml, .trivyignore, .trivyignore.yaml, trivy-secret.yaml]
version_command:
parse_regex: Version ${semver}
run: trivy --version
Expand Down
1 change: 0 additions & 1 deletion tests/repo_tests/config_check.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ describe("Global config health check", () => {
"svgo",
"taplo",
"tflint",
"trivy",
"trufflehog",
"yamllint",
]
Expand Down

0 comments on commit bd59b6a

Please sign in to comment.