Skip to main content

🧠 Google GCE Disk for critical VMs is not encrypted with Customer-Supplied Encryption Key (CSEK) - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• Google GCE Attached DiskCA10__CaGoogleGceAttachedDisk__c1

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:46:50.237220913Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒111βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒112βœ”οΈ 199βœ”οΈ isEmptyLookup('CA10__gceDisk__r')βœ”οΈ null
🟒113βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null
🟒114βœ”οΈ 299βœ”οΈ extract('CA10__gceDisk__r.CA10__diskEncryptionKeySha256__c').isNotEmpty()βœ”οΈ null

Generation​

FileMD5
Open/ce/ca/google/compute-engine/disk-csek-encryption/policy.yaml8FB385D8DF983D0E66482E853B83CF6C
Open/ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml10F74330B9CFF27836FE31DDF632CBC5
Open/ce/ca/google/compute-engine/disk-csek-encryption/test-data.jsonE2B3FEB35107B7099A0B90C6F58FC598
Open/types/CA10__CaGoogleGceDisk__c/object.extracts.yaml607B98DD4D0C43210596783883E0C2C3

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaGoogleGceAttachedDisk__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaGoogleGceDisk__c/object.extracts.yaml
conditions:
- status: "UNDETERMINED"
currentStateMessage: "Ensure that VM disk is referencing an active GCE disk."
check:
IS_EMPTY_LOOKUP: "CA10__gceDisk__r"
- status: "COMPLIANT"
currentStateMessage: "Encryption type is set to Customer supplied key."
check:
NOT_EMPTY:
arg:
EXTRACT: "CA10__gceDisk__r.CA10__diskEncryptionKeySha256__c"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Encryption type isn't set to Customer supplied key."
remediationMessage: "Currently there is no way to update the encryption of an existing disk. \
Therefore you should create a new disk with Encryption set to Customer supplied key."