Skip to main content
The permission list below is authoritative — it’s reproduced verbatim from the onboarding module’s main.tf. It is the complete, exact set of read-only permissions the 0Labs scanner role grants. There are zero write/mutate verbs. A security team can diff this directly against the running custom role.

The keyless, broker-based model

0Labs never holds keys. The scanner service account lives in your project; the only trust you grant is roles/iam.serviceAccountTokenCreator for 0Labs’ published broker principal on that scanner SA — i.e. permission to mint a short-lived token as the read-only scanner SA, nothing else. Broker principal (stable, publishable):
serviceAccount:detections-agent@detections-0labs.iam.gserviceaccount.com
Customers grant token-creator to this principal once; 0Labs’ per-environment workers reach your scanner by delegating through it. Revoke anytime by removing that single binding.

Read permissions (all scopes)

These apply to every connector — organization or project scope.
PermissionGroupWhyRead-only
resourcemanager.projects.getResource hierarchyRead the scanned project itself.Read
cloudasset.assets.listResourceCloud Asset InventoryPrimary read API for config across the estate (connector test).Read
cloudasset.assets.searchAllResourcesCloud Asset InventorySearch resource config across the estate.Read
cloudasset.assets.searchAllIamPoliciesCloud Asset InventorySearch IAM policies across the estate.Read
cloudasset.assets.listIamPolicyCloud Asset InventoryList IAM policies via Asset Inventory.Read
storage.buckets.getCloud Storage postureRead bucket config (public-bucket / PAP checks).Read
storage.buckets.listCloud Storage postureEnumerate buckets to scan.Read
storage.buckets.getIamPolicyCloud Storage postureRead bucket IAM (public-access checks).Read
iam.roles.getIAM postureRead a role definition.Read
iam.roles.listIAM postureEnumerate roles.Read
iam.serviceAccounts.getIAM postureRead a service account.Read
iam.serviceAccounts.listIAM postureEnumerate service accounts.Read
iam.serviceAccounts.getIamPolicyIAM postureRead primitive roles on SAs.Read
iam.serviceAccountKeys.getIAM postureRead a service-account key’s metadata.Read
iam.serviceAccountKeys.listIAM postureFind USER_MANAGED keys (a high-signal finding).Read
resourcemanager.projects.getIamPolicyIAM postureRead the project IAM policy.Read
compute.firewalls.getNetwork postureRead a firewall rule (open-firewall checks).Read
compute.firewalls.listNetwork postureEnumerate firewall rules.Read
compute.networks.getNetwork postureRead a network.Read
compute.networks.listNetwork postureEnumerate networks.Read
logging.logEntries.listCloud LoggingRead log entries (connector test + audit-config visibility).Read
logging.logs.listCloud LoggingEnumerate logs.Read
logging.logServiceIndexes.listCloud LoggingList log service indexes.Read

Organization-scope extras

When you onboard at organization scope, the role additionally includes resource-hierarchy enumeration so 0Labs can discover all current and future projects to scan. These are added only for org scope — GCP rejects folder/org-level permissions inside a project-level custom role.
PermissionGroupWhyRead-only
resourcemanager.projects.listResource hierarchy (org)Enumerate projects in the org.Read
resourcemanager.folders.getResource hierarchy (org)Read a folder.Read
resourcemanager.folders.listResource hierarchy (org)Enumerate folders.Read
resourcemanager.organizations.getResource hierarchy (org)Read the organization node.Read

The standalone security-reviewer reference

If a security reviewer wants the canonical source rather than this table, the list is curated and least-privilege in the module itself:
  • File: main.tf in terraform-google-zerolabs-connector
  • Locals: read_permissions (all scopes) and org_only_permissions (org scope only)
  • Custom role title: Agent0 Read-Only Scanner
The custom role description states it plainly: “Read-only config/IAM access for 0Labs posture scanning. No write permissions.”