I also had to change the AS numbers to strings (i.e. '3215' instead of 3215`):
name: zz-whitelist-AS
description: Whitelist some AS
debug: true
whitelist:
reason: Whitelisted AS
expression:
- evt.Overflow.Alert.Source.AsNumber in ['3215', '15557', '12322', '5410']
Just wanted to thank you both for the notes and wanted to share that while I was able to make a version like this for ‘postoverflows’, it wasn’t until I made a ‘parsers’ detail that I saw explain show a ‘whitelisted’ response.
Suggested file name: /etc/crowdsec/parsers/s02-enrich/zz-whitelist.yml
File contents (ASN numbers are fake - verify what you use!):