π§ Microsoft Defender For Cloud Integration With Microsoft Defender For Cloud Apps is not enabled - prod.logic.yaml π’
- Contextual name: π§ prod.logic.yaml π’
- ID:
/ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/prod.logic.yaml
- Located in: π Microsoft Defender For Cloud Integration With Microsoft Defender For Cloud Apps is not enabled π’
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:15.453695394Z Open
Result | Id | Condition Index | Condition Text | Runtime Error |
---|---|---|---|---|
π’ | test1 | βοΈ 101 | βοΈ CA10__defenderForCloudSettingsJson__c.delegatedTo(CA10__defenderForCloudSettingsJson__c).isEmpty() | βοΈ null |
π’ | test2 | βοΈ 199 | βοΈ not(extract('caJsonFrom__defenderForCloudSettings__c').jsonQueryText('settings[?name == \'MCAS\'].enabled | [0]')) | βοΈ null |
π’ | test3 | βοΈ 299 | βοΈ extract('caJsonFrom__defenderForCloudSettings__c').jsonQueryText('settings[?name == \'MCAS\'].enabled | [0]') | βοΈ null |
π’ | test4 | βοΈ 199 | βοΈ not(extract('caJsonFrom__defenderForCloudSettings__c').jsonQueryText('settings[?name == \'MCAS\'].enabled | [0]')) | βοΈ null |
π’ | test5 | βοΈ 199 | βοΈ not(extract('caJsonFrom__defenderForCloudSettings__c').jsonQueryText('settings[?name == \'MCAS\'].enabled | [0]')) | βοΈ null |
π’ | test6 | βοΈ 199 | βοΈ not(extract('caJsonFrom__defenderForCloudSettings__c').jsonQueryText('settings[?name == \'MCAS\'].enabled | [0]')) | βοΈ null |
Generationβ
File | MD5 | |
---|---|---|
Open | /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/policy.yaml | AF7D868745C9720D29B496F773DDF67C |
Open | /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/prod.logic.yaml | AC4B204E55582BEE5B6E633CBC94E589 |
Open | /types/CA10__CaAzureAccount__c/object.extracts.yaml | 9C78116D7D6EA5327842D3BC5DCF8980 |
Open | /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/test-data.json | 89F50B7A36A790EB693E002CF2D23B7A |
Generate FULL scriptβ
java -jar repo-manager.jar policies generate FULL /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/prod.logic.yaml
Generate DEBUG scriptβ
java -jar repo-manager.jar policies generate DEBUG /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/prod.logic.yaml
Generate CAPTURE_TEST_DATA scriptβ
java -jar repo-manager.jar policies generate CAPTURE_TEST_DATA /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/prod.logic.yaml
Generate TESTS scriptβ
java -jar repo-manager.jar policies generate TESTS /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/prod.logic.yaml
Execute testsβ
java -jar repo-manager.jar policies test /ce/ca/azure/subscription/integration-with-microsoft-defender-for-cloud-apps/prod.logic.yaml
Contentβ
---
inputType: "CA10__CaAzureAccount__c"
importExtracts:
- file: "/types/CA10__CaAzureAccount__c/object.extracts.yaml"
testData:
- file: "test-data.json"
conditions:
- status: "INCOMPLIANT"
currentStateMessage: "Microsoft Defender for Cloud Apps is not enabled."
remediationMessage: "Consider enabling Microsoft Defender for Cloud Apps."
check:
NOT:
arg:
JSON_QUERY_BOOLEAN:
arg:
EXTRACT: "caJsonFrom__defenderForCloudSettings__c"
expression: "settings[?name == 'MCAS'].enabled | [0]"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return text type."
- status: "COMPLIANT"
currentStateMessage: "Microsoft Defender for Cloud Apps is enabled."
check:
JSON_QUERY_BOOLEAN:
arg:
EXTRACT: "caJsonFrom__defenderForCloudSettings__c"
expression: "settings[?name == 'MCAS'].enabled | [0]"
undeterminedIf:
evaluationError: "The JSON query has failed."
resultTypeMismatch: "The JSON query did not return text type."
otherwise:
status: "UNDETERMINED"
currentStateMessage: "Unexpected value in the field."