OpenShift must continuously scan components, containers, and images for vulnerabilities.

STIG ID: CNTR-OS-001060  |  SRG: SRG-APP-000516-CTR-001335 |  Severity: medium |  CCI: CCI-000366 |  Vulnerability Id: V-257586 | 

Vulnerability Discussion

Finding vulnerabilities quickly within the container platform and within containers deployed within the platform is important to keep the overall platform secure. When a vulnerability within a component or container is unknown or allowed to remain unpatched, other containers and customers within the platform become vulnerability. The vulnerability can lead to the loss of application data, organizational infrastructure data, and Denial-of-Service (DoS) to hosted applications.

Vulnerability scanning can be performed by the container platform or by external applications.

Check

To check if the Container Security Operator is running, execute the following:

oc get deploy -n openshift-operators container-security-operator -ojsonpath='{.status.readyReplicas}'

If this command returns an error or the number 0, and a separate tool is not being used to perform continuous vulnerability scans of components, containers, and container images, this is a finding.

Fix

Vulnerability scanning can be performed by the Container Security Operator, Red Hat Advanced Cluster Security (formerly StackRox) or by external applications. Follow instructions from the application vendor if using external tool for vulnerability scanning. To install the Container Security Operator into the cluster, run the following:

oc apply -f - << 'EOF'
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
labels:
operators.coreos.com/container-security-operator.openshift-operators: ''
name: container-security-operator
namespace: openshift-operators
spec:
channel: stable-3.8
installPlanApproval: Automatic
name: container-security-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF