Revoke the permission to run an application from an unidentified developer
The permission is actually persisted by removing a specific attribute from the file's metadata. 

You mentioned in comments that you were having this problem with jtool from Homebrew Cask. When you install that program, you'll see the attributes listed by running:

xattr -l /usr/local/bin/jtool 


It will display something like this:

com.apple.quarantine: 0291;5df6a9fa;Homebrew\x20Cask;1E71AF5A-2719-340C-9A49-DDB4D10769BE


You can remove that attribute with the following command:

xattr -d com.apple.quarantine /usr/local/bin/jtool


Now you won't get the prompt.

Add the attribute again to restore the prompt:

xattr -w com.apple.quarantine "0291;5df6a9fa;Homebrew\x20Cask;1E71AF5A-2719-340C-9A49-DDB4D10769BE" /usr/local/bin/jtool


&nbsp;