Quay Container Security Operator (CSO)
Scan pod images with the Red Hat Quay Container Security Operator (CSO).
The Container Security Operator brings Quay and Clair metadata to Kubernetes / Red Hat OpenShift, allowing us to scan images for vulnerabilities and compliance issues. This helps ensure that the images used in our pods are secure and compliant with relevant standards.
Installing the Quay CSO Operator
-
Open a browser window and log in to the Red Hat OpenShift Container Platform web console.
-
From the Administrator perspective, click
Operators, thenOperatorHub. -
In the
Filter by keywordfield, typeQuay.
-
Select the
Red Hat Quay Container Security Operatortile and clickInstall.
-
Select
stable-3.7from the list of availableUpdate Channeloptions. ChooseAll namespaces on the cluster (default)as the installation mode. ChooseAutomaticupdate approval.
-
Click
Installto start the installation process.
Checking the image vulnerabilities through the OpenShift web console
-
Deploy a vulnerable image. For this example, we are going to deploy an old httpd vulnerable image.
# Pull the image
podman pull registry.redhat.io/rhel8/httpd-24:1-30
# Tag the image
podman tag registry.redhat.io/rhel8/httpd-24:1-30 ${QUAY_HOSTNAME}/olleb/httpd-24:1-30
# Push it to our Quay registry
podman push ${QUAY_HOSTNAME}/olleb/httpd-24:1-30
-
Navigate to the Quay Registry Endpoint and select the
olleb/httpd-24repository that has been automatically created when we pulled the image before. -
Select
Settingsand then clickMake Public. -
Open the Red Hat OpenShift Container Platform web console and create a new project by clicking
ProjectsthenCreate Project. Name the project asvuln-httpdand then clickCreate.
-
In the
vuln-httpdproject, deploy the vulnerable image by clickingWorkloadsthenDeployments. ClickCreate Deployment. -
Replace the default image value with the image from our Quay registry. Set replicas as desired and set
httpdas the custom name.
-
Click
Create. -
Red Hat OpenShift will start the deployment and create the pod. Go to
WorkloadsthenPodsand select one of thehttpdpods. Select theVulnerabilitiestab.
-
Click on the security scan results.
Additionally, after installing the CSO operator, a new status related to Image Vulnerabilities is shown on the cluster overview.
-
Click
Image Vulnerabilities.
-
Click
View alland then click on the Manifest related toolleb/httpd-24.
You will be redirected to the Quay Security Scanner Dashboard.