Another option is replacing the code signature of the process with an adhoc signed one. I used console to determine that ,in my case, the code signatures for hpPostProcesing and hpPreProcessing were invalid. I used the following terminal commands to replace the code signatures of each binary and now users are able to print. I have only tested this on macs with issues on HP printers.
sudo codesign -f -s - /Library/Printers/hp/filter/hpPostProcessing.bundle/Contents/MacOS/hpPostProcessing
sudo codesign -f -s - /Library/Printers/hp/filter/hpPreProcessing.filter/Contents/MacOS/hpPreProcessing
We found that the code signing cert was revoked for some of the HP software including frameworks at /Library/Printers/hp/Frameworks
Download the HP Easy Admin app. Then download hp-printer-essentials-S-5_15_8_4.
https://support.hp.com/us-en/drivers/selfservice/hp-laserjet-pro-m404-m405-series/19203833/model/19202535 Scroll down to "Basic Drivers" to get easy admin.
Here are some further resources:
Actually, would this have affected Macs that had Gatekeeper set to "Allow apps downloaded from: Anywhere"?
When running the following command to look at the HP Utility app
spctl --assess --type install --context context:primary-signature -v /Library/Printers/hp/Utilities/HP Utility.app
For problem machines if they are set to only allow apps downloaded from the "App Store" or "App Store and Identified developers" then you will get the following back:
/Library/Printers/hp/Utilities/HP Utility.app: rejected Source=Unnotarized Developer ID
If you run this command on a machine set to "Allow apps downloaded from: Anywhere"
You will get the following back:
/Library/Printers/hp/Utilities/HP Utility.app: accepted override=security disabled
We are getting hit fairly hard with this problem. My solution:
1 Download the hp-printer-essentials-S-5_15_8_4 package (from HP FTP or the HP Easy Admin app).
2 Create a script to remove /Library/Printers/hp directory.
3 Create a new policy:
Payload 1: Run the script to remove HP dir first.
Payload 2: Install new hp-printer-essentials-S-5_15_8_4 pkg second.
4 Run policy once on all Macs at next check-in time OR via a custom trigger for a case-by-case basis: (Example: sudo jamf policy -event remediate-hp)
So far so good here.