mxab / pre-commit-trivy

MIT License
18 stars 9 forks source link

No cache files create #1

Closed natefive closed 1 year ago

natefive commented 1 year ago
trivyfs-docker...........................................................Failed
- hook id: trivyfs-docker
- exit code: 1

Incorrect Usage: flag provided but not defined: -cache-dir

Upon running v0.2.0 of the pre-commit hook, no cache files are create (I tried creating them manually too), I am met with the above error and am pretty sure the --cache-dir arg needs setting here https://github.com/mxab/pre-commit-trivy/blob/0b1d39701f002dcfaf84b4e73db7acbe96d2c56d/.pre-commit-hooks.yaml#L4 before the fs not after e.g. trivy --cache-dir /src/.pre-commit-trivv-cache fs .

mxab commented 1 year ago

Hey, thanks for reporting.

Strange this was working for me... could you try do a pull on the image docker pull aquasec/trivy

I'll also try to reproduce this

natefive commented 1 year ago

my bad, works if I pull the latest version - I had a 10 month old version tagged as latest!

natefive commented 1 year ago

perhaps you should pull the compatible version via version instead of latest within the entry?

mxab commented 1 year ago

I thought so as well, but it would mean to make a release with every trivy release. I can try to do this, but I have to check if I can automate this.