Verifying your that your Xcode does not contain XcodeGhost or other malicious software is easy.

In a terminal, run this command:

codesign -vv /Applications/Xcode.app

This will verify the code signature of the Xcode application. If it fails you should download a new Xcode from the Apple developer website or Mac App Store and reinstall.

Apple has now added Technical QA1900: Validating Your Version of Xcode with more information.