Persistent disk is not encrypted at rest Affecting Compute Engine service in Google
Is your enviroment affected by this misconfiguration?
In a few clicks we can analyze your entire application and see what components are vulnerable in your application, and suggest you quick fixes.
Test your applications- Snyk ID SNYK-CC-00720
- credit Snyk Research Team
Description
Note -- This rule has been disabled. Unencrypted persistent disks pose a risk of data exposure and unauthorized access. It is recommended to enable encryption for persistent disks in Google Compute Engine to protect sensitive data at rest. Encryption ensures that even if the disk is compromised or stolen, the data remains secure. Enabling encryption provides an additional layer of security and helps to mitigate the risk of data breaches.
How to fix?
Configure the disk_encryption_key
block to use one of raw_key
, rsa_encrypted_key
, sha256
, or kms_key_self_link
attributes in a google_compute_disk
resource.
Example Configuration
resource "google_compute_disk" "allow1" {
name = "allow1"
type = "pd-ssd"
zone = "us-central1-a"
disk_encryption_key {
raw_key = "tkaXUnpqnFDAqSdWEFDLANssZZZF4JsqMyUlKP7XViI="
}
}