Check ID:
Provider: GCP
Service:
Severity: LOW
Categories:
Resource type:
compute_project_os_login_enabledProvider: GCP
Service:
computeSeverity: LOW
Categories:
identity-accessResource type:
compute.googleapis.com/ProjectWhat this check verifies
Project metadata has OS Login enabled (enable-oslogin), so VM SSH access uses IAM-linked Linux identities instead of static project or instance keys.
Risk
Without OS Login, SSH relies on static metadata keys that are hard to rotate and revoke. Leaked or orphaned keys can retain VM access, enabling unauthorized commands, data exfiltration, and lateral movement-impacting confidentiality and integrity and weakening accountability.Recommendation
Enable OS Login at the project level to centralize SSH through IAM.- Apply least privilege to OS Login roles
- Remove metadata SSH keys
- Enforce MFA and short-lived credentials
- Monitor login activity and add network restrictions for defense in depth
Remediation
- CLI
- Terraform
- Dashboard steps
References
- https://www.trendmicro.com/trendaivisiononecloudriskmanagement/knowledge-base/gcp/ComputeEngine/enable-os-login.html
- https://cloud.google.com/compute/confidential-vm/docs/creating-cvm-instance:https://cloud.google.com/compute/confidential-vm/docs/about-cvm:https://cloud.google.com/confidential-computing:https://cloud.google.com/blog/products/identity-security/introducing-google-cloud-confidential-computing-with-confidential-vms
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_project_os_login_enabled. 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