Snapshot should restrict network access policy

High Azure General snapshot-network-deny

Applies to

  • Microsoft.Compute/snapshots

What CGPulse checks

A resource passes this rule when networkAccessPolicy must be one of ["AllowPrivate","DenyAll"]. Anything else is reported as a finding with the evaluated property value attached as evidence.

How to fix it

Set network access policy to AllowPrivate or DenyAll to restrict snapshot data access. In Azure Portal: Snapshot > Networking > set Network access policy. See: https://learn.microsoft.com/en-us/azure/virtual-machines/disks-enable-private-links-for-import-export-portal

Careful: Restricting network access may block existing export/copy operations. Ensure private endpoints are configured if using AllowPrivate

CLI

az snapshot update --ids "{id}" --network-access-policy DenyAll

Terraform

resource "azurerm_snapshot" "{name}" {
  name                  = "{name}"
  resource_group_name   = "{rg}"
  location              = var.location
  create_option         = "Copy"
  source_uri            = "<source-disk-id>"
  network_access_policy = "DenyAll"
}

Compliance frameworks

Is your environment compliant with this rule?

CGPulse checks it — and 621 others — against your Azure and AWS accounts with read-only access.

Run a free scan

Related Azure rules

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please reload the page.