in Azure WAF/Alert - Process Azure FrontDoor Alerts/ProcessAFDAlerts.cs [98:111]
private static async Task HandleAlertFired(ILogger log, AlertInfo alertInfo)
{
// 1. Query the logs for the past 10 minutes
var logs = await GetLogs(log, alertInfo);
if (logs == null)
{
// nothing to do
return;
}
// 2. update the linked waf policy with new rules to mitigate the attack
await UpdateLinkedWafPolicy(alertInfo, log, logs).ConfigureAwait(false);
}