Skip to content

Commit 97ccc5a

Browse files
authored
Merge pull request #51728 from Wiharris/OSDOCS-4311
OSDOCS-4311 spec.manualRules Added in Attributes
2 parents 92b5262 + 1a31caa commit 97ccc5a

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

modules/compliance-tailored-profiles.adoc

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ The `ComplianceSuite` object contains an optional `TailoringConfigMap` attribute
1515
+
1616
[source,terminal]
1717
----
18-
$ oc get rules.compliance -n openshift-compliance -l compliance.openshift.io/profile-bundle=rhcos4
18+
$ oc get rules.compliance -n openshift-compliance -l compliance.openshift.io/profile-bundle=rhcos4
1919
----
2020

2121
. Browse the available variables in the same `ProfileBundle`:
2222
+
2323
[source,terminal]
2424
----
25-
$ oc get variables.compliance -n openshift-compliance -l compliance.openshift.io/profile-bundle=rhcos4
25+
$ oc get variables.compliance -n openshift-compliance -l compliance.openshift.io/profile-bundle=rhcos4
2626
----
2727

2828
. Create a tailored profile named `nist-moderate-modified`:
@@ -65,6 +65,9 @@ spec:
6565
|`disableRules`
6666
|A list of name and rationale pairs. Each name refers to a name of a rule object that is to be disabled. The rationale value is human-readable text describing why the rule is disabled.
6767

68+
|`manualRules`
69+
| A list of name and rationale pairs. When a manual rule is added, the check result status will always be `manual` and remediation will not be generated. This attribute is automatic and by default has no values when set as a manual rule.
70+
6871
|`enableRules`
6972
|A list of name and rationale pairs. Each name refers to a name of a rule object that is to be enabled. The rationale value is human-readable text describing why the rule is enabled.
7073

@@ -74,6 +77,24 @@ spec:
7477
|`setValues`
7578
| A list of name, rationale, and value groupings. Each name refers to a name of the value set. The rationale is human-readable text describing the set. The value is the actual setting.
7679
|===
80+
+
81+
.. Add the `tailoredProfile.spec.manualRules` attribute:
82+
+
83+
.Example `tailoredProfile.spec.manualRules.yaml`
84+
[source,yaml]
85+
----
86+
apiVersion: compliance.openshift.io/v1alpha1
87+
kind: TailoredProfile
88+
metadata:
89+
name: ocp4-manual-scc-check
90+
spec:
91+
extends: ocp4-cis
92+
description: This profile extends ocp4-cis by forcing the SCC check to always return MANUAL
93+
title: OCP4 CIS profile with manual SCC check
94+
manualRules:
95+
- name: ocp4-scc-limit-container-allowed-capabilities
96+
rationale: We use third party software that installs its own SCC with extra privileges
97+
----
7798

7899
.. Create the `TailoredProfile` object:
79100
+
@@ -89,7 +110,7 @@ $ oc create -n openshift-compliance -f new-profile-node.yaml <1>
89110
tailoredprofile.compliance.openshift.io/nist-moderate-modified created
90111
----
91112

92-
. Define the `ScanSettingBinding` object to bind the new `nist-moderate-modified` tailored profile to the default `ScanSetting` object.
113+
. Define the `ScanSettingBinding` object to bind the new `nist-moderate-modified` tailored profile to the default `ScanSetting` object.
93114
+
94115
.Example `new-scansettingbinding.yaml`
95116
[source,yaml]

0 commit comments

Comments
 (0)