Some Apple users with HP printers have reported running into a scary-sounding error claiming that 'Commandtohp.filter Will Damage Your Computer' or other similar errors, such as 'hpPostProcessing.bundle will damage your computer' or 'HpPostScriptPDE.plugin will damage your computer.' As a result, users will not be able to use their printers normally. But are these errors caused by serious malware threats that can cause severe damage to the user's devices? Fortunately, this doesn't appear to be the case.
Apple has been tightening the security of its devices to stop the proliferation of PUPs, (Potentially Unwanted Programs), adware, browser hijackers or malware. The '[App] could damage your computer' is part of these efforts. The automated security system of the macOS is scanning the installed applications continuously and making sure that their digital certificates are legitimate. If any discrepancies are found, users will be warned via these error messages.
In this case, it seems that there was an issue with HP's drivers. To fix the issue, simply download the latest version of the drivers applicable to your particular HP printer model. The 'Commandtohp.filter Will Damage Your Computer' error should be fixed and the printer should now be back to normal.