Earlier quoted context omitted.
One should of course verify its integrity BEFORE installing it and letting it replace spctl. The real question is whether the spctl tool displays "Apple" in case of a valid (relative to generic CAs) certificate issued to "Apple". Hopefully that's not the case. Another risk is a specifically designed executable capable of compromising spctl.
On machines with Gatekeeper enabled you won't be able to open the application without it verifying the signature. Devs would have to on purpose remove that protection to run this bad version of Xcode, and after that it is practically game over.
Validating Your Version of Xcode
21–30 of 101 posts
Re: Validating Your Version of Xcode
#22Earlier quoted context omitted.
That'd be fairly difficult under El Capitan as long as the user hasn't disabled rootless (even su/sudo can't modify system files with rootless on). Not sure about the signing part.
Just put a copy elsewhere and surreptitiously edit PATH so that the malicious one gets picked first. No need to delete any files.
Re: Validating Your Version of Xcode
#23Earlier quoted context omitted.
I don't think having Gatekeeper disabled is a very big deal. It's one of the first things I disable on a new Mac. I've never had it stop an actual piece of malware, and it triggers false positives on practically everything. That said, I have no idea why anybody would download XCode from a third party...
> That said, I have no idea why anybody would download XCode from a third party... Easily explainable really. Went to [their favorite search engine], searched for "Xcode download" and clicked the first result which may not be from Apple (or an advertising).
Re: Validating Your Version of Xcode
#24Am I understanding this correctly: the devs who downloaded Xcode from an unknown source disabled gatekeeper to get it to run? That's unbelievably stupid dev behavior, if true.
Is the "right-click and open" trick that disables Gatekeeper for that app generally unknown? Or do people value not being assed to do it more than (potential) security upsides?
Re: Validating Your Version of Xcode
#25Earlier quoted context omitted.
I can't remember if Xcode asks for admin privileges or not when you install it... ...mind you, I guess that doesn't matter. If I unknowingly had a hacked version and it prompted me for my password at install, I would enter it.
It does — it requires root to agree to the XCode license: https://stackoverflow.com/questions/26197347/agreeing-to-the... This seems to even be required to run things like the stock git or gcc, which I've always wondered how that isn't a violation of the GPL.
Re: Validating Your Version of Xcode
#26Am I understanding this correctly: the devs who downloaded Xcode from an unknown source disabled gatekeeper to get it to run? That's unbelievably stupid dev behavior, if true.
Not necessarily - they might have disabled GateKeeper a long time ago and never re-enabled it. I have the same complain with Android's "allow software from third parties" checkbox - it's a little useless because you uncheck it for one specific app you downloaded, but probably leave it unchecked forever more.
Re: Validating Your Version of Xcode
#27Am I understanding this correctly: the devs who downloaded Xcode from an unknown source disabled gatekeeper to get it to run? That's unbelievably stupid dev behavior, if true.
Disabling gatekeeper is not uncommon, and was really common early on as many applications were not signed yet. Downloading Xcode from a third party, now that's stupid.
EDIT: I should mention that I work as an iOS engineer. Gatekeeper has not once impeded my work.
Re: Validating Your Version of Xcode
#28 $ spctl --assess --verbose /Applications/Xcode.app
/Applications/Xcode.app: rejected
source=obsolete resource envelope
I downloaded XCode via the app store, but have disabled gatekeeper (re-enabled it before running this command).