Back to Checks
gcp

Compute instance has Confidential Computing enabled

compute_instance_confidential_computing_enabled
Service: computeSeverity: medium
OfficialBuilt-inVerified
Categories:encryption
Resource Type:compute.googleapis.com/Instance

Google Compute Engine VMs configured as Confidential VMs encrypt data in use with hardware-based memory protection and per-instance keys.

This assessment identifies whether Confidential Computing is enabled on each VM instance.

Risk

Absent Confidential Computing, plaintext data in RAM can be exposed via host introspection, hypervisor compromise, or cold-boot/DMA attacks, undermining confidentiality and enabling in-memory tampering that impacts integrity of computations, models, and secrets.

Run this check with Prowler

Run in Prowler Cloud
Run
prowler gcp --checks compute_instance_confidential_computing_enabled

Recommendation

Enable Confidential VMs for workloads processing sensitive data to protect data-in-use. Apply defense in depth: enforce least privilege on administrative access, use disk encryption with CMEK, and require workload attestation/trusted images. If unsupported, isolate or refactor workloads to compatible options.

Remediation

Terraform

resource "google_compute_instance" "<example_resource_name>" {
  name         = "<example_resource_name>"
  machine_type = "n2d-standard-2"  # Supported for Confidential VM
  zone         = "<ZONE>"

  boot_disk {
    initialize_params {
      image = "debian-cloud/debian-12"
    }
  }

  network_interface {}

  # Critical: Enables Confidential Computing on the VM
  confidential_instance_config {
    enable_confidential_compute = true  # Turns on Confidential VM
  }
}

Other

1In Google Cloud Console, go to Compute Engine > VM instances
2Select <instance> and click Stop
3Click Edit
4Under Confidential VM service, check Enable Confidential VM service
5If the option is unavailable, change Machine series to a supported one (e.g., N2D) and select a type
6Click Save, then click Start to power on the instance

Check Code

from prowler.lib.check.models import Check, Check_Report_GCP
from prowler.providers.gcp.services.compute.compute_client import compute_client


class compute_instance_confidential_computing_enabled(Check):
    def execute(self) -> Check_Report_GCP:
        findings = []
        for instance in compute_client.instances:
            report = Check_Report_GCP(metadata=self.metadata(), resource=instance)
            report.status = "PASS"
            report.status_extended = (
                f"VM Instance {instance.name} has Confidential Computing enabled."
            )
            if not instance.confidential_computing:
                report.status = "FAIL"
                report.status_extended = f"VM Instance {instance.name} does not have Confidential Computing enabled."
            findings.append(report)

        return findings