windowsdockersecuritydocker-imagetrivy

How to run a Trivy scan on Windows?


In the installation page for Trivy there is no mention of Windows.

I have Docker for Windows installed so the Docker method looks promising but there are a couple of things I'm not sure of:

  1. What should I set the cache directory to?
  2. Will I need to "mount docker.sock"? And if so, will I need to replace the /var/run and $HOME/Library/Caches directories in that command with something more "Windows-ey"?

The aim is to scan an image that I built using Docker for Windows.


Solution

  • As of release 0.36.0 (30 Dec 2022), trivy is now available as a Windows EXE.

    You can find the latest release in the Releases directory. Expand it to show the full list of files and then scroll down until you find a filename of the form trivy_x.yy.z_windows-64bit.zip. Download the file and unzip it on your PC. Look for the executable trivy.exe.