A “antivirus” tends to be a proprietary black box. Such “antivirus” programs could not of detected the XZ backdoor
Prevention and detection
Most of the time, detection also means prevention, but with a whitelisting antivirus, prevention often means that the threat isn’t detected, it was just prevented from running.
A whitelisting application has a list of what it knows it bad AND what it knows in advance to be good.
Anything it can’t identify on the spot is treated as unknown and not allowed to run, not deleted, not quarantined, just blocked from running until the user can upload it to things like virustotal and other services like it to figure out if its safe.
upload it to virustotal, if it wasn’t already known, do a re-scan a few hours later to see if it’s malicious, if it was already known, do a re-scan to see if anything has figured out if its malicious.
which is why I think it’s borderline criminal that most antivirus programs don’t work that way.