π§ Google GCE Disk for critical VMs is not encrypted with Customer-Supplied Encryption Key (CSEK) - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml
- Located in: π Google GCE Disk for critical VMs is not encrypted with Customer-Supplied Encryption Key (CSEK) π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Google GCE Attached Disk | CA10__CaGoogleGceAttachedDisk__c | 1 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:46:50.237220913Z Open
Result | Id | Condition Index | Condition Text | Runtime 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β
File | MD5 | |
---|---|---|
Open | /ce/ca/google/compute-engine/disk-csek-encryption/policy.yaml | 8FB385D8DF983D0E66482E853B83CF6C |
Open | /ce/ca/google/compute-engine/disk-csek-encryption/prod.logic.yaml | 10F74330B9CFF27836FE31DDF632CBC5 |
Open | /ce/ca/google/compute-engine/disk-csek-encryption/test-data.json | E2B3FEB35107B7099A0B90C6F58FC598 |
Open | /types/CA10__CaGoogleGceDisk__c/object.extracts.yaml | 607B98DD4D0C43210596783883E0C2C3 |
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β
---
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."