Page 1 of 1

App Translocation (Sierra & High Sierra)

PostPosted: Thu Oct 05, 2017 10:42 am
by matt!
I often fall foul to this security features. It requires apps be manually moved from wherever they have been downloaded in order to not be affected.

But I have Hazel move downloaded apps to /Applications

Could it be that Hazel could set whatever it needs to on moving an app to avoid Translocation?

Thanks

https://lapcatsoftware.com/articles/app ... ation.html

Starting in OS X v10.12, you can no longer provide external code or data alongside your code-signed app in a zip archive or unsigned disk image. An app distributed outside the Mac App Store runs from a randomized path when it is launched and so cannot access such external resources.


If using a disk image to ship an app, users should drag the app from the image to its desired installation location (usually /Applications) before launching it. This also applies to apps installed via ZIP or other archive formats or apps downloaded to the Downloads directory: ask the user to drag the app to /Applications and launch it from there.

This practice avoids an attack where a validly signed app launched from a disk image, ZIP archive, or ISO (CD/DVD) image can load malicious code or content from untrusted locations on the same image or archive. Starting with macOS Sierra, running a newly-downloaded app from a disk image, archive, or the Downloads directory will cause Gatekeeper to isolate that app at a unspecified read-only location in the filesystem. This will prevent the app from accessing code or content using relative paths.

Re: App Translocation (Sierra & High Sierra)

PostPosted: Fri Oct 06, 2017 10:52 am
by Mr_Noodle
I'm not sure what the question is here. What is it you want Hazel to do beyond moving the file?

Re: App Translocation (Sierra & High Sierra)

PostPosted: Sat Oct 07, 2017 7:06 am
by matt!
Clear the quarantine xattr (sorry it was explained only at the link)

Re: App Translocation (Sierra & High Sierra)

PostPosted: Mon Oct 09, 2017 10:56 am
by Mr_Noodle
That would require a script. You can run the xattr command from a shell script to do that.

Re: App Translocation (Sierra & High Sierra)

PostPosted: Mon Oct 09, 2017 5:20 pm
by matt!
Mr_Noodle wrote:That would require a script. You can run the xattr command from a shell script to do that.

Thanks! Have done so:

Run shell script, embedded script, /bin/bash
Code: Select all
xattr -dr com.apple.quarantine "$1"


Cheers