Skip to main content

🧠 [LEGACY] Azure Subscription Microsoft Defender For DNS is not set to On - prod.logic.yaml 🟒

Flags​

Input Type​

TypeAPI NameExtractsExtract FilesLogic Files
πŸ”’πŸ“• Azure SubscriptionCA10__CaAzureAccount__c13131

Uses​

Test Results πŸŸ’β€‹

Generated at: 2025-04-24T23:46:02.874525157Z Open

ResultIdCondition IndexCondition TextRuntime Error
🟒test1βœ”οΈ 199βœ”οΈ CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r.has(INCOMPLIANT)βœ”οΈ null
🟒test4βœ”οΈ 299βœ”οΈ CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r.has(COMPLIANT)βœ”οΈ null
🟒test5βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null
🟒test6βœ”οΈ 300βœ”οΈ otherwiseβœ”οΈ null

Generation​

FileMD5
Open/ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/policy.yaml3A70002D12D942237E6931FF8A71F709
Open/ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/prod.logic.yaml21E22A02759FA8ACEE409C790CAAD026
Open/ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/test-data.json8FD8DB7631AD98B4563C2A25ADA7F969
Open/types/CA10Z1__CaAzureDefenderPlan__c/object.extracts.yaml5DCAFDE8B3F3B4436C9A1165F58784CB

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/prod.logic.yaml

Generate CAPTURE_TEST_DATA script​

java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/azure/subscription/LEGACY-microsoft-defender-for-dns/prod.logic.yaml

Content​

Open File

---
inputType: "CA10__CaAzureAccount__c"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Microsoft Defender for DNS is in Free tier."
remediationMessage: "Consider enabling Defender for DNS Standard plan."
check:
RELATED_LIST_HAS:
relationshipName: "CA10Z1__Azure_SQL_Server_Vulnerability_Assessmnt__r"
status: "INCOMPLIANT"
- status: "COMPLIANT"
currentStateMessage: "Microsoft Defender for DNS 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 DNS is not enabled."
remediationMessage: "Consider enabling Microsoft Defender for DNS 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: "Dns"
- 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 DNS Standard plan."
check:
IS_EQUAL:
left:
EXTRACT: "CA10Z1__pricingTier__c"
right:
TEXT: "Free"
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected values in the fields."