Apple - Forcing `open` command to open unsigned app?
Create and add a Gatekeeper label to the app. (‘Approved’ is an arbitrary string.)
spctl --add --label "Approved" /path/to/xyz.app
Approve all apps with the label.
spctl --enable --label "Approved"
This only needs to be done once and adding the same named label to apps in the future automatically enables their access.
Open the app as usual.
open xyz.app
For more information about spctl (SecAssessment system policy security), see the man page.
You could strip the quarantine from the app:
xattr -r -d com.apple.quarantine /path/to/xyz.app
You may want/need to use sudo
for that command, depending on permissions.
Then Gatekeeper isn't involved, at all. Of course, that also means that the signature isn't verified, which removes an important safety feature.