Container Image Vulnerability Management: Registry Scanning and Runtime Risk
Container Image Vulnerability Scanning (via MDC)
Section titled “Container Image Vulnerability Scanning (via MDC)”Microsoft Defender for Cloud (MDC) is a security service on Azure that protects workloads, including the resources provisioned on Azure. Because we didn’t have full control over Defender and other security-related services in this project, we used it in a limited capacity.
Microsoft Defender for Cloud plans
Section titled “Microsoft Defender for Cloud plans”| Category | Plan | Cost (as of April 2025, USD) |
|---|---|---|
| CSPM (Cloud Security Posture Management) | Foundational CSPM | - |
| Defender CSPM | $5/billable resource/month | |
| CWP (Cloud Workload Protection) | Server (Plan 2) | $15/server/month |
| App Service | $15/instance/month | |
| Databases (Azure SQL, SQL on VM, OSS RDB, Cosmos DB) | $15/server/month, varies by service | |
| Storage | $10/storage account/month, $0.15/GB (malware scanning) | |
| Containers | $6.8693/vCore/month, 20 free digest scans per vCore, $0.29 per additional scan | |
| Key Vault | $0.25/vault/month | |
| Resource Manager | $5/subscription/month |
These are public list prices as of April 2025 when this post was written; they vary by region, currency, and agreement and may have changed since. For cost planning, check current prices on the Microsoft Defender for Cloud pricing page.
Containers plan options
Section titled “Containers plan options”| Option | Description | Notes |
|---|---|---|
| Agentless scanning for machines | Checks compute resources for vulnerabilities, installed software, and secrets without an agent | Included by default |
| Defender sensor | An agent deployed on compute resources performs threat detection/protection | Optional, based on worker-node vulnerability management requirements |
| Azure Policy | An agent deployed into the Kubernetes cluster performs threat detection/protection | Choose after comparing against a K8s Policy approach |
| K8s API access | Audits Kubernetes API access history for threat detection | Included by default |
| Registry access | Vulnerability scanning for ACR | Included by default |
The Defender for Containers architecture for AKS looks like this:

Registry access (image scanning in detail)
Section titled “Registry access (image scanning in detail)”Scanning of registered images kicks in a few hours after an image is pushed/imported into the registry. As new vulnerabilities are published, the audit reruns automatically, on a daily cadence.
Enabling this via the Azure Portal is as simple as going into Defender for Cloud and turning on Registry Access among the available features.

Scan results can be viewed per registry, and drilling into the details shows vulnerabilities at the image level.

Example: Grafana dashboard
Section titled “Example: Grafana dashboard”Using the Azure Monitor data source, we built a dedicated Grafana dashboard for monitoring:

It queries Azure Resource Graph data through the Azure Monitor data source Grafana provides.
securityresources | where type == "microsoft.security/assessments/subassessments" | where id startswith "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/rg-az01-svc-platform-01/providers/microsoft.containerregistry/registries" | where tostring(properties.id) != "" | extend severity=(// SubassessmentsQueryBuilder.columnDefinitions.severity iff(type == "microsoft.security/assessments/subassessments", tostring(properties.status.severity), dynamic(null))) | extend severitySort = iff(severity == "Critical", 4, iff (severity == "High", 3, iff(severity == "Medium", 2, iff(severity == "Low", 1, 0)))) | extend assessmentKey=(// SubassessmentsQueryBuilder.columnDefinitions.assessmentKey iff(type == "microsoft.security/assessments/subassessments", tostring(split(tostring(split(id, "/providers/Microsoft.Security/assessments/", 1)[0]), "/", 0)[0]), dynamic(null))), subAssessmentId=(// SubassessmentsQueryBuilder.columnDefinitions.id iff(type == "microsoft.security/assessments/subassessments", id, dynamic(null))) | extend cveNumber=(// SubassessmentsQueryBuilder.columnDefinitions.displayName iff(type == "microsoft.security/assessments/subassessments", tostring(properties.displayName), dynamic(null))), description=(// SubassessmentsQueryBuilder.columnDefinitions.description iff(type == "microsoft.security/assessments/subassessments", tostring(properties.description), dynamic(null))), status=(// SubassessmentsQueryBuilder.columnDefinitions.statusCode iff(type == "microsoft.security/assessments/subassessments", tostring(properties.status.code), dynamic(null))), resourceDetails=(// SubassessmentsQueryBuilder.columnDefinitions.resourceDetails iff(type == "microsoft.security/assessments/subassessments", tostring(properties.resourceDetails), dynamic(null))), cveArray = properties.additionalData.cve, additionalData = properties.additionalData, repositoryName = tostring(properties.additionalData.artifactDetails.repositoryName), fixedPackageVersion = tostring(properties.additionalData.softwareDetails.fixedVersion), packageVersion = tostring(properties.additionalData.softwareDetails.version), packageName = tostring(properties.additionalData.softwareDetails.packageName), lastPushed = tostring(properties.additionalData.artifactDetails.lastPushedToRegistryUTC), registryHost = tostring(properties.additionalData.artifactDetails.registryHost) | project severitySort, resourceDetails, subAssessmentId, cveNumber, description, severity, cveArray, additionalData, repositoryName, fixedPackageVersion, packageVersion, packageName, lastPushed, registryHost | summarize registryHost=any(registryHost), severity=any(severity), fixedPackageVersion=any(fixedPackageVersion), lastPushed=any(lastPushed), cveNumber=any(cveNumber), description=any(description), severitySort=any(severitySort), resourceDetails=any(resourceDetails), additionalData=any(additionalData) by repositoryName, packageName, packageVersion | sort by repositoryName ,severitySort descRegistry scanning identifies findings; remediating a third-party image is a separate workflow. See ModelOps Image Patching and Registry Promotion for Copacetic OS patching, verification gates, and approved deployment references.
Previous / next post
Section titled “Previous / next post”Previous post: Platform Secret Management: From Kubernetes to Key Vault
Next post: SBOM and Container Image Signing: Building an Artifact Chain of Trust