matt_sven I agree, it seems pretty suspicious and like a possible security hole, but it works every time I test it. I've tested on multiple user accounts on the same system with various different permissions and security settings. I tried both with and without admin permission. I also tried with
Allow apps downloaded from both
App Store and
App Store and Identified Developers. All of these produce the same behavior.
My theory on why it works is that the NSTask is inheriting Sketch's environment which means that if the user has given permission for Sketch to open, then any NSTask run from Sketch has those same permissions.
From Apple's documentation:
. . . an NSTask object inherits its environment from the process that launches it.
I can't find any definitive documentation to support my theory, so I'm still weary of widely releasing a plugin that uses NSTask.