Sub topic 2
Code Signing and Developer ID
Assume you can use Finder and Terminal, and you know the difference between an app, a disk image (.dmg), and an installer package (.pkg). These checks reduce risk, but no single check proves that software is harmless.
Code signing and Developer ID
Code signing attaches a cryptographic signature to an app. macOS can detect changes made after signing. A Developer ID certificate identifies the developer who signed software distributed outside the Mac App Store.
The signature answers “who signed this, and was it changed?” It does not guarantee that the developer is trustworthy or that the app has no vulnerabilities.
Notarization: Apple’s automated check
Notarization is Apple’s automated scan of software submitted by a developer. A successful result lets Gatekeeper recognize the software as notarized. It is a screening step, not the same as App Store review.
Quarantine, Gatekeeper, and XProtect
When a browser downloads a file, macOS often adds a quarantine attribute. This records that the file came from outside the system and gives Gatekeeper a reason to inspect it.
Gatekeeper checks an app when you first open it, considering its source, signature, notarization, and quarantine status. XProtect provides built-in malware detection and can block or remove known malicious software. These defenses complement each other.
Verify the download yourself
If the developer publishes a SHA-256 checksum, compare it with the downloaded file:
shasum -a 256 ~/Downloads/Example.dmgThe output must exactly match the official value. For an app, inspect its signature and signer:
codesign --verify --deep --strict --verbose=2 /Applications/Example.app
codesign -dv --verbose=4 /Applications/Example.app 2>&1 | grep -E 'Authority|TeamIdentifier'
spctl --assess --type execute --verbose=4 /Applications/Example.app
xcrun stapler validate /Applications/Example.appcodesign checks integrity and identity. spctl asks whether Gatekeeper would allow execution. stapler checks for an attached notarization ticket. For a package installer, inspect its signature before opening it:
pkgutil --check-signature ~/Downloads/Example.pkgExercise
Does a valid Developer ID signature prove that an app is safe?
Show answer
No. It shows the signer and detects later changes, but it does not prove the developer is trustworthy or the app is free of vulnerabilities.