mirror of
https://github.com/prompt-security/clawsec.git
synced 2026-06-20 17:01:20 +03:00
Remove suppressed matches tracking from state to prevent re-evaluation alerts
This commit is contained in:
@@ -209,14 +209,6 @@ const handler = async (event: HookEvent): Promise<void> => {
|
||||
state.notified_matches[key] = nowIso;
|
||||
}
|
||||
|
||||
// Track suppressed matches in state (so they aren't re-evaluated) but don't alert
|
||||
for (const match of suppressedMatches) {
|
||||
const key = matchKey(match);
|
||||
if (!state.notified_matches[key]) {
|
||||
state.notified_matches[key] = nowIso;
|
||||
}
|
||||
}
|
||||
|
||||
if (unseenMatches.length > 0 && Array.isArray(event.messages)) {
|
||||
event.messages.push(buildAlertMessage(unseenMatches, installRoot));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user