Your spctl command returns "rejected" because --assess defaults to --type=execute, and you need to write --type=install.
Your installer probably includes a pre-install script. If you didn't have one, you wouldn't see the warning during installation.
Topic:
Developer Tools & Services
SubTopic:
General
Tags: