Skip to main content

🧠 Google GCE Instance is launched without Shielded VM enabled - prod.logic.yaml 🟒

Flags​

Input Type​

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

Uses​

Test Results πŸŸ’β€‹

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

ResultIdCondition IndexCondition TextRuntime Error
🟒a4Z1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒a4Z2βœ”οΈ 199βœ”οΈ extract('CA10__shieldedIntegrityMonitoringState__c').contains('Enabled') && extract('CA10__shieldedVtpmState__c').contains('Enabled')βœ”οΈ null
🟒a4Z3βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/google/compute-engine/instance-shielded-vm/policy.yaml4FBCBABC4060C5AC00CF6825B8B68B32
Open/ce/ca/google/compute-engine/instance-shielded-vm/prod.logic.yamlCA12818601743FF98A7A842ABF50B7EB
Open/types/CA10__CaGoogleGceInstance__c/object.extracts.yaml95F28CC49887E4035F2848BC20DC25D1
Open/ce/ca/google/compute-engine/instance-shielded-vm/test-data.jsonB9068FAC725BA89F12584621475A3BC1

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/google/compute-engine/instance-shielded-vm/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/compute-engine/instance-shielded-vm/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/compute-engine/instance-shielded-vm/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/google/compute-engine/instance-shielded-vm/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/google/compute-engine/instance-shielded-vm/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaGoogleGceInstance__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaGoogleGceInstance__c/object.extracts.yaml
conditions:
- status: "COMPLIANT"
currentStateMessage: "Compute instance is launched with Shielded VM enabled."
check:
AND:
args:
- CONTAINS:
arg:
EXTRACT: "CA10__shieldedIntegrityMonitoringState__c"
substring:
TEXT: "Enabled"
- CONTAINS:
arg:
EXTRACT: "CA10__shieldedVtpmState__c"
substring:
TEXT: "Enabled"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Compute instance is launched without Shielded VM enabled."
remediationMessage: "Update the instance to enable Shielded VM."