主要功能
1、扫描容器映像或文件系统的内容以查找已知漏洞。
2、查找主要操作系统软件包的漏洞。
3、查找特定于语言的程序包的漏洞。
安装方法
Unix安装方法
- #将最新版本安装到 /usr/local/bin
- curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin
- #将特定版本安装到特定目录
- curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b <SOME_BIN_PATH> <RELEASE_VERSION>
MacOS安装方法
- brew tap anchore/grype
- brew install grype
实现shell
Grype通过其CLI实施(cobra)提供完成shell。通过运行以下命令之一为您的shell生成完成代码:
grype completion <bash|fish>
go run main.go completion <bash|fish>
这会将shell脚本输出到STDOUT,然后可以将其用作Grype的完成脚本。使用-h或--help标志运行上述命令之一 将提供有关如何针对所选shell进行操作的说明。