Search

Chapter 12. Managing vulnerabilities

download PDF

12.1. Vulnerability management

Security vulnerabilities in your environment might be exploited by an attacker to perform unauthorized actions such as denial of service, remote code execution, or unauthorized access to sensitive data. Therefore, the management of vulnerabilities is a foundational step towards a successful Kubernetes security program.

12.1.1. Vulnerability management process

Vulnerability management is a continuous process to identify and remediate vulnerabilities. Red Hat Advanced Cluster Security for Kubernetes helps you to facilitate a vulnerability management process.

A successful vulnerability management program often includes the following critical tasks:

  • Performing asset assessment
  • Prioritizing the vulnerabilities
  • Assessing the exposure
  • Taking action
  • Continuously reassessing assets

Red Hat Advanced Cluster Security for Kubernetes helps organizations to perform continuous assessments on their OpenShift Container Platform and Kubernetes clusters. It provides organizations with the contextual information they need to prioritize and act on vulnerabilities in their environment more effectively.

12.1.1.1. Performing asset assessment

Performing an assessment of an organization’s assets involve the following actions:

  • Identifying the assets in your environment
  • Scanning these assets to identify known vulnerabilities
  • Reporting on the vulnerabilities in your environment to impacted stakeholders

When you install Red Hat Advanced Cluster Security for Kubernetes on your Kubernetes or OpenShift Container Platform cluster, it first aggregates the assets running inside of your cluster to help you identify those assets. RHACS allows organizations to perform continuous assessments on their OpenShift Container Platform and Kubernetes clusters. RHACS provides organizations with the contextual information to prioritize and act on vulnerabilities in their environment more effectively.

Important assets that should be monitored by the organization’s vulnerability management process using RHACS include:

  • Components: Components are software packages that may be used as part of an image or run on a node. Components are the lowest level where vulnerabilities are present. Therefore, organizations must upgrade, modify or remove software components in some way to remediate vulnerabilities.
  • Image: A collection of software components and code that create an environment to run an executable portion of code. Images are where you upgrade components to fix vulnerabilities.
  • Nodes: A server used to manage and run applications using OpenShift or Kubernetes and the components that make up the OpenShift Container Platform or Kubernetes service.

Red Hat Advanced Cluster Security for Kubernetes groups these assets into the following structures:

  • Deployment: A definition of an application in Kubernetes that may run pods with containers based on one or many images.
  • Namespace: A grouping of resources such as Deployments that support and isolate an application.
  • Cluster: A group of nodes used to run applications using OpenShift or Kubernetes.

Red Hat Advanced Cluster Security for Kubernetes scans the assets for known vulnerabilities and uses the Common Vulnerabilities and Exposures (CVE) data to assess the impact of a known vulnerability.

12.1.1.1.1. Viewing application vulnerabilities

You can view application vulnerabilities in Red Hat Advanced Cluster Security for Kubernetes.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. On the Dashboard view header, select Application & Infrastructure Namespaces or Deployments.
  3. From the list, search for and select the Namespace or Deployment you want to review.
  4. To get more information about the application, select an entity from Related entities on the right.
12.1.1.1.2. Viewing image vulnerabilities

You can view image vulnerabilities in Red Hat Advanced Cluster Security for Kubernetes.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. On the Dashboard view header, select Images.
  3. From the list of images, select the image you want to investigate. You can also filter the list by performing one of the following steps:

    1. Enter Image in the search bar and then select the Image attribute.
    2. Enter the image name in the search bar.
  4. In the image details view, review the listed CVEs and prioritize taking action to address the impacted components.
  5. Select Components from Related entities on the right to get more information about all the components that are impacted by the selected image. Or select Components from the Affected components column under the Image findings section for a list of components affected by specific CVEs.

Additional resources

12.1.1.2. Viewing workload CVEs in Vulnerability Management (2.0)

You can view a comprehensive list of vulnerabilities, or CVEs, in RHACS across images and deployments. You can use the search filter bar to select specific CVEs, images, deployments, namespaces, or clusters.

Important

Vulnerability Management 2.0 is a Technology Preview feature only. Technology Preview features are not supported with Red Hat production service level agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.

For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.

Procedure

  1. In the RHACS portal, navigate to Vulnerability Management 2.0 Workload CVEs.
  2. From the drop-down list, select the search criteria you want to use. You can select an item type, such as a cluster, from the list, and then select the specific name of the item. You can add additional items to the filter by selecting another item from the list and selecting the specific name of the new item. For example, you can select a specific image and a specific cluster to limit results to those selections. You can filter on the following items:

    • CVE
    • Image
    • Deployment
    • Namespace
    • Cluster
  3. Optional: Use the CVE severity list to select the severities of the CVEs that you want to display.
  4. Click the relevant button to view a list of vulnerabilities, images, or deployments in the system.

    Note

    The Filtered view icon indicates that the displayed results were filtered based on the criteria that you selected. You can click Clear filters to remove all filters, or remove individual filters by clicking on them.

  5. In the list of results, click a CVE, image name, or deployment name to view more information about the item. For example, depending on the item type, you can view the following information:

    • Whether a CVE is fixable
    • Whether an image is active
    • The Dockerfile line in the image that contains the CVE
    • External links to information about the CVE in Red Hat and other CVE databases

Search example

The following graphic shows an example of search criteria for a cluster called "production" to view CVEs of critical and important severity in that cluster.

Workload CVE showing a search on the production cluster for CVEs with critical and important severity
12.1.1.2.1. Viewing infrastructure vulnerabilities

You can view vulnerabilities in nodes by using Red Hat Advanced Cluster Security for Kubernetes.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. On the Dashboard view header, select Application & Infrastructure Cluster.
  3. From the list of clusters, select the cluster you want to investigate.
  4. Review the clusters vulnerabilities and prioritize taking action on the impacted nodes on the cluster.
12.1.1.2.2. Viewing node vulnerabilities

You can view vulnerabilities in specific nodes by using Red Hat Advanced Cluster Security for Kubernetes.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. On the Dashboard view header, select Nodes.
  3. From the list of nodes, select the node you want to investigate.
  4. Review vulnerabilities for the selected node and prioritize taking action.
  5. To get more information about the affected components in a node, select Components from Related entities on the right.

12.1.1.3. Prioritizing the vulnerabilities

Answer the following questions to prioritize the vulnerabilities in your environment for action and investigation:

  • How important is an affected asset for your organization?
  • How severe does a vulnerability need to be for investigation?
  • Can the vulnerability be fixed by a patch for the affected software component?
  • Does the existence of the vulnerability violate any of your organization’s security policies?

The answers to these questions help security and development teams decide if they want to gauge the exposure of a vulnerability.

Red Hat Advanced Cluster Security for Kubernetes provides you the means to facilitate the prioritization of the vulnerabilities in your applications and components.

12.1.1.4. Assessing the exposure

To assess your exposure to a vulnerability, answer the following questions:

  • Is your application impacted by a vulnerability?
  • Is the vulnerability mitigated by some other factor?
  • Are there any known threats that could lead to the exploitation of this vulnerability?
  • Are you using the software package which has the vulnerability?
  • Is spending time on a specific vulnerability and the software package worth it?

Take some of the following actions based on your assessment:

  • Consider marking the vulnerability as a false positive if you determine that there is no exposure or that the vulnerability does not apply in your environment.
  • Consider if you would prefer to remediate, mitigate or accept the risk if you are exposed.
  • Consider if you want to remove or change the software package to reduce your attack surface.

12.1.1.5. Taking action

Once you have decided to take action on a vulnerability, you can take one of the following actions:

  • Remediate the vulnerability
  • Mitigate and accept the risk
  • Accept the risk
  • Mark the vulnerability as a false positive

You can remediate vulnerabilities by performing one of the following actions:

  • Remove a software package
  • Update a software package to a non-vulnerable version.
12.1.1.5.1. Finding a new component version

The following procedure finds a new component version to upgrade to.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. On the Dashboard view header, select Images.
  3. From the list of images, select the image you already assessed.
  4. Under the Image findings section, select the CVE.
  5. Select the Affected components of the CVE you want to take action on.
  6. Review the version of the component that the CVE is fixed in and update your image.

12.1.1.6. Accepting risks

Follow the instructions in this section to accept the risks in Red Hat Advanced Cluster Security for Kubernetes.

Prerequisites

  • You must have write permission for the VulnerabilityManagementRequests resource.

To accept risk with or without mitigation:

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. On the Dashboard view header, select Images.
  3. From the list of images, select the image you already assessed.
  4. Find the row which lists the CVE you would like to take action on.
  5. Click kebab on the right for the CVE you identified and click Defer CVE.
  6. Select the date and time till you want to defer the CVE.
  7. Select if you want to defer the CVE for the selected image tag or all tags for this image.
  8. Enter the reason for the deferral.
  9. Click Request approval. Select the blue information icon on the right of the CVE and copy the approval link to share with your organization’s deferral approver.
12.1.1.6.1. Marking vulnerabilities as false positive

The following procedure marks a vulnerability as a false positive.

Prerequisites

  • You must have the write permission for the VulnerabilityManagementRequests resource.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. On the Dashboard view header, select Images.
  3. From the list of images, select the image you already assessed.
  4. Find the row which lists the CVE you would like to take action on.
  5. Click the kebab on the right for the CVE you identified and click Defer CVE.
  6. Select the date and time you want to defer the CVE.
  7. Select if you want to defer the CVE for the selected image tag or all tags for this image.
  8. Enter the reason for the deferral.
  9. Click Request approval.
  10. Select the blue information icon on the right of the CVE and copy the approval link to share with your organization’s deferral approver.
12.1.1.6.2. Reviewing a false positive or deferred CVE

Use the following procedure to review a false positive or deferred CVE.

Prerequisites

  • You must have the write permission for the VulnerabilityManagementApprovals resource.

You can review a false positive or defered CVE:

Procedure

  1. Open the approval link in your browser or in the RHACS portal.
  2. Navigate to Vulnerability Management Risk Acceptance and search for the CVE.
  3. Review the vulnerabilities scope and action to decide if you would like to approve it.
  4. Click on the kebab at the far right of the CVE and approve or deny the request for approval.

12.1.1.7. Reporting vulnerabilities to teams

As organizations must constantly reassess and report on their vulnerabilities, some organizations find it helpful to have scheduled communications to key stakeholders to help in the vulnerability management process.

You can use Red Hat Advanced Cluster Security for Kubernetes to schedule these reoccurring communications through e-mail. These communications should be scoped to the most relevant information that the key stakeholders need.

For sending these communications, you must consider the following questions:

  • What schedule would have the most impact when communicating with the stakeholders?
  • Who is the audience?
  • Should you only send specific severity vulnerabilities in your report?
  • Should you only send fixable vulnerabilities in your report?
12.1.1.7.1. Scheduling vulnerability management reports

The following procedure creates a scheduled vulnerability report.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Reporting.
  2. Click Create report.
  3. Enter a name for your report in the Report name field.
  4. Select a weekly or monthly cadence for your report from the Repeat report…​ drop-down list.
  5. Select the days of the week for the report from the On…​ drop-down list.
  6. Optional: Enter text describing the report in the Description field.
  7. In the CVE fixability type field, select the common vulnerabilities and exposure (CVE) fixability types that you want to include in the report.
  8. In the Show vulnerabilities drop-down list, select whether you want to show all vulnerabilities or show only vulnerabilities discovered since the last successful report.
  9. In the CVE severities drop-down list, select the severities of the CVEs that should be included in the report.
  10. In the Configure report scope field, select an existing collection, or click Create collection to create a new one. Entering text in the field searches for collections matching that text string. For more information about collections, see "Creating deployment collections" in the Additional resources section.

    Note

    Collections replaced report scopes in RHACS release 3.74. Existing report scopes have been migrated to collections. See "Migration of access scopes to collections" in the Additional resources section for more information.

  11. Select an existing notifier or create a new email notifier to send your report by email. For more information on creating an email notifier, see "Configuring the email plugin" in the Additional resources section.
  12. Enter email addresses of report recipients in the Distribution list field.
  13. Select Create to create and schedule the report.
12.1.1.7.2. Sending a vulnerability report

The following procedure sends a vulnerability report.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Reporting.
  2. From the list of reports, select the report.
  3. Select the kebab on the right of the report and click Run report now.
12.1.1.7.3. Editing a vulnerability report

The following procedure edits a vulnerability report.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Reporting.
  2. From the list of reports, select the report.
  3. Select the kebab on the right of the report and click Edit.
  4. Modify the report as required.
  5. Click Save.
12.1.1.7.4. Deleting a vulnerability report

The following procedure deletes a vulnerability report.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Reporting.
  2. From the list of reports, select the report.
  3. Select the kebab on the right of the report and click Delete report.

12.2. Common vulnerability management tasks

Common vulnerability management tasks involve identifying and prioritizing vulnerabilities, remedying them, and monitoring for new threats. Following are some common tasks you can perform from the Vulnerability Management Dashboard view.

12.2.1. Finding critical CVEs impacting your infrastructure

Use the Vulnerability Management view for identifying CVEs that are impacting your platform the most.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. Select CVEs on the Vulnerability Management view header.
  3. In the CVEs view, select the Env Impact column header to arrange the CVEs in descending order (highest first) based on the environment impact.

12.2.2. Finding the most vulnerable image components

Use the Vulnerability Management view for identifying highly vulnerable image components.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. From the Vulnerability Management view header, select Application & Infrastructure Components.
  3. In the Components view, select the CVEs column header to arrange the components in descending order (highest first) based on the CVEs count.

12.2.3. Identifying the container image layer that introduces vulnerabilities

Use the Vulnerability Management view to identify vulnerable components and the image layer they appear in.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. Select an image from either the Top Riskiest Images widget or click the Images button at the top of the Dashboard and select an image.
  3. In the Image details view, next to Dockerfile, select the expand icon to see a summary of image components.
  4. Select the expand icon for specific components to get more details about the CVEs affecting the selected component.

You can also view this information by navigating to Vulnerability Management (2.0) Workload CVEs. See "Viewing workload CVEs in Vulnerability Management (2.0)" in the "Additional Resources" section for more information.

12.2.4. Viewing details only for fixable CVEs

Use the Vulnerability Management view to filter and show only the fixable CVEs.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. From the Vulnerability Management view header, select Filter CVEs Fixable.

12.2.5. Identifying the operating system of the base image

Use the Vulnerability Management view to identify the operating system of the base image.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. From the Vulnerability Management view header, select Images.
  3. View the base operating system (OS) and OS version for all images under the Image OS column.
  4. Select an image to view its details. The base operating system is also available under the Image Summary Details and Metadata section.
Note

Red Hat Advanced Cluster Security for Kubernetes lists the Image OS as unknown when either:

  • The operating system information is not available, or
  • If the image scanner in use does not provide this information.

Docker Trusted Registry, Google Container Registry, and Anchore do not provide this information.

You can also view this information by navigating to Vulnerability Management (2.0) Workload CVEs. See "Viewing workload CVEs in Vulnerability Management (2.0)" in the "Additional Resources" section for more information.

12.2.6. Identifying top risky objects

Use the Vulnerability Management view for identifying the top risky objects in your environment. The Top Risky widget displays information about the top risky images, deployments, clusters, and namespaces in your environment. The risk is determined based on the number of vulnerabilities and their CVSS scores.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. Select the Top Risky widget header to choose between riskiest images, deployments, clusters, and namespaces.

    The small circles on the chart represent the chosen object (image, deployment, cluster, namespace). Hover over the circles to see an overview of the object they represent. And select a circle to view detailed information about the selected object, its related entities, and the connections between them.

    For example, if you are viewing Top Risky Deployments by CVE Count and CVSS score, each circle on the chart represents a deployment.

    • When you hover over a deployment, you see an overview of the deployment, which includes deployment name, name of the cluster and namespace, severity, risk priority, CVSS, and CVE count (including fixable).
    • When you select a deployment, the Deployment view opens for the selected deployment. The Deployment view shows in-depth details of the deployment and includes information about policy violations, common vulnerabilities, CVEs, and riskiest images for that deployment.
  3. Select View All on the widget header to view all objects of the chosen type. For example, if you chose Top Risky Deployments by CVE Count and CVSS score, you can select View All to view detailed information about all deployments in your infrastructure.

12.2.7. Identifying top riskiest images and components

Similar to the Top Risky, the Top Riskiest widget lists the names of the top riskiest images and components. This widget also includes the total number of CVEs and the number of fixable CVEs in the listed images.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. Select the Top Riskiest Images widget header to choose between the riskiest images and components. If you are viewing Top Riskiest Images:

    • When you hover over an image in the list, you see an overview of the image, which includes image name, scan time, and the number of CVEs along with severity (critical, high, medium, and low).
    • When you select an image, the Image view opens for the selected image. The Image view shows in-depth details of the image and includes information about CVEs by CVSS score, top riskiest components, fixable CVEs, and Dockerfile for the image.
  3. Select View All on the widget header to view all objects of the chosen type. For example, if you chose Top Riskiest Components, you can select View All to view detailed information about all components in your infrastructure.

12.2.8. Viewing the Dockerfile for an image

Use the Vulnerability Management view to find the root cause of vulnerabilities in an image. You can view the Dockerfile and find exactly which command in the Dockerfile introduced the vulnerabilities and all components that are associated with that single command.

The Dockerfile section shows information about:

  • All the layers in the Dockerfile
  • The instructions and their value for each layer
  • The components included in each layer
  • The number of CVEs in components for each layer

When there are components introduced by a specific layer, you can select the expand icon to see a summary of its components. If there are any CVEs in those components, you can select the expand icon for an individual component to get more details about the CVEs affecting that component.

Procedure

  1. Navigate to the RHACS portal and click Vulnerability Management from the navigation menu.
  2. Select an image from either the Top Riskiest Images widget or click the Images button at the top of the Dashboard and select an image.
  3. In the Image details view, next to Dockerfile, select the expand icon to see a summary of instructions, values, creation date, and components.
  4. Select the expand icon for an individual component to view more information.

You can also view this information by navigating to Vulnerability Management (2.0) Workload CVEs. See "Viewing workload CVEs in Vulnerability Management (2.0)" in the "Additional Resources" section for more information.

12.2.9. Disabling identifying vulnerabilities in nodes

Identifying vulnerabilities in nodes is enabled by default. You can disable it from the RHACS portal.

Procedure

  1. On the RHACS portal, navigate to Platform Configuration Integrations.
  2. Under Image Integrations, select StackRox Scanner.
  3. From the list of scanners, select StackRox Scanner to view its details.
  4. Remove the Node Scanner option from Types.
  5. Select Save.

12.2.10. Scanning inactive images

Red Hat Advanced Cluster Security for Kubernetes (RHACS) scans all active (deployed) images every 4 hours and updates the image scan results to reflect the latest vulnerability definitions.

You can also configure RHACS to scan inactive (not deployed) images automatically.

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management > Dashboard.
  2. On the Dashboard view header, select IMAGES.
  3. Click MANAGE WATCHES to manage the scanning of watched images.
  4. In the MANAGE WATCHED IMAGES dialog, enter the inactive image’s name for which you want to enable scanning.

    Verify that you enter the name of the image and not the image id. Image name is the fully-qualified image name, beginning with the registry and ending with the tag. For example, docker.io/vulnerables/cve-2017-7494:latest.

  5. Select ADD IMAGE. RHACS then scans the image and shows the error or success message.
  6. (Optional) Click REMOVE WATCH to remove an image from the watchlist.

    Important

    On the RHACS portal, click Platform Configuration > System Configuration to view the data retention configuration.

    All the data related to the image removed from the watchlist continues to appear in the RHACS portal for the number of days mentioned on the System Configuration page and is only removed after that period is over.

  7. Select RETURN TO IMAGE LIST to view the IMAGES page.

12.2.11. Creating policies to block specific CVEs

You can create new policies or add specific CVEs to an existing policy from the Vulnerability Management view.

Procedure

  1. Click CVEs from the Vulnerability Management view header.
  2. Select the checkboxes (leftmost column) for one or more CVEs and then click Add selected CVEs to Policy (add icon). Or, move the mouse over a CVE in the list, and select the Add icon on the right side.
  3. For Policy Name:

    • To add the CVE to an existing policy, select an existing policy from the drop-down list box.
    • To create a new policy, enter the name for the new policy, and select Create <policy_name>.
  4. Select a value for Severity, either Critical, High, Medium, or Low.
  5. Choose the Lifecycle Stage to which your policy is applicable, from Build, or Deploy. You can also select both life-cycle stages.
  6. Enter details about the policy in the Description box.
  7. Turn off the Enable Policy toggle if you want to create the policy but enable it later. The Enable Policy toggle is on by default.
  8. Verify the listed CVEs which are included in this policy.
  9. Click Save Policy.

12.2.12. Viewing recently detected vulnerabilities

The Recently Detected Vulnerabilities widget on the Vulnerability Management view shows a list of recently discovered vulnerabilities in your scanned images, based on the scan time and CVSS score. It also includes information about the number of images affected by the CVE and its impact (percentage) on your environment.

  • When you hover over a CVE in the list, you see an overview of the CVE, which includes scan time, CVSS score, description, impact, and whether it’s scored by using CVSS v2 or v3.
  • When you select a CVE, the CVE details view opens for the selected CVE. The CVE details view shows in-depth details of the CVE and the components, images, and deployments and deployments in which it appears.
  • Select View All on the Recently Detected Vulnerabilities widget header to view a list of all the CVEs in your infrastructure. You can also filter the list of CVEs.

12.2.13. Viewing the most common vulnerabilities

The Most Common Vulnerabilities widget on the Vulnerability Management view shows a list of vulnerabilities that affect the largest number of deployments and images arranged by their CVSS score.

  • When you hover over a CVE in the list, you see an overview of the CVE which includes, scan time, CVSS score, description, impact, and whether it is scored by using CVSS v2 or v3.
  • When you select a CVE, the CVE details view opens for the selected CVE. The CVE details view shows in-depth details of the CVE and the components, images, and deployments and deployments in which it appears.
  • Select View All on the Most Common Vulnerabilities widget header to view a list of all the CVEs in your infrastructure. You can also filter the list of CVEs. To export the CVEs as a CSV file, select Export Download CVES as CSV.

12.2.14. Identifying deployments with most severe policy violations

The Deployments with most severe policy violations widget on the Vulnerability Management view shows a list of deployments and severity of vulnerabilities affecting that deployment.

  • When you hover over a deployment in the list, you see an overview of the deployment, which includes the deployment name, the name of the cluster and the namespace in which the deployment exists, and the number of failing policies and their severity.
  • When you select a deployment, the Deployment view opens for the selected deployment. The Deployment view shows in-depth details of the deployment and includes information about policy violations, common vulnerabilities, CVEs, and riskiest images for that deployment.
  • Select View All on the Most Common Vulnerabilities widget header to view a list of all the CVEs in your infrastructure. You can also filter the list of CVEs. To export the CVEs as a CSV file, select Export Download CVES as CSV.

12.2.15. Finding clusters with most Kubernetes and Istio vulnerabilities

Use the Vulnerability Management view for identifying the clusters with most Kubernetes and Istio vulnerabilities in your environment.

The Clusters with most K8S & Istio Vulnerabilities widget shows a list of clusters, ranked by the number of Kubernetes and Istio vulnerabilities in each cluster. The cluster on top of the list is the cluster with the highest number of vulnerabilities.

Procedure

  1. Click on one of the clusters from the list to view details about the cluster. The Cluster view includes:

    • Cluster Details section, which shows cluster details and metadata, top risky objects (deployments, namespaces, and images), recently detected vulnerabilities, riskiest images, and deployments with the most severe policy violations.
    • Cluster Findings section, which includes a list of failing policies and list of fixable CVEs.
    • Related Entities section, which shows the number of namespaces, deployments, policies, images, components, and CVEs the cluster contains. You can select these entities to view more details.
  2. Click View All on the widget header to view the list of all clusters.

12.2.16. Identifying vulnerabilities in nodes

You can use the Vulnerability Management view to identify vulnerabilities in your nodes. The identified vulnerabilities include vulnerabilities in:

  • Core Kubernetes components.
  • Container runtimes (Docker, CRI-O, runC, and containerd).

    Note
    • Red Hat Advanced Cluster Security for Kubernetes can identify vulnerabilities in the following operating systems:

      • Amazon Linux 2
      • CentOS
      • Debian
      • Garden Linux (Debian 11)
      • Red Hat Enterprise Linux CoreOS (RHCOS)
      • Red Hat Enterprise Linux (RHEL)
      • Ubuntu (AWS, Microsoft Azure, GCP, and GKE specific versions)

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. Select Nodes on the Dashboard view header to view a list of all the CVEs affecting your nodes.
  3. Select a node from the list to view details of all CVEs affecting that node.

    1. When you select a node, the Node details panel opens for the selected node. The Node view shows in-depth details of the node and includes information about CVEs by CVSS score and fixable CVEs for that node.
    2. Select View All on the CVEs by CVSS score widget header to view a list of all the CVEs in the selected node. You can also filter the list of CVEs.
    3. To export the fixable CVEs as a CSV file, select Export as CSV under the Node Findings section.

12.3. Scanning RHCOS node hosts

For OpenShift Container Platform, Red Hat Enterprise Linux CoreOS (RHCOS) is the only supported operating system for control plane. Whereas, for node hosts, OpenShift Container Platform supports both RHCOS and Red Hat Enterprise Linux (RHEL). With Red Hat Advanced Cluster Security for Kubernetes (RHACS), you can scan RHCOS nodes for vulnerabilities and detect potential security threats.

RHACS scans RHCOS RPMs installed on the node host, as part of the RHCOS installation, for any known vulnerabilities.

First, RHACS analyzes and detects RHCOS components. Then it matches vulnerabilities for identified components by using RHEL and OpenShift 4.X Open Vulnerability and Assessment Language (OVAL) v2 security data streams.

Note
  • If you installed RHACS by using the roxctl CLI, you must manually enable the RHCOS node scanning features. When you use Helm or Operator installation methods on OpenShift Container Platform, this feature is enabled by default.

12.3.1. Enabling RHCOS node scanning

If you use OpenShift Container Platform, you can enable scanning of Red Hat Enterprise Linux CoreOS (RHCOS) nodes for vulnerabilities by using Red Hat Advanced Cluster Security for Kubernetes (RHACS).

Prerequisites

Procedure

  1. Run one of the following commands to update the compliance container.

    • For a default compliance container with metrics disabled, run the following command:

      $ oc -n stackrox patch daemonset/collector -p '{"spec":{"template":{"spec":{"containers":[{"name":"compliance","env":[{"name":"ROX_METRICS_PORT","value":"disabled"},{"name":"ROX_NODE_SCANNING_ENDPOINT","value":"127.0.0.1:8444"},{"name":"ROX_NODE_SCANNING_INTERVAL","value":"4h"},{"name":"ROX_NODE_SCANNING_INTERVAL_DEVIATION","value":"24m"},{"name":"ROX_NODE_SCANNING_MAX_INITIAL_WAIT","value":"5m"},{"name":"ROX_RHCOS_NODE_SCANNING","value":"true"},{"name":"ROX_CALL_NODE_INVENTORY_ENABLED","value":"true"}]}]}}}}'
    • For a compliance container with Prometheus metrics enabled, run the following command:

      $ oc -n stackrox patch daemonset/collector -p '{"spec":{"template":{"spec":{"containers":[{"name":"compliance","env":[{"name":"ROX_METRICS_PORT","value":":9091"},{"name":"ROX_NODE_SCANNING_ENDPOINT","value":"127.0.0.1:8444"},{"name":"ROX_NODE_SCANNING_INTERVAL","value":"4h"},{"name":"ROX_NODE_SCANNING_INTERVAL_DEVIATION","value":"24m"},{"name":"ROX_NODE_SCANNING_MAX_INITIAL_WAIT","value":"5m"},{"name":"ROX_RHCOS_NODE_SCANNING","value":"true"},{"name":"ROX_CALL_NODE_INVENTORY_ENABLED","value":"true"}]}]}}}}'
  2. Update the Collector DaemonSet (DS) by taking the following steps:

    1. Add new volume mounts to Collector DS by running the following command:

      $ oc -n stackrox patch daemonset/collector -p '{"spec":{"template":{"spec":{"volumes":[{"name":"tmp-volume","emptyDir":{}},{"name":"cache-volume","emptyDir":{"sizeLimit":"200Mi"}}]}}}}'
    2. Add the new NodeScanner container by running the following command:

      $ oc -n stackrox patch daemonset/collector -p '{"spec":{"template":{"spec":{"containers":[{"command":["/scanner","--nodeinventory","--config=",""],"env":[{"name":"ROX_NODE_NAME","valueFrom":{"fieldRef":{"apiVersion":"v1","fieldPath":"spec.nodeName"}}},{"name":"ROX_CLAIR_V4_SCANNING","value":"true"},{"name":"ROX_COMPLIANCE_OPERATOR_INTEGRATION","value":"true"},{"name":"ROX_CSV_EXPORT","value":"false"},{"name":"ROX_DECLARATIVE_CONFIGURATION","value":"false"},{"name":"ROX_INTEGRATIONS_AS_CONFIG","value":"false"},{"name":"ROX_NETPOL_FIELDS","value":"true"},{"name":"ROX_NETWORK_DETECTION_BASELINE_SIMULATION","value":"true"},{"name":"ROX_NETWORK_GRAPH_PATTERNFLY","value":"true"},{"name":"ROX_NODE_SCANNING_CACHE_TIME","value":"3h36m"},{"name":"ROX_NODE_SCANNING_INITIAL_BACKOFF","value":"30s"},{"name":"ROX_NODE_SCANNING_MAX_BACKOFF","value":"5m"},{"name":"ROX_PROCESSES_LISTENING_ON_PORT","value":"false"},{"name":"ROX_QUAY_ROBOT_ACCOUNTS","value":"true"},{"name":"ROX_ROXCTL_NETPOL_GENERATE","value":"true"},{"name":"ROX_SOURCED_AUTOGENERATED_INTEGRATIONS","value":"false"},{"name":"ROX_SYSLOG_EXTRA_FIELDS","value":"true"},{"name":"ROX_SYSTEM_HEALTH_PF","value":"false"},{"name":"ROX_VULN_MGMT_WORKLOAD_CVES","value":"false"}],"image":"registry.redhat.io/advanced-cluster-security/rhacs-scanner-slim-rhel8:4.1.5","imagePullPolicy":"IfNotPresent","name":"node-inventory","ports":[{"containerPort":8444,"name":"grpc","protocol":"TCP"}],"volumeMounts":[{"mountPath":"/host","name":"host-root-ro","readOnly":true},{"mountPath":"/tmp/","name":"tmp-volume"},{"mountPath":"/cache","name":"cache-volume"}]}]}}}}'

12.3.2. Analysis and detection

When you use RHACS with OpenShift Container Platform, RHACS creates two coordinating containers for analysis and detection, the Compliance container and the Node-inventory container. The Compliance container was already a part of earlier RHACS versions. However, the Node-inventory container is new with RHACS 4.0 and works only with OpenShift Container Platform cluster nodes.

Upon start-up, the Compliance and Node-inventory containers begin the first inventory scan of Red Hat Enterprise Linux CoreOS (RHCOS) software components within five minutes. Next, the Node-inventory container scans the node’s file system to identify installed RPM packages and report on RHCOS software components. Afterward, inventory scanning occurs at periodic intervals, typically every four hours. You can customize the default interval by configuring the ROX_NODE_SCANNING_INTERVAL environment variable for the Compliance container.

12.3.3. Vulnerability matching

Central services, which include Central and Scanner, perform vulnerability matching. Scanner uses Red Hat’s Open Vulnerability and Assessment Language (OVAL) v2 security data streams to match vulnerabilities on Red Hat Enterprise Linux CoreOS (RHCOS) software components.

Unlike the earlier versions, RHACS 4.0 no longer uses the Kubernetes node metadata to find the kernel and container runtime versions. Instead, it uses the installed RHCOS RPMs to assess that information.

12.3.4. Related environment variables

You can use the following environment variables to configure RHCOS node scanning on RHACS.

Table 12.1. Node-inventory configuration
Environment VariableDescription

ROX_NODE_SCANNING_CACHE_TIME

The time after which a cached inventory is considered outdated. Defaults to 90% of ROX_NODE_SCANNING_INTERVAL that is 3h36m.

ROX_NODE_SCANNING_INITIAL_BACKOFF

The initial time in seconds a node scan will be delayed if a backoff file is found. The default value is 30s.

ROX_NODE_SCANNING_MAX_BACKOFF

The upper limit of backoff. The default value is 5m, being 50% of Kubernetes restart policy stability timer.

Table 12.2. Compliance configuration
Environment VariableDescription

ROX_NODE_SCANNING_INTERVAL

The base value of the interval duration between node scans. The deafult value is 4h.

ROX_NODE_SCANNING_INTERVAL_DEVIATION

The duration of node scans may differ from the base interval time. However, the maximum value is limited by the ROX_NODE_SCANNING_INTERVAL.

ROX_NODE_SCANNING_MAX_INITIAL_WAIT

The maximum wait time before the first node scan, which is randomly generated. You can set this value to 0 to disable the initial node scanning wait time. The default value is 5m.

12.3.5. Identifying vulnerabilities in nodes

You can use the Vulnerability Management view to identify vulnerabilities in your nodes. The identified vulnerabilities include vulnerabilities in:

  • Core Kubernetes components.
  • Container runtimes (Docker, CRI-O, runC, and containerd).

    Note
    • Red Hat Advanced Cluster Security for Kubernetes can identify vulnerabilities in the following operating systems:

      • Amazon Linux 2
      • CentOS
      • Debian
      • Garden Linux (Debian 11)
      • Red Hat Enterprise Linux CoreOS (RHCOS)
      • Red Hat Enterprise Linux (RHEL)
      • Ubuntu (AWS, Microsoft Azure, GCP, and GKE specific versions)

Procedure

  1. On the RHACS portal, navigate to Vulnerability Management Dashboard.
  2. Select Nodes on the Dashboard view header to view a list of all the CVEs affecting your nodes.
  3. Select a node from the list to view details of all CVEs affecting that node.

    1. When you select a node, the Node details panel opens for the selected node. The Node view shows in-depth details of the node and includes information about CVEs by CVSS score and fixable CVEs for that node.
    2. Select View All on the CVEs by CVSS score widget header to view a list of all the CVEs in the selected node. You can also filter the list of CVEs.
    3. To export the fixable CVEs as a CSV file, select Export as CSV under the Node Findings section.
Red Hat logoGithubRedditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

© 2024 Red Hat, Inc.