
Kubernetesのコンテキストをスキャンに適用することで脆弱性を抑制する
(このロゴはAI生成ではありません)
Vex8sは、コンテナの脆弱性とKubernetesの設定を関連付けることでVEXドキュメントを生成し、クラスタ内で実際に悪用可能なCVEを特定します。
これは実験的なプロジェクトであることにご注意ください。状況は急速に変化する可能性があります。
このプロジェクトは、脆弱性の分類とsecurityContext分析を組み合わせることで、Kubernetesワークロード内の既知のCVEの悪用可能性を評価することを目的としています。

これは以下のコンセプトに基づいています:
より詳細な内容については、こちらの論文を参照してください: Environment-Aware Vulnerability Suppression Using Kubernetes Security Contexts and VEX
最新のバイナリはリリースページからダウンロードできます。
または、手動でビルドすることもできます:
make build
vex8sは現在、VEXドキュメントを生成する2つの方法をサポートしています:
passive-mode: trivyまたはgrypeによって既に生成された脆弱性レポートを渡す方法。
active-mode: 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
各CVEは1つ以上の悪用クラスに分類され、これが緩和の判断を左右します。vex8sは--classifierを介して3つの分類器エンジンをサポートしています:
embedded(デフォルト): バイナリにバンドルされたオフラインのONNX MLモデル。ネットワークアクセスは不要です。gemini: GoogleのGemini LLMを使用してCVEの説明を分類します。GEMINI_API_KEY環境変数が必要です(オプションでGEMINI_MODEL)。ollama: ローカルで実行されているOllamaサーバーを使用してCVEの説明を分類します。まずqwen2.5:3b-instructなどのモデルをプルしてください(オプションでOLLAMA_HOST / OLLAMA_MODELを設定)。export GEMINI_API_KEY="your-api-key"
vex8s generate --manifest examples/nginx.yaml --report nginx.trivy.json \
--output nginx.vex.json --classifier ollama
完全なウォークスルー、GeminiおよびOllama分類器のセットアップ、および完全なフラグリファレンスについては、ドキュメント、特にユーザーガイドを参照してください。
このプロジェクトは、Akihiro Suda氏のプロジェクトvexllmに触発されました。