Skip to main content

🧠 Azure Storage Account Private Endpoints are not used - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• Azure Storage AccountCA10__CaAzureStorageAccount__c23113

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:45:57.700900936Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 99βœ”οΈ isDisappeared(CA10__disappearanceTime__c)βœ”οΈ null
🟒test2βœ”οΈ 199βœ”οΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT)βœ”οΈ null
🟒test3βœ”οΈ 199βœ”οΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 199βœ”οΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT)βœ”οΈ null
🟒test5βœ”οΈ 199βœ”οΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(INCOMPLIANT)βœ”οΈ null
🟒test6βœ”οΈ 299βœ”οΈ CA10Z1__Azure_Private_Endpoint_Connections__r.has(COMPLIANT)βœ”οΈ null
🟒test7βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null
🟒test8βœ”οΈ 400βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/azure/storage/private-endpoints-used-to-access-storage/policy.yaml260D17C999A3F1D871568E551281F367
Open/ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml50F2D5445F1D7CCD01DB114BFF414C12
Open/types/CA10Z1__CaAzurePrivateEndpointConnection__c/object.extracts.yaml5CD7A50D4A2794C12C5D70767988C700
Open/ce/ca/azure/storage/private-endpoints-used-to-access-storage/test-data.json7E25941B11AA563CF4107711FEB1B650

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/azure/storage/private-endpoints-used-to-access-storage/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAzureStorageAccount__c"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "A private endpoint is not used by the Storage Account."
remediationMessage: "Consider creating a private endpoint to limit the\
\ network traffic to approved sources."
check:
RELATED_LIST_HAS:
status: "INCOMPLIANT"
relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
- status: "COMPLIANT"
currentStateMessage: "the Storage Account uses a private endpoint."
check:
RELATED_LIST_HAS:
status: "COMPLIANT"
relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
- status: "UNDETERMINED"
currentStateMessage: "Unable to determine the private endpoint status."
check:
RELATED_LIST_HAS:
status: "UNDETERMINED"
relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "A private endpoint is not used by the Storage Account."
remediationMessage: "Consider creating a private endpoint to limit the\
\ network traffic to approved sources."
relatedLists:
- relationshipName: "CA10Z1__Azure_Private_Endpoint_Connections__r"
recordTypes:
- "privateEndpointOnStorageAccount"
importExtracts:
- file: "/types/CA10Z1__CaAzurePrivateEndpointConnection__c/object.extracts.yaml"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "A private endpoint does not exist."
remediationMessage: "Consider creating a private endpoint."
check:
IS_EMPTY_LOOKUP: "CA10Z1__privateEndpoint__r"
- status: "INCOMPLIANT"
currentStateMessage: "The private link service connection is not approved."
remediationMessage: "Resource owner rejected or removed the connection."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__serviceConnectionStatus__c"
right:
TEXT: "Approved"
- status: "COMPLIANT"
currentStateMessage: "The private link service connection is approved."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__serviceConnectionStatus__c"
right:
TEXT: "Approved"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."