Skip to main content

🧠 Google Cloud SQL Instance External Authorized Networks do not whitelist all public IP addresses - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• Google Cloud SQL InstanceCA10__CaGoogleSqlInstance__c28121

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-05-10T12:05:51.729821579Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒111βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒112βœ”οΈ 199βœ”οΈ extract('CA10__ipv4Enabled__c') != trueβœ”οΈ null
🟒113βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null
🟒114βœ”οΈ 299βœ”οΈ extract('caJsonFrom_authorizedNetworksJson_value__c').contains('0.0.0.0/0')βœ”οΈ null

Generation​

FileMD5
Open/ce/ca/google/sql/sql-instance-public-ip-whitelist/policy.yaml1A370A86A2765933D712FDDFB7C3307A
Open/ce/ca/google/sql/sql-instance-public-ip-whitelist/prod.logic.yaml7A41CDC73AA00343071D1F3E3921AB93
Open/types/CA10__CaGoogleSqlInstance__c/object.extracts.yamlCF5DA82560FA69E6A48E44B5BF123F0B
Open/ce/ca/google/sql/sql-instance-public-ip-whitelist/test-data.json83B5644053D2FF19DEA8A93B72648A72

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/google/sql/sql-instance-public-ip-whitelist/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/google/sql/sql-instance-public-ip-whitelist/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/google/sql/sql-instance-public-ip-whitelist/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/google/sql/sql-instance-public-ip-whitelist/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/google/sql/sql-instance-public-ip-whitelist/prod.logic.yaml

Content​

Open File

---

inputType: "CA10__CaGoogleSqlInstance__c"
testData:
- file: test-data.json
importExtracts:
- file: /types/CA10__CaGoogleSqlInstance__c/object.extracts.yaml
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "Authorized networks apply only to instances with public IPs"
check:
NOT_EQUAL:
left:
EXTRACT: "CA10__ipv4Enabled__c"
right:
BOOLEAN: true
- status: "INCOMPLIANT"
currentStateMessage: "Cloud SQL Database Instance do not implicitly Whitelist all public IP addresses."
remediationMessage: "Update the authorized network list."
check:
CONTAINS:
arg:
EXTRACT: "caJsonFrom_authorizedNetworksJson_value__c"
substring:
TEXT: "0.0.0.0/0"
otherwise:
status: "COMPLIANT"
currentStateMessage: "Cloud SQL database instances are not open to the world."