Closed ClevenL closed 2 years ago
Perhaps cleaner way:
event.add("source.fqdn", value, raise_failure=False)
Perhaps cleaner way:
event.add("source.fqdn", value, raise_failure=False)
But that could possibly hide other errors as well (e.g. other kind of data, wrong parsing, etc.)
So I prefer @ClevenL's solution.
But that could possibly hide other errors as well (e.g. other kind of data, wrong parsing, etc.)
Would it make sense to modify the add
function with logging the error instead of just returning False?
In some Team-Cymru payloads the
optional_information
entry includeshostname:
parameter with an IP address. This is parsed inintelmq.bots.parsers.cymru.parser_cap_program
bot intosource.fqdn
field, which does not allow IP entries.There should be check to filter out IP hostnames, since we already have that data included in
source.ip
field.The fix can be equivalent to PR #2144. Including
FQDN.is_valid
check seems overkill in this case, but I included it in the example below.