AWS
VM Scanning reuses the same IAM role you set up in AWS setup; follow the steps below to grant the few extra permissions it needs.The role needs a few write actions (
ec2:CreateSnapshot, ec2:CreateTags, ec2:DeleteSnapshot) beyond the read-only CSPM set. Every read action VM Scanning uses (ec2:Describe*, ebs:GetSnapshotBlock, ebs:ListSnapshotBlocks) is already covered by ReadOnlyAccess / ViewOnlyAccess.If you already attached
ReadOnlyAccess for CSPM, the only new permissions are the three in CodeAntVMScanSnapshot - the CodeAntVMScanRead block is included only so the policy is complete on its own.codeant-vm-scan=true. To scope the write actions to only those resources, replace the CodeAntVMScanSnapshot block above with this tag-conditioned statement:
kms:Decrypt and kms:DescribeKey on the relevant keys so the snapshot blocks can be read. Skip this step if your volumes are unencrypted.
Azure
VM Scanning reuses the same service principal (app registration) you set up in Azure setup; follow the steps below to grant the one extra role it needs.The service principal needs the
Microsoft.Compute/snapshots/* actions, which Reader does not grant. Keep the existing Reader assignment in place — Disk Snapshot Contributor only covers snapshots, and Reader is still needed to read the source disk.- Azure Portal
- Azure CLI
- In the Azure Portal search bar, type Subscriptions and open the subscription you want to scan.
- In the left menu click Access control (IAM).
- Click + Add → Add role assignment.
- On the Role tab, search for
Disk Snapshot Contributor, select it, and click Next. - On the Members tab, click + Select members, search for your CSPM app (e.g.
codeant-cspm), select it, and click Select. - Click Review + assign to commit. Repeat for each subscription you want VM Scanning to cover.
GCP
Agentless VM Scanning is not supported for GCP. It is currently available for AWS and Azure only.