Inspect a macOS application's signing identity
Build a paste-ready command, then review its compatibility and effects before running it.
codesign -dv --verbose=4 /Applications/Safari.app 2>&1 | head -20read-onlyno known side effects Compatibility
macOSVerified for macOS using zsh, bash syntax.
Operational knowledgereview due 2027-01-20
Requirementscodesigncodesign must be installed and available on PATH.
Version supportcodesign Current supported releasesVerified for macos using zsh, bash syntax; consult compatibility notes for platform-specific differences.
Expected signalsExecutable=/Applications/Safari.app/Contents/MacOS/SafariRepresentative successful output; values vary with the selected target and system state.
Known errorscodesign: command not foundcodesign is missing or is not available on PATH.
Verifycodesign -dv --verbose=4 /Applications/Safari.app 2>&1 | head -20The output matches the expected target and exits without an error.Rollback noteNot required: this command is read-only and does not change system state.
Command breakdown
01codesignCommandRuns the codesign stage of this one-liner.
02-dvOptionConfigures codesign with the -dv option.
03--verbose=4OptionConfigures codesign with the --verbose=4 option.
04/Applications/Safari.appArgumentPasses /Applications/Safari.app to codesign.
052>&1RedirectionRedirects command input, standard output, or error output.
06|PipelinePasses the output on the left to the command on the right.
07headCommandRuns the head stage of this one-liner.
08-20OptionConfigures head with the -20 option.
Example input
codesign -dv --verbose=4 /Applications/Safari.app 2>&1 | head -20
Example output
Executable=/Applications/Safari.app/Contents/MacOS/Safari
Identifier=com.apple.Safari
Format=app bundle with Mach-O universal
Authority=Software Signing
TeamIdentifier=not set
Illustrative output — exact values vary by system and data.
Official sources