Uredi

Build Cloud Security Explorer queries for container vulnerabilities

Use Cloud Security Explorer to identify vulnerabilities in registry images and running containers. This article shows you how to build queries that find vulnerable container images in registries and in running Kubernetes workloads, and how to review the results.

For an introduction to Cloud Security Explorer, see Build queries with Cloud Security Explorer.

Create a query to identify vulnerabilities in registry images

Find registry container images that have known vulnerabilities.

  1. Sign in to the Azure portal.

  2. Go to Microsoft Defender for Cloud > Cloud Security Explorer.

  3. In Query builder, select Select resource types.

  4. Select Container Images.

  5. Select Done.

  6. Select +.

  7. Select Select condition.

  8. In Vulnerabilities, select All vulnerabilities.

    Screenshot showing a Cloud Security Explorer query to identify vulnerabilities in container images stored in registries.

  9. Select Search.

  10. Select View details > for a container image.

  11. In Result details, review the affected packages and severity.

  12. Select Open the vulnerability page for more details.

Create a query to identify vulnerabilities in running containers

Find running containers in Kubernetes clusters that have known vulnerabilities.

  1. Sign in to the Azure portal.

  2. Go to Microsoft Defender for Cloud > Cloud Security Explorer.

  3. In Query builder, select Select resource types.

  4. In Containers, select Containers.

  5. Select Done.

  6. Select +.

  7. Select Select condition.

  8. In Application, select Created by.

  9. Select Select resource types.

  10. Select Container Images.

  11. Select +.

  12. Select Select condition.

  13. In Vulnerabilities, select Has vulnerabilities.

    Screenshot showing a Cloud Security Explorer query to identify vulnerabilities in container images used by running containers in Kubernetes clusters.

  14. Select Search.

  15. Select View details > for a container.

  16. In Result details, review the affected images, severity, and related resources.

  17. Select Open the vulnerability page for more details.