Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions shared/applicability/oval/installed_app_is_ocp4.xml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
<literal_component>/kubernetes-api-resources/hypershift/version</literal_component>
</local_variable>

<local_variable id="ocp4_operator_deployment_dump_location" datatype="string" comment="The actual filepath of the file to scan." version="1">
<literal_component>/kubernetes-api-resources/api/v1/namespaces/openshift-compliance/pods/api-checks-pod</literal_component>
</local_variable>

<unix:file_test id="test_file_for_ocp4" check="only one" comment="Find the actual file to be scanned." version="1">
<unix:object object_ref="object_file_for_ocp4"/>
</unix:file_test>
Expand Down Expand Up @@ -91,13 +87,13 @@


<ind:yamlfilecontent_object id="object_hypershift_hosted" version="1">
<ind:filepath var_ref="ocp4_operator_deployment_dump_location"/>
<ind:yamlpath>.spec.containers[:].command[:]</ind:yamlpath>
<ind:filepath var_ref="ocp4_infra_dump_location"/>
<ind:yamlpath>.status.controlPlaneTopology</ind:yamlpath>
</ind:yamlfilecontent_object>

<ind:yamlfilecontent_state id="state_hypershift_hosted" version="1">
<ind:value datatype="record" entity_check="at least one">
<field name="#" datatype="string" operation="pattern match" entity_check="at least one">^--platform=HyperShift$</field>
<ind:value datatype="record">
<field name="#" datatype="string" operation="pattern match">^External$</field>
</ind:value>
</ind:yamlfilecontent_state>

Expand Down Expand Up @@ -270,7 +266,8 @@
<description>The application installed on the system is OpenShift 4 on HyperShift Hosted Cluster.</description>
</metadata>
<criteria operator="AND">
<criterion comment="Make sure there is HyperShift in the Compliance Operator Command flag" test_ref="test_hypershift_hosted"/>
<criterion comment="Make sure controlPlaneTopology is External (HyperShift Hosted Cluster)" test_ref="test_hypershift_hosted"/>
<criterion comment="Make sure OCP4 infrastructure/cluster file is present" test_ref="test_file_for_ocp4_infra"/>
</criteria>
</definition>

Expand Down
Loading