aquasecurity / trivy

Find vulnerabilities, misconfigurations, secrets, SBOM in containers, Kubernetes, code repositories, clouds and more
https://aquasecurity.github.io/trivy
Apache License 2.0
22.1k stars 2.18k forks source link

refactor: use google/wire for cache #7024

Closed knqyf263 closed 1 week ago

knqyf263 commented 1 week ago

Description

This PR simplifies the cache initialization process in the artifact scanning. Previously, we initialized the cache.Cache instance within pkg/commands/artifact/run.go to support --clear-cache and --reset operations. However, these operations have been moved to the trivy clean command.

With this change, we can now generate the cache.Cache instance through google/wire, which is consistent with other instances in the project.

Changes

Benefits

Checklist