Skip to content

Instantly share code, notes, and snippets.

@alloy
Created September 18, 2015 09:35
Show Gist options
  • Save alloy/0960f7cf7cfbec37cc0a to your computer and use it in GitHub Desktop.
Save alloy/0960f7cf7cfbec37cc0a to your computer and use it in GitHub Desktop.
A simple Xcode script build phase to verify that no (malicious) code was added to Xcode.app, including the SDKs it ships with. (Regarding http://researchcenter.paloaltonetworks.com/2015/09/novel-malware-xcodeghost-modifies-xcode-infects-apple-ios-apps-and-hits-app-store/)
if [ "${CONFIGURATION}" == "Release" ]; then
codesign --verify "${DEVELOPER_DIR}/../../" || exit $?
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment