π§ Azure Subscription Microsoft Defender For Servers is not set to On - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/subscription/microsoft-defender-for-servers/prod.logic.yaml
- Located in: π Azure Subscription Microsoft Defender For Servers is not set to On π’
Flagsβ
- π’ Logic test success
- π’ Logic with extracts
- π’ Logic with test data
Input Typeβ
Type | API Name | Extracts | Extract Files | Logic Files | |
---|---|---|---|---|---|
π | π Azure Subscription | CA10__CaAzureAccount__c | 13 | 1 | 31 |
Usesβ
Test Results π’β
Generated at: 2025-04-24T23:46:22.920542965Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 199 | βοΈ CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r.has(INCOMPLIANT) | βοΈ null |
π’ | test2 | βοΈ 299 | βοΈ CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r.has(COMPLIANT) | βοΈ null |
π’ | test3 | βοΈ 300 | βοΈ otherwise | βοΈ null |
π’ | test4 | βοΈ 300 | βοΈ otherwise | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/subscription/microsoft-defender-for-servers/policy.yaml | F0811E33B5C6ECC4C3E74A8BF82F630B |
Open | /ce/ca/azure/subscription/microsoft-defender-for-servers/prod.logic.yaml | 210E699C3987A2F6C93FDF92F632F7BD |
Open | /ce/ca/azure/subscription/microsoft-defender-for-servers/test-data.json | 8DD96F2CCBACC5DDB2FF679681C09667 |
Open | /types/CA10Z1__CaAzureDefenderPlan__c/object.extracts.yaml | 5DCAFDE8B3F3B4436C9A1165F58784CB |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/azure/subscription/microsoft-defender-for-servers/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/subscription/microsoft-defender-for-servers/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/subscription/microsoft-defender-for-servers/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/subscription/microsoft-defender-for-servers/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/azure/subscription/microsoft-defender-for-servers/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureAccount__c"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Microsoft Defender for Servers is in Free tier. Consider enabling Standard plan."
remediationMessage: "Consider enabling Defender for Servers Standard plan."
check:
RELATED_LIST_HAS:
relationshipName: "CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r"
status: "INCOMPLIANT"
- status: "COMPLIANT"
currentStateMessage: "Microsoft Defender for Servers Standard tier is enabled."
check:
RELATED_LIST_HAS:
relationshipName: "CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r"
status: "COMPLIANT"
otherwise:
status: "INCOMPLIANT"
currentStateMessage: "Microsoft Defender for Servers is not enabled."
remediationMessage: "Consider enabling Microsoft Defender for Servers Standard plan."
relatedLists:
- relationshipName: "CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r"
importExtracts:
- file: "/types/CA10Z1__CaAzureDefenderPlan__c/object.extracts.yaml"
conditions:
- status: "INAPPLICABLE"
currentStateMessage: "Other pricing configurations."
check:
NOT_EQUAL:
left:
EXTRACT: "CA10Z1__name__c"
right:
TEXT: "VirtualMachines"
- status: "COMPLIANT"
currentStateMessage: "This is a Standard tier."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__pricingTier__c"
right:
TEXT: "Standard"
- status: "INCOMPLIANT"
currentStateMessage: "This is a Free tier."
remediationMessage: "Enable Defender for Servers Standard plan."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__pricingTier__c"
right:
TEXT: "Free"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."