OS X 10.8, unsigned application: reset open confirmation
You can add it using xattr from a command prompt, for example to indicate it was downloaded by Safari and have it quarantined as such, just do;

xattr -w com.apple.quarantine "0000;4b3a40d0;Safari;|com.apple.Safari" &lt;path to file&gt;;