Workflow to remove the quarantine lock from files for macOS.
Developers have a lot of programs that are not notorized, Java web apps like .war files, for example. These are files that I created and know are not malicious, but trying to open them in anything on macOS results in getting a dialog like:
So I decided to write a Quick Action in Automator to make it easy to disable the quarantine lock on any file.
Simply place Remove quarantine lock.workflow in the ~/Library/Services directory.
Right-click on the file in question, then select "Services", then choose "Remove quarantine lock" from the "Quick Actions" menu item. There is no output; the file will now be usable.
The workflow is three steps:
-
Workflow receives the selected file
-
Run AppleScript to get the absolute path of the selected file in standard Unix format. This was taken directly from my GetAbsolutePath workflow.
-
Run a one-line shell script that actually disables the quarantine lock. The command it runs is:
xattr -d com.apple.quarantine $1where
$1is the filename with path from step 2.
