1、下载安装
打开文件/etc/yum.repos.d/trivy.repo,添加以下内容:
[trivy]
name=Trivy repository
baseurl=https://aquasecurity.github.io/trivy-repo/rpm/releases/$releasever/$basearch/
gpgcheck=0
enabled=1
执行安装命令
[root@localhost /]# yum -y install trivy
已加载插件:fastestmirror
Loading mirror speeds from cached hostfile
* base: mirrors.aliyun.com
* extras: mirrors.aliyun.com
* updates: mirrors.aliyun.com
正在解决依赖关系
--> 正在检查事务
---> 软件包 trivy.x86_64.0.0.15.0-1 将被 安装
--> 解决依赖关系完成
依赖关系解决
=================================================================================================================================================================================================================================================
Package 架构 版本 源 大小
=================================================================================================================================================================================================================================================
正在安装:
trivy x86_64 0.15.0-1 trivy 9.1 M
事务概要
=================================================================================================================================================================================================================================================
安装 1 软件包
总下载量:9.1 M
安装大小:27 M
Downloading packages:
trivy-0.15.0.el7.x86_64.rpm | 9.1 MB 00:00:18
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
正在安装 : trivy-0.15.0-1.x86_64 1/1警告:用户 不存在 - 使用root
警告:群组 不存在 - 使用root
验证中 : trivy-0.15.0-1.x86_64 1/1
已安装:
trivy.x86_64 0:0.15.0-1
完毕!
2、扫描