{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "workspace": {
      "type": "String"
    }
  },
  "resources": [
    {
      "apiVersion": "2024-01-01-preview",
      "id": "[concat(resourceId('Microsoft.OperationalInsights/workspaces/providers', parameters('workspace'), 'Microsoft.SecurityInsights'),'/alertRules/6116dc19-475a-4148-84b2-efe89c073e27')]",
      "kind": "Scheduled",
      "name": "[concat(parameters('workspace'),'/Microsoft.SecurityInsights/6116dc19-475a-4148-84b2-efe89c073e27')]",
      "properties": {
        "alertRuleTemplateName": "6116dc19-475a-4148-84b2-efe89c073e27",
        "customDetails": null,
        "description": "'This creates an incident when a new high severity vulnerability is detected across multilple hosts'\n",
        "displayName": "New High Severity Vulnerability Detected Across Multiple Hosts",
        "enabled": true,
        "entityMappings": null,
        "OriginalUri": "https://github.com/Azure/Azure-Sentinel/blob/master/Solutions/QualysVM/Analytic%20Rules/NewHighSeverityVulnDetectedAcrossMulitpleHostsV2.yaml",
        "query": "let threshold = 10;\nQualysHostDetection\n| extend Status = tostring(Status), Vulnerability = tostring(QID), Severity = tostring(Severity)\n| where Status =~ \"New\" and Severity == \"5\"\n| summarize StartTime = min(TimeGenerated), EndTime = max(TimeGenerated), dcount(NetBios) by tostring(QID)\n| where dcount_NetBios >= threshold\n| extend timestamp = StartTime\n",
        "queryFrequency": "PT1H",
        "queryPeriod": "PT1H",
        "severity": "Medium",
        "status": "Available",
        "subTechniques": [],
        "suppressionDuration": "PT1H",
        "suppressionEnabled": false,
        "tactics": [
          "InitialAccess"
        ],
        "techniques": [
          "T1190"
        ],
        "templateVersion": "1.0.2",
        "triggerOperator": "GreaterThan",
        "triggerThreshold": 0
      },
      "type": "Microsoft.OperationalInsights/workspaces/providers/alertRules"
    }
  ]
}
