Overview
GCP Cloud Asset Inventory is a service that provides a historical view of GCP resources and IAM policies through a time-series database. The information recorded includes metadata on Google Cloud resources, metadata on policies set on Google Cloud projects or resources, and runtime information gathered within a Google Cloud resource.
Rationale
The GCP resources and IAM policies captured by GCP Cloud Asset Inventory enable security analysis, resource change tracking, and compliance auditing.
It is recommended GCP Cloud Asset Inventory be enabled for all GCP projects.
Remediation guidance
Remediation
From Console
Enable the Cloud Asset API:
- Go to
API & Services/Libraryby visiting https://console.cloud.google.com/apis/library - Search for
Cloud Asset APIand select the result for Cloud Asset API - Click the
ENABLEbutton.
From Command Line
Enable the Cloud Asset API:
- Enable the Cloud Asset API through the services interface:
gcloud services enable cloudasset.googleapis.com
Default Value
The Cloud Asset Inventory API is disabled by default in each project.
Service-wide remediation
Recommended when many resources are affected: fix the platform baseline first so new resources inherit the secure setting, then remediate the existing flagged resources in batches.
Google Cloud
Use organization or folder policies where available, shared project templates, logs and alerting baselines, and IaC modules so new resources inherit the secure setting.
Operational rollout
- Fix the baseline first at the account, subscription, project, cluster, or tenant scope that owns this control.
- Remediate the currently affected resources in batches, starting with internet-exposed and production assets.
- Re-scan and track approved exceptions with an owner and expiry date.
Query logic
These are the stored checks tied to this control.
Google Cloud Projects Without Asset Inventory
Connectors
Covered asset types
Expected check: eq []
{
projects(
where: { NOT: { enabledServices_INCLUDES: "cloudasset.googleapis.com" } }
) {
...AssetFragment
}
}
Google Cloud