2.2. Configuring the ScanSettingBinding object


By creating a ScanSettingBinding object in the openshift-compliance namespace, you can scan your cluster by using the cis and cis-node profiles either from the command-line interface (CLI) or user interface (UI).

중요

This example uses ocp4-cis and ocp4-cis-node profiles, but OpenShift Container Platform provides additional profiles.

For more information, see "Understanding the Compliance Operator".

Prerequisites

  • You have installed the Compliance Operator.

Procedure

  • To create the ScanSettingBinding object from the CLI, perform the following steps:

    1. Create a file named sscan.yaml by using the following content:

      apiVersion: compliance.openshift.io/v1alpha1
      kind: ScanSettingBinding
      metadata:
        name: cis-compliance
      profiles:
        - name: ocp4-cis-node
          kind: Profile
          apiGroup: compliance.openshift.io/v1alpha1
        - name: ocp4-cis
          kind: Profile
          apiGroup: compliance.openshift.io/v1alpha1
      settingsRef:
        name: default
        kind: ScanSetting
        apiGroup: compliance.openshift.io/v1alpha1
    2. Create the ScanSettingBinding object by running the following command:

      $ oc create -f sscan.yaml -n openshift-compliance

      If successful, the following message is displayed:

      $ scansettingbinding.compliance.openshift.io/cis-compliance created
  • To create the ScanSettingBinding object from the UI, perform the following steps:

    1. Change the active project to openshift-compliance.
    2. Click + to open the Import YAML page.
    3. Paste the YAML from the previous example, and then click Create.

Verification

  1. Run a compliance scan in RHACS.

    For more information about how to run a compliance scan by using the compliance feature, see "Checking the compliance status of your infrastructure".

  2. Ensure that ocp4-cis and ocp4-cis-node results are displayed.
중요
  • If you are using the CLI, you can view the compliance scan results from the dashboard page.

    For more information about how to view the compliance scan results from the dashboard page, see "Viewing the compliance standards across your environment".

  • If you are using the UI, you can view the compliance scan results from both the dashboard and coverage page.

    For more information about how to view the compliance scan results from the coverage page, see "Assessing the profile compliance across clusters".

Red Hat logoGithubredditYoutubeTwitter

자세한 정보

평가판, 구매 및 판매

커뮤니티

Red Hat 소개

Red Hat은 기업이 핵심 데이터 센터에서 네트워크 에지에 이르기까지 플랫폼과 환경 전반에서 더 쉽게 작업할 수 있도록 강화된 솔루션을 제공합니다.

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

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

Red Hat 문서 정보

Legal Notice

Theme

© 2026 Red Hat
맨 위로 이동