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 keyword
field, typeQuay
.
-
Select the
Red Hat Quay Container Security Operator
tile and clickInstall
.
-
Select
stable-3.7
from the list of availableUpdate Channel
options. ChooseAll namespaces on the cluster (default)
as the installation mode. ChooseAutomatic
update approval.
-
Click
Install
to 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-24
repository that has been automatically created when we pulled the image before. -
Select
Settings
and then clickMake Public
. -
Open the Red Hat OpenShift Container Platform web console and create a new project by clicking
Projects
thenCreate Project
. Name the project asvuln-httpd
and then clickCreate
.
-
In the
vuln-httpd
project, deploy the vulnerable image by clickingWorkloads
thenDeployments
. ClickCreate Deployment
. -
Replace the default image value with the image from our Quay registry. Set replicas as desired and set
httpd
as the custom name.
-
Click
Create
. -
Red Hat OpenShift will start the deployment and create the pod. Go to
Workloads
thenPods
and select one of thehttpd
pods. Select theVulnerabilities
tab.
-
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 all
and then click on the Manifest related toolleb/httpd-24
.
You will be redirected to the Quay Security Scanner Dashboard.