Force allowlist entries to always be severity 'noop'.

This commit is contained in:
Justin Warren 2023-01-14 11:00:21 +11:00
parent 6d4e18bbf6
commit 17e0bdab0b
No known key found for this signature in database
1 changed files with 3 additions and 0 deletions

View File

@ -85,6 +85,9 @@ def sync_blocklists(conf: dict):
for key, alist in allowlists.items(): for key, alist in allowlists.items():
log.debug(f"Processing allows from '{key}'...") log.debug(f"Processing allows from '{key}'...")
for allowed in alist: for allowed in alist:
# Ensure the severity is always 'noop'
# This is to prevent accidentally blocking something you wanted to allow.
allowed.severity = 'noop'
merged[allowed.domain] = allowed merged[allowed.domain] = allowed
log.debug(f"Allowed domain '{allowed.domain}' from allowlist: {allowed}") log.debug(f"Allowed domain '{allowed.domain}' from allowlist: {allowed}")