5.6.8.2. 未加工の結果の取得


コンプライアンススキャンが完了すると、個別のチェックの結果は生成される ComplianceCheckResult カスタムリソース (CR) にリスト表示されます。ただし、管理者または監査担当者にはスキャンの詳細情報が必要になる場合があります。OpenSCAP ツールは、詳細な結果で Advanced Recording Format (ARF) 形式のファイルを作成します。この ARF ファイルは設定マップまたは他の標準の Kubernetes リソースに保存するには大き過ぎるため、永続ボリューム (PV) がこれを組み込むように作成されます。

手順

  • Compliance Operator を使用した PV からの結果の取得は 4 つの手順で実行されます。ただし、oc-compliance プラグインでは、単一のコマンドを使用できます。

    $ oc compliance fetch-raw <object-type> <object-name> -o <output-path>
  • <object-type> は、スキャンの機能に使用されたオブジェクトによって、scansettingbindingcompliancescan または compliancesuite のいずれかにすることができます。
  • <object-name> は、ARF ファイルを収集に使用するバインディング、スイート、またはスキャンオブジェクトの名前です。<output-path> は、結果を配置するローカルディレクトリーです。

    以下に例を示します。

    $ oc compliance fetch-raw scansettingbindings my-binding -o /tmp/

    出力例

    Fetching results for my-binding scans: ocp4-cis, ocp4-cis-node-worker, ocp4-cis-node-master
    Fetching raw compliance results for scan 'ocp4-cis'.......
    The raw compliance results are available in the following directory: /tmp/ocp4-cis
    Fetching raw compliance results for scan 'ocp4-cis-node-worker'...........
    The raw compliance results are available in the following directory: /tmp/ocp4-cis-node-worker
    Fetching raw compliance results for scan 'ocp4-cis-node-master'......
    The raw compliance results are available in the following directory: /tmp/ocp4-cis-node-master

ディレクトリー内のファイルの一覧を表示します。

$ ls /tmp/ocp4-cis-node-master/

出力例

ocp4-cis-node-master-ip-10-0-128-89.ec2.internal-pod.xml.bzip2  ocp4-cis-node-master-ip-10-0-150-5.ec2.internal-pod.xml.bzip2  ocp4-cis-node-master-ip-10-0-163-32.ec2.internal-pod.xml.bzip2

結果を抽出します。

$ bunzip2 -c resultsdir/worker-scan/worker-scan-stage-459-tqkg7-compute-0-pod.xml.bzip2 > resultsdir/worker-scan/worker-scan-ip-10-0-170-231.us-east-2.compute.internal-pod.xml

結果を表示します。

$ ls resultsdir/worker-scan/

出力例

worker-scan-ip-10-0-170-231.us-east-2.compute.internal-pod.xml
worker-scan-stage-459-tqkg7-compute-0-pod.xml.bzip2
worker-scan-stage-459-tqkg7-compute-1-pod.xml.bzip2

Red Hat logoGithubredditYoutubeTwitter

詳細情報

試用、購入および販売

コミュニティー

会社概要

Red Hat は、企業がコアとなるデータセンターからネットワークエッジに至るまで、各種プラットフォームや環境全体で作業を簡素化できるように、強化されたソリューションを提供しています。

多様性を受け入れるオープンソースの強化

Red Hat では、コード、ドキュメント、Web プロパティーにおける配慮に欠ける用語の置き換えに取り組んでいます。このような変更は、段階的に実施される予定です。詳細情報: Red Hat ブログ.

Red Hat ドキュメントについて

Legal Notice

Theme

© 2026 Red Hat
トップに戻る