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"
Open the app as usual.
open xyz.app
For more information about spctl (SecAssessment system policy security), see the man page.