From 47e8cdc70c630a45d8fed2288adc9aad434ab3fb Mon Sep 17 00:00:00 2001 From: Jannik Hollenbach Date: Thu, 1 Jul 2021 14:57:05 +0200 Subject: [PATCH] Use filtered findings for check instead of the original --- hooks/notification-hook/hook.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hooks/notification-hook/hook.ts b/hooks/notification-hook/hook.ts index 10ed27ed30..ae3f495cb3 100644 --- a/hooks/notification-hook/hook.ts +++ b/hooks/notification-hook/hook.ts @@ -20,7 +20,7 @@ export async function handle({ getFindings, scan }) { channel.endPoint = mapToEndPoint(channel.endPoint); const findingsToNotify = findings.filter(finding => matches(finding, channel.rules)); - if (channel.skipNotificationOnZeroFindings === true && findings.length === 0) { + if (channel.skipNotificationOnZeroFindings === true && findingsToNotify.length === 0) { continue; }