You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -36,11 +36,11 @@ Depending on the workload type, not all tests are required to pass to satisfy be
36
36
|---|---|---|
37
37
|8|1|
38
38
39
-
### Non-Telco specific tests only: 70
39
+
### Non-Telco specific tests only: 71
40
40
41
41
|Mandatory|Optional|
42
42
|---|---|---|
43
-
|43|27|
43
+
|43|28|
44
44
45
45
### Telco specific tests only: 27
46
46
@@ -383,7 +383,7 @@ Test Cases are the specifications used to perform a meaningful test. Test cases
383
383
|---|---|
384
384
|Unique ID|access-control-security-context|
385
385
|Description|Checks the security context matches one of the 4 categories|
386
-
|Suggested Remediation|Exception possible if a workload uses mlock(), mlockall(), shmctl(), mmap(); exception will be considered for DPDK applications. Must identify which container requires the capability and document why. If the container had the right configuration of the allowed category from the 4 approved list then the test will pass. The 4 categories are defined in Requirement ID 94118 in the [security context categories](#security-context-categories)|
386
+
|Suggested Remediation|Exception possible if a workload uses mlock(), mlockall(), shmctl(), mmap(); exception will be considered for DPDK applications. Must identify which container requires the capability and document why. If the container had the right configuration of the allowed category from the 4 approved list then the test will pass. The 4 categories are defined in Requirement ID 94118 [here](#security-context-categories)|
387
387
|Best Practice Reference|https://redhat-best-practices-for-k8s.github.io/guide/#k8s-best-practices-linux-capabilities|
388
388
|Exception Process|no exception needed for optional/extended test|
389
389
|Impact Statement|Incorrect security context configurations can weaken container isolation, enable privilege escalation, and create exploitable attack vectors.|
@@ -1639,8 +1639,8 @@ Test Cases are the specifications used to perform a meaningful test. Test cases
1639
1639
|Property|Description|
1640
1640
|---|---|
1641
1641
|Unique ID|platform-alteration-hugepages-config|
1642
-
|Description|Checks to see that HugePage settings have been configured through MachineConfig, and not manually on the underlying Node. This test case applies only to Nodes that are configured with the "worker" MachineConfigSet. First, the "worker" MachineConfig is polled, and the Hugepage settings are extracted. Next, the underlying Nodes are polled for configured HugePages through inspection of /proc/meminfo. The results are compared, and the test passes only if they are the same.|
1643
-
|Suggested Remediation|HugePage settings should be configured either directly through the MachineConfigOperator or indirectly using the PerformanceAddonOperator. This ensures that OpenShift is aware of the special MachineConfig requirements, and can provision your workload on a Node that is part of the corresponding MachineConfigSet. Avoid making changes directly to an underlying Node, and let OpenShift handle the heavy lifting of configuring advanced settings. This test case applies only to Nodes that are configured with the "worker" MachineConfigSet.|
1642
+
|Description|Checks to see that HugePage settings have been configured through MachineConfig, and not manually on the underlying Node. This test case applies only to Nodes that are labeled as workers with the standard label "node-role.kubernetes.io/worker". First, the MachineConfig is inspected for hugepage settings in systemd units. If not, the MC's .spec.kernelArguments are inspected for hugepage settings. The sizes and page numbers are compared, and the test passes only if they are the same than then ones in node's /sys/kernel/mm/hugepages/hugepages-X folders.|
1643
+
|Suggested Remediation|HugePage settings for worker nodes must be configured either directly through the MachineConfigOperator or indirectly using the PerformanceAddonOperator. Avoid making changes directly to an underlying Node, and let OpenShift handle the heavy lifting of configuring advanced settings.|
1644
1644
|Best Practice Reference|https://redhat-best-practices-for-k8s.github.io/guide/#k8s-best-practices-huge-pages|
1645
1645
|Exception Process|No exceptions|
1646
1646
|Impact Statement|Manual hugepage configuration bypasses cluster management, can cause node instability, and creates configuration drift issues.|
@@ -1812,7 +1812,7 @@ Test Cases are the specifications used to perform a meaningful test. Test cases
1812
1812
|---|---|
1813
1813
|Unique ID|preflight-BasedOnUbi|
1814
1814
|Description|Checking if the container's base image is based upon the Red Hat Universal Base Image (UBI)|
1815
-
|Suggested Remediation|Change the FROM directive in your Dockerfile or Containerfile to FROM registry.access.redhat.com/ubi8/ubi|
1815
+
|Suggested Remediation|Change the FROM directive in your Dockerfile or Containerfile, for the latest list of images and details refer to: https://catalog.redhat.com/software/base-images|
1816
1816
|Best Practice Reference|No Doc Link|
1817
1817
|Exception Process|There is no documented exception process for this.|
1818
1818
|Impact Statement|Non-UBI base images may lack security updates, enterprise support, and compliance certifications required for production use.|
@@ -1908,6 +1908,23 @@ Test Cases are the specifications used to perform a meaningful test. Test cases
1908
1908
|Non-Telco|Optional|
1909
1909
|Telco|Optional|
1910
1910
1911
+
#### preflight-HasNoProhibitedLabels
1912
+
1913
+
|Property|Description|
1914
+
|---|---|
1915
+
|Unique ID|preflight-HasNoProhibitedLabels|
1916
+
|Description|Checking if the labels (name, vendor, maintainer) violate Red Hat trademark.|
1917
+
|Suggested Remediation|Ensure the name, vendor, and maintainer label on your image do not violate the Red Hat trademark.|
1918
+
|Best Practice Reference|No Doc Link|
1919
+
|Exception Process|There is no documented exception process for this.|
1920
+
|Impact Statement|Misuse of Red Hat trademarks in name, vendor, or maintainer labels creates legal and compliance risks that can block certification and publication.|
1921
+
|Tags|common,preflight|
1922
+
|**Scenario**|**Optional/Mandatory**|
1923
+
|Extended|Optional|
1924
+
|Far-Edge|Optional|
1925
+
|Non-Telco|Optional|
1926
+
|Telco|Optional|
1927
+
1911
1928
#### preflight-HasNoProhibitedPackages
1912
1929
1913
1930
|Property|Description|
@@ -1947,8 +1964,8 @@ Test Cases are the specifications used to perform a meaningful test. Test cases
1947
1964
|Property|Description|
1948
1965
|---|---|
1949
1966
|Unique ID|preflight-HasRequiredLabel|
1950
-
|Description|Checking if the required labels (name, vendor, version, release, summary, description, maintainer) are present in the container metadata and that they do not violate Red Hat trademark.|
1951
-
|Suggested Remediation|Add the following labels to your Dockerfile or Containerfile: name, vendor, version, release, summary, description, maintainer and validate that they do not violate Red Hat trademark.|
1967
+
|Description|Checking if the required labels (name, vendor, version, release, summary, description, maintainer) are present in the container metadata|
1968
+
|Suggested Remediation|Add the following labels to your Dockerfile or Containerfile: name, vendor, version, release, summary, description, maintainer.|
1952
1969
|Best Practice Reference|No Doc Link|
1953
1970
|Exception Process|There is no documented exception process for this.|
1954
1971
|Impact Statement|Missing required labels prevent proper metadata management and can cause deployment and management issues.|
`Checks to see that HugePage settings have been configured through MachineConfig, and not manually on the underlying Node. This test case applies only to Nodes that are configured with the "worker" MachineConfigSet. First, the "worker" MachineConfig is polled, and the Hugepage settings are extracted. Next, the underlying Nodes are polled for configured HugePages through inspection of /proc/meminfo. The results are compared, and the test passes only if they are the same.`, //nolint:lll
751
+
`Checks to see that HugePage settings have been configured through MachineConfig, and not manually on the underlying Node. This test case applies only to Nodes that are labeled as workers with the standard label "node-role.kubernetes.io/worker". First, the MachineConfig is inspected for hugepage settings in systemd units. If not, the MC's .spec.kernelArguments are inspected for hugepage settings. The sizes and page numbers are compared, and the test passes only if they are the same than then ones in node's /sys/kernel/mm/hugepages/hugepages-X folders.`, //nolint:lll
Copy file name to clipboardExpand all lines: tests/identifiers/remediation.go
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,7 @@ const (
59
59
60
60
PodHostPIDRemediation=`Set the spec.HostPid parameter to false in the pod configuration. Workloads should avoid accessing host resources - spec.HostPid should be false.`
61
61
62
-
HugepagesNotManuallyManipulatedRemediation=`HugePage settings should be configured either directly through the MachineConfigOperator or indirectly using the PerformanceAddonOperator. This ensures that OpenShift is aware of the special MachineConfig requirements, and can provision your workload on a Node that is part of the corresponding MachineConfigSet. Avoid making changes directly to an underlying Node, and let OpenShift handle the heavy lifting of configuring advanced settings. This test case applies only to Nodes that are configured with the "worker" MachineConfigSet.`
62
+
HugepagesNotManuallyManipulatedRemediation=`HugePage settings for worker nodes must be configured either directly through the MachineConfigOperator or indirectly using the PerformanceAddonOperator. Avoid making changes directly to an underlying Node, and let OpenShift handle the heavy lifting of configuring advanced settings.`
63
63
64
64
ICMPv4ConnectivityRemediation=`Ensure that the workload is able to communicate via the Default OpenShift network. In some rare cases, workloads may require routing table changes in order to communicate over the Default network. To exclude a particular pod from ICMPv4 connectivity tests, add the redhat-best-practices-for-k8s.com/skip_connectivity_tests label to it. The label value is trivial, only its presence.`
expectedErrorMsg: "failed to compare machineConfig KernelArguments with node ones, err: total hugepages of size 1048576 will not match (node count=16, expected=8)",
683
691
},
692
+
// Node has two numas and one size in kB units but total pages (35) will not match kernelArgs (30).
expectedErrorMsg: "failed to compare machineConfig KernelArguments with node ones, err: total hugepages of size 1048576 will not match (node count=35, expected=30)",
700
+
},
701
+
// Invalid kernelArgs size: not a multiple of 1024.
expectedErrorMsg: "failed to compare machineConfig KernelArguments with node ones, err: failed to get kernelArguments hugepages config, err: failed to convert hugepage size (1045) to int, err: parsed size 1045 is not a multiple of 1024",
709
+
},
684
710
}
685
711
686
712
// instantiate the fakeClient so we can mock the output from each command to get the node's hugepages files.
0 commit comments