Skip to main content

🧠 Google GCE Instance Block Project-Wide SSH Keys is not 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:52.130788637Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒a4ZVU000001mQPR2A2βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒a4ZVU000001p5iB2AQβœ”οΈ 102βœ”οΈ extract('CA10__metadataJson__c').asJson().isInvalid()βœ”οΈ Expected ',' or ']' after array element in JSON at position 43 (line 1 column 44)
🟒a4Z0e000000Su7DEASβœ”οΈ 199βœ”οΈ extract('caJsonFrom__metadataJson__block_project_ssh_keys_value').contains('true')βœ”οΈ null
🟒a4Z0e000000qAcaEAEβœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/google/compute-engine/instance-project-wide-ssh-key/policy.yaml0C2BB089C54EF7D5A4A13B6896881B08
Open/ce/ca/google/compute-engine/instance-project-wide-ssh-key/prod.logic.yaml0AE6C61371E28672F8471D1B7A4900BC
Open/types/CA10__CaGoogleGceInstance__c/object.extracts.yaml95F28CC49887E4035F2848BC20DC25D1
Open/ce/ca/google/compute-engine/instance-project-wide-ssh-key/test-data.json425D62AD5DC49D343B89C17043BB1BFF

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/google/compute-engine/instance-project-wide-ssh-key/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/compute-engine/instance-project-wide-ssh-key/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/compute-engine/instance-project-wide-ssh-key/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/google/compute-engine/instance-project-wide-ssh-key/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/google/compute-engine/instance-project-wide-ssh-key/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: "Block Project-wide SSH keys is enabled for the VM instance."
check:
CONTAINS:
arg:
EXTRACT: "caJsonFrom__metadataJson__block_project_ssh_keys_value"
substring:
TEXT: "true"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Block Project-wide SSH keys is disabled for the VM instance."
remediationMessage: "It is recommended to use Instance specific SSH key(s) instead of using common/shared project-wide SSH key(s) to access Instances."