Require that all AppleScript be signed by a trusted developer ID before being executed - this will prevent random AppleScript code from executing . This subjects AppleScript code to the same scrutiny as other .app files passing through Gatekeeper.