π§ Azure Network Security Group Flow Logs retention period is less than 90 days - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/prod.logic.yaml
- Located in: π Azure Network Security Group Flow Logs retention period is less than 90 days π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Azure Network Security Group | CA10__CaAzureNetworkSecurityGroup__c | 3 | 1 | 5 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:46:32.741504699Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 99 | βοΈ isDisappeared(CA10__disappearanceTime__c) | βοΈ null |
π’ | test2 | βοΈ 199 | βοΈ extract('CA10__flowLogsEnabled__c') == false | βοΈ null |
π’ | test3 | βοΈ 299 | βοΈ extract('CA10__flowLogsRetentionPolicyEnabled__c') == false | βοΈ null |
π’ | test4 | βοΈ 399 | βοΈ extract('CA10__flowLogsRetentionPolicyDays__c') < number(90.0) | βοΈ null |
π’ | test5 | βοΈ 400 | βοΈ otherwise | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/policy.yaml | EB86062686FA1EA3450B44CF9FB5EAA5 |
Open | /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/prod.logic.yaml | 21A6DF7D91F4733A8F806D380D41E54E |
Open | /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/test-data.json | 9060F77EB5BC6C7FDBB8D9FA9BE9A3AE |
Open | /types/CA10__CaAzureNetworkSecurityGroup__c/object.extracts.yaml | EF77C87EFC93F0E147E29C6B1255AD9E |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/azure/virtual-network/security-group-flow-logs-retention-period-over-90-days/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureNetworkSecurityGroup__c"
importExtracts:
- file: /types/CA10__CaAzureNetworkSecurityGroup__c/object.extracts.yaml
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Network Security Group Flow Logs are disabled."
remediationMessage: "Consider enabling Network Security Group Flow Logs."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__flowLogsEnabled__c"
right:
BOOLEAN: false
- status: "INCOMPLIANT"
currentStateMessage: "Network Security Group Flow Logs retention policy is disabled."
remediationMessage: "Consider enabling retention policy for Network Security Group Flow Logs."
check:
IS_EQUAL:
left:
EXTRACT: "CA10__flowLogsRetentionPolicyEnabled__c"
right:
BOOLEAN: false
- status: "INCOMPLIANT"
currentStateMessage: "Network Security Group Flow Logs retention period is less than 90 days."
remediationMessage: "Consider setting the retention period to 'greater then or equal to 90 days'."
check:
LESS_THAN:
left:
EXTRACT: "CA10__flowLogsRetentionPolicyDays__c"
right:
NUMBER: 90.0
otherwise:
status: "COMPLIANT"
currentStateMessage: "Network Security Group Flow Logs are enabled and the retention period is set to 'greater than or equal to 90 days'."