将Kubernetes上下文应用于扫描以抑制漏洞
(此徽标非AI生成)
Vex8s 通过关联容器漏洞与Kubernetes设置,生成 VEX 文档,以确定哪些CVE在你的集群中实际可利用。
请注意,这是一个实验性项目。内容可能会快速变化。
该项目旨在通过结合漏洞分类和 securityContext 分析,评估已知CVE在Kubernetes工作负载中的可利用性。

它基于以下概念:
如需更深入的阅读,您可以参考这篇论文:使用Kubernetes安全上下文和VEX的环境感知漏洞抑制
您可以从发布页面下载最新二进制文件。
或者您可以手动构建:
make build
vex8s 当前支持两种生成VEX文档的方式:
被动模式:传递已由 trivy 或 grype 生成的漏洞报告。
主动模式:使用 trivy 或 grype 引擎主动扫描镜像,然后根据结果生成文档。
使用 trivy:
# generate vulnerability report.
trivy image --format json --output nginx.trivy.json nginx:1.21.0
# generate VEX document by processing vulnerability report.
vex8s generate --manifest examples/nginx.yaml --report nginx.trivy.json --output nginx.vex.json
# scan again with VEX document to suppress vulnerabilities.
trivy image --vex nginx.vex.json --show-suppressed nginx:1.21.0
同样的操作可以使用 grype 完成:
# generate sbom report.
grype --output cyclonedx-json --file nginx.grype.json nginx:1.21.0
# generate vulnerability report.
grype sbom:./nginx.grype.json --output json --file nginx.grype-vr.json
# generate VEX document by processing vulnerability report.
vex8s generate --manifest examples/nginx.yaml --report nginx.grype-vr.json --output nginx.vex.json
# scan sbom with VEX document to suppress vulnerabilities.
grype sbom:./nginx.grype.json --output table --vex nginx.vex.json --show-suppressed
使用 trivy:
# scan the image and automatically generate VEX document.
vex8s generate --manifest examples/nginx.yaml --scan.engine trivy --output nginx.vex.json
# scan again with VEX document to suppress vulnerabilities.
trivy image --vex nginx.vex.json --show-suppressed nginx:1.21.0
同样的操作可以使用 grype 完成:
# generate sbom report.
grype --output cyclonedx-json --file nginx.grype.json nginx:1.21.0
# scan the image and automatically generate VEX document.
vex8s generate --manifest examples/nginx.yaml --scan.engine grype --output nginx.vex.json
# scan sbom with VEX document to suppress vulnerabilities.
grype sbom:./nginx.grype.json --output table --vex nginx.vex.json --show-suppressed
该项目受 Akihiro Suda 的项目 vexllm 启发。