In this section you will find an aggregation of the different ways to install Trivy. Installation options are labeled as either "Official" or "Community". Official installations are developed by the Trivy team and supported by it. Community installations could be developed by anyone from the Trivy community, and collected here for your convenience. For support or questions about community installations, please contact the original developers.
Note
If you are looking to integrate Trivy into another system, such as CI/CD, IDE, Kubernetes, etc, please see Ecosystem section to explore integrations of Trivy with other tools.
cat<< EOF | sudo tee -a /etc/yum.repos.d/trivy.repo[trivy]name=Trivy repositorybaseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/\$basearch/gpgcheck=1enabled=1gpgkey=https://aquasecurity.github.io/trivy-repo/rpm/public.keyEOF
sudoyum-yupdate
sudoyum-yinstalltrivy
asdf and mise are quite similar tools you can use to install trivy.
See their respective documentation for more information of how to install them and use them:
A basic global installation is shown below, for specific version or/and local version to a directory see "asdf" documentation.
# Install plugin
asdfpluginaddtrivyhttps://github.com/zufardhiyaulhaq/asdf-trivy.git
# Install latest version
asdfinstalltrivylatest
# Set a version globally (on your ~/.tool-versions file)
asdfglobaltrivylatest
# Now trivy commands are available
trivy--version
A basic global installation is shown below, for specific version or/and local version to a directory see "mise" documentation.
# Install plugin and install latest version
miseinstalltrivy@latest
# Set a version globally (on your ~/.tool-versions file)
miseuse-gtrivy@latest
# Now trivy commands are available
trivy--version