Check ID:
Provider: GCP
Service:
Severity: MEDIUM
Categories:
Resource type:
compute_instance_block_project_wide_ssh_keys_disabledProvider: GCP
Service:
computeSeverity: MEDIUM
Categories:
identity-access, secretsResource type:
compute.googleapis.com/InstanceWhat this check verifies
Compute Engine VMs are evaluated for the metadata keyblock-project-ssh-keys set to true, indicating project-wide SSH keys are blocked and only instance-level or OS Login credentials are honored.
Risk
Allowing project-wide SSH keys lets a single compromised key reach many VMs, amplifying blast radius. This endangers confidentiality (data exposure) and integrity (unauthorized changes) and enables lateral movement. Per-instance revocation and accountability are weakened.Recommendation
Setblock-project-ssh-keys=true to prevent shared key inheritance. Prefer OS Login or instance-specific keys, enforce least privilege and separation of duties for metadata changes, use short-lived credentials with rotation, limit direct SSH, and monitor access for anomalies.
Remediation
- CLI
- Terraform
- Dashboard steps
References
- https://cloud.google.com/compute/docs/instances/adding-removing-ssh-keys
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/gcp/ComputeEngine/enable-block-project-wide-ssh-keys.html
Where this check fires
This check runs on every scheduled scan against your GCP account. Findings appear at Cloud Security → Findings filterable byCheck ID = compute_instance_block_project_wide_ssh_keys_disabled. To re-evaluate after a fix, hit Run now on the account’s schedule under Cloud Security → Schedules — the next scan re-checks this control and marks the finding fixed or keeps it persistent.
← Back to GCP checks