Skip to main content

🧠 Google GCE Network has Firewall Rules which allow unrestricted RDP access from the Internet - prod.logic.yaml 🟒

Flags​

Input Type​

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

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:47:40.262660344Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒a4b0e1βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒a4b0e12βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒a4b0e13βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒a4b0e14βœ”οΈ 200βœ”οΈ otherwiseβœ”οΈ null
🟒a4b0e15βœ”οΈ 199βœ”οΈ CA10__Google_GCE_Firewall_Rules__r.has(INCOMPLIANT)βœ”οΈ null
🟒a4b0e16βœ”οΈ 199βœ”οΈ CA10__Google_GCE_Firewall_Rules__r.has(INCOMPLIANT)βœ”οΈ null
🟒a4b0e17βœ”οΈ 199βœ”οΈ CA10__Google_GCE_Firewall_Rules__r.has(INCOMPLIANT)βœ”οΈ null

Generation​

FileMD5
Open/ce/ca/google/vpc/network-rdp-access/policy.yamlEC18218121CF128685D0EC82C62D2401
Open/ce/ca/google/vpc/network-rdp-access/prod.logic.yamlDE9D2BEA2AFF2FF934805443B0DD6010
Open/types/CA10__CaGoogleGceFirewallRule__c/object.extracts.yaml9FBF68B02FAE353C9D9DF7D5F0E36221
Open/ce/ca/google/vpc/network-rdp-access/test-data.jsonA2E94E58E140B832CEAFFFCFD1E35247

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/google/vpc/network-rdp-access/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/vpc/network-rdp-access/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/vpc/network-rdp-access/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/google/vpc/network-rdp-access/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/google/vpc/network-rdp-access/prod.logic.yaml

Content​

Open File

---

inputType: "CA10__CaGoogleGceNetwork__c"
testData:
- file: test-data.json
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Network has GCE Firewall Rules which allow unrestricted RDP access"
remediationMessage: "Modify firewall rule"
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10__Google_GCE_Firewall_Rules__r"
otherwise:
status: "COMPLIANT"
currentStateMessage: "RDP access is restricted from the internet"
relatedLists:
- relationshipName: "CA10__Google_GCE_Firewall_Rules__r"
importExtracts:
- file: /types/CA10__CaGoogleGceFirewallRule__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "This is an ingress security firewall rule."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__direction__c"
right:
TEXT: "INGRESS"
- status: "INAPPLICABLE"
currentStateMessage: "This security firewall rule does not allow unrestricted access."
check:
AND:
args:
- NOT_EQUAL:
left:
EXTRACT: "CA10__sourceRanges__c"
right:
TEXT: "0.0.0.0/0"
- NOT_EQUAL:
left:
EXTRACT: "CA10__sourceRanges__c"
right:
TEXT: "::/0"
- status: "INCOMPLIANT"
currentStateMessage: "Unsecured firewall rule"
remediationMessage: "Modify firewall rule"
check:
GREATER_THAN:
left:
JSON_QUERY_NUMBER:
arg:
EXTRACT: "CA10__allowedProtocolsPortsJson__c"
expression: "length(ports[?((protocol=='all') || (startPort=='null' && endPort=='null') || (protocol=='tcp' && (startPort=='3389' || endPort=='3389' || (startPort<'3389' && endPort>'3389'))))])"
undeterminedIf:
evaluationError: "The JSON query failed."
resultTypeMismatch: "The JSON query did not return number type."
right:
NUMBER: 0.0
otherwise:
status: "COMPLIANT"
currentStateMessage: "Firewall rule set correctly"