5.6.8.2. 원시 결과 가져오기


규정 준수 검사가 완료되면 결과 ComplianceCheckResult CR(사용자 정의 리소스)에 개별 검사 결과가 나열됩니다. 그러나 관리자 또는 감사자는 검사에 대한 전체 세부 정보가 필요할 수 있습니다. OpenSCAP 툴은 자세한 결과를 사용하여 AMQP(Advanced Recording Format) 포맷 파일을 생성합니다. 이 ARF 파일은 구성 맵 또는 기타 표준 Kubernetes 리소스에 저장하기에 너무 크므로 이를 포함할 영구 볼륨(PV)이 생성됩니다.

프로세스

  • Compliance Operator를 사용하여 PV에서 결과를 가져오는 작업은 4단계 프로세스입니다. 그러나 oc-compliance 플러그인을 사용하면 단일 명령을 사용할 수 있습니다.

    $ oc compliance fetch-raw <object-type> <object-name> -o <output-path>
  • <object-type>은 검사가 시작된 오브젝트에 따라 scansettingbinding, compliancescan 또는 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은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

보다 포괄적 수용을 위한 오픈 소스 용어 교체

Red Hat은 코드, 문서, 웹 속성에서 문제가 있는 언어를 교체하기 위해 최선을 다하고 있습니다. 자세한 내용은 다음을 참조하세요.Red Hat 블로그.

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동