I am currently using Instruments via a bash script to initiate the command-line interface to start up runs of the Automation plug-in.
With 4.2, this worked well en
I tried security unlock-keychain and editing the /etc/authorization file, but neither of those worked.
In the end the only thing that removed that security prompt was what jacekmigacz suggested in a comment, to run "sudo DevToolsSecurity --enable".