aquasecurity / trivy-action

Runs Trivy as GitHub action to scan your Docker container image for vulnerabilities
Apache License 2.0
835 stars 242 forks source link

How to clean the caches #372

Open VictorDelCampo opened 4 months ago

VictorDelCampo commented 4 months ago

Before the last release we could reset the caches by passing an environment variable like:

      - name: Remove all caches and database of the trivy scanner
        uses: aquasecurity/trivy-action@d9cd5b1c23aaf8cb31bb09141028215828364bbb
        env:
          TRIVY_RESET: true
        with:
          scan-type: "image"

But now this --reset flag is not longer there and there is only now the utility command

trivy clean --all

But there is no option to pass this information as an environment variable.

How can I clean the caches using the github action? Thanks!

simar7 commented 4 months ago

@VictorDelCampo thanks for the question, we will get back to you on this.

simar7 commented 4 months ago

Looks like we will need to add this in as a feature for Trivy-action as currently there's no possible way from the action to clear the cache.