From 67d7ee62ff21bb0fa49107c1e7d13448fc55cbd9 Mon Sep 17 00:00:00 2001 From: singhgss <146129702+singhgss@users.noreply.github.com> Date: Tue, 9 Jan 2024 15:27:17 -0500 Subject: [PATCH] use single quotes instead of double due to escape issues (#69) --- setup/IaC/modules/gr.workbook | 2 +- .../Modules/ingest-tenantsData/ingest-tenantsData.psm1 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/setup/IaC/modules/gr.workbook b/setup/IaC/modules/gr.workbook index 1a800bbf..c3c3b1ea 100644 --- a/setup/IaC/modules/gr.workbook +++ b/setup/IaC/modules/gr.workbook @@ -559,7 +559,7 @@ "type": 3, "content": { "version": "KqlItem/1.0", - "query": "let itsgcodes=GRITSGControls_CL | where TimeGenerated == toscalar(GRITSGControls_CL | summarize by TimeGenerated | top 2 by TimeGenerated desc | top 1 by TimeGenerated asc | project TimeGenerated);\r\nlet ctrlprefix=\"GUARDRAIL 9\";\r\nGuardrailsCompliance_CL\r\n| where ControlName_s has \"GUARDRAIL 9:\" and ReportTime_s == \"{RunTime}\" and Required_s !=tostring(\"{RequiredYesNo}\")\r\n| where TimeGenerated > ago (24h)\r\n|join kind=leftouter (itsgcodes) on itsgcode_s\r\n| project ['VNet Name']= column_ifexists('VNETName_s', ""), Status=iif(tostring(ComplianceStatus_b)==\"True\", '✔️ ', '❌ '), Comments=Comments_s,[\"ITSG Control\"]=itsgcode_s, Mitigation=gr_geturl(replace_string(ctrlprefix,\" \",\"\"),itsgcode_s)\r\n", + "query": "let itsgcodes=GRITSGControls_CL | where TimeGenerated == toscalar(GRITSGControls_CL | summarize by TimeGenerated | top 2 by TimeGenerated desc | top 1 by TimeGenerated asc | project TimeGenerated);\r\nlet ctrlprefix=\"GUARDRAIL 9\";\r\nGuardrailsCompliance_CL\r\n| where ControlName_s has \"GUARDRAIL 9:\" and ReportTime_s == \"{RunTime}\" and Required_s !=tostring(\"{RequiredYesNo}\")\r\n| where TimeGenerated > ago (24h)\r\n|join kind=leftouter (itsgcodes) on itsgcode_s\r\n| project ['VNet Name']=column_ifexists('VNETName_s', ''), Status=iif(tostring(ComplianceStatus_b)==\"True\", '✔️ ', '❌ '), Comments=Comments_s,[\"ITSG Control\"]=itsgcode_s, Mitigation=gr_geturl(replace_string(ctrlprefix,\" \",\"\"),itsgcode_s)\r\n", "size": 0, "title": "GR 9", "timeContext": { diff --git a/tools/CentralView/Modules/ingest-tenantsData/ingest-tenantsData.psm1 b/tools/CentralView/Modules/ingest-tenantsData/ingest-tenantsData.psm1 index cea49c68..8743e96a 100644 --- a/tools/CentralView/Modules/ingest-tenantsData/ingest-tenantsData.psm1 +++ b/tools/CentralView/Modules/ingest-tenantsData/ingest-tenantsData.psm1 @@ -65,7 +65,7 @@ GuardrailsCompliance_CL | where ControlName_s has ctrlprefix and ReportTime_s == "{0}" | where TimeGenerated > ago (12h) |join kind=inner (itsgcodes) on itsgcode_s - | project Mandatory=Required_s,ControlName_s, ['VNet Name']= column_ifexists('VNETName_s', ""), ItemName=ItemName_s, Status=iif(tostring(ComplianceStatus_b)=="True", 'Compliant', 'Non-Compliant'), ["ITSG Control"]=itsgcode_s, Definition=Definition_s,Mitigation=gr_geturl(replace_string(ctrlprefix," ",""),itsgcode_s) + | project Mandatory=Required_s,ControlName_s, ['VNet Name']= column_ifexists('VNETName_s', ''), ItemName=ItemName_s, Status=iif(tostring(ComplianceStatus_b)=="True", 'Compliant', 'Non-Compliant'), ["ITSG Control"]=itsgcode_s, Definition=Definition_s,Mitigation=gr_geturl(replace_string(ctrlprefix," ",""),itsgcode_s) | summarize Count=count('VNet Name') by Mandatory,ControlName_s, Status, ItemName,['ITSG Control'] "@ [PSCustomObject] $FinalObjectList = New-Object System.Collections.ArrayList