Skip to main content

🧠 Azure Subscription Microsoft Defender For Open-Source Relational Databases 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:21.344358297Z Open

ResultIdCondition IndexCondition TextRuntime 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​

FileMD5
Open/ce/ca/azure/subscription/microsoft-defender-for-open-source-relational-databases/policy.yaml9A5700104D7FFF04534987EF4A19821B
Open/ce/ca/azure/subscription/microsoft-defender-for-open-source-relational-databases/prod.logic.yaml9BFBB8D4C2938243548F205251CC4A16
Open/types/CA10Z1__CaAzureDefenderPlan__c/object.extracts.yaml5DCAFDE8B3F3B4436C9A1165F58784CB
Open/ce/ca/azure/subscription/microsoft-defender-for-open-source-relational-databases/test-data.json7573C3D5E25E95E0B7F47221FB89726A

Generate FULL script​

java -jar repo-manager.jar policies generate FULL /ce/ca/azure/subscription/microsoft-defender-for-open-source-relational-databases/prod.logic.yaml

Generate DEBUG script​

java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/subscription/microsoft-defender-for-open-source-relational-databases/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-open-source-relational-databases/prod.logic.yaml

Generate TESTS script​

java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/subscription/microsoft-defender-for-open-source-relational-databases/prod.logic.yaml

Execute tests​

java -jar repo-manager.jar policies test /ce/ca/azure/subscription/microsoft-defender-for-open-source-relational-databases/prod.logic.yaml

Content​

Open File

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