codesign

Apple Code Signing Utility

CPU Usage
N/A
Memory
N/A
Location
N/A
Publisher
N/A

Note
Maintain updated certificates and entitlements; avoid signing unsigned binaries, and routinely audit code signing behavior in your build pipelines.
Best Practices
Always sign your own software with codesign using a valid certificate, and verify signatures during CI, builds, and before distribution. Use codesign --verify --deep --strict to confirm all nested components maintain proper trust.

What is codesign?

Codesign is a macOS utility that applies cryptographic signatures to executables and app bundles, binding them to a trusted developer or Apple certificate. It embeds a code signature blob into the binary, enabling the system to verify provenance, detect modifications, and enforce entitlements during execution, distribution, and OS security checks. Proper use ensures trusted software flow from development to deployment, reducing the risk of tampering.

It creates a signed code signature using a developer or Apple certificate, embeds the signature and entitlements into the binary, and allows verification with codesign --verify. The tool integrates with Gatekeeper and the security framework to maintain a trust chain for macOS apps.

Is codesign Safe?

Codesign itself is a legitimate macOS utility designed by Apple to bind binaries to a trusted certificate. When used as intended—signing your own software, validating third‑party apps, and verifying signatures—it enhances system security by making tampering detectable and protecting users from unsigned or modified code. Misuse, such as signing malicious binaries or bypassing entitlements, can undermine trust and lead to security vulnerabilities.

Is codesign a Virus?

Codesign is not a virus. On macOS, it lives at /usr/bin/codesign and is part of the system's code signing and security infrastructure. Some malware may disguise itself with similar names or misuse the concept of signing, so always verify the binary path, digital signature, and publisher before trusting it. If you see unrelated behavior, investigate with system tools.

How to Verify Legitimacy

  1. Check File Location: Confirm the binary exists at /usr/bin/codesign (or /Applications/Xcode.app/.../Contents/Developer/usr/bin/codesign) and that its path matches known macOS locations.
  2. Verify Digital Signature: Run codesign -dvv /usr/bin/codesign to view the signing identity and certificate trust chain presented by the binary.
  3. Check File Hash: Compute a SHA-256 hash with shasum -a 256 /usr/bin/codesign and compare it against the expected Apple distribution hash from Apple’s developer portal when possible.
  4. Scan for Malware: Use a trusted antivirus or XProtect/ Gatekeeper databases to perform a malware scan on the path, and verify there are no suspicious wrappers or alternate binaries.

Red Flags: If codesign appears in an unexpected location, lacks a valid Apple signature, or shows a non‑Apple issuer, that may indicate tampering. Unexpected behavior such as altered signature details, repeated signing without reason, or missing entitlements warrants deeper inspection.

Why is it Running?

Reasons it's running:

Can I Disable or Remove It?

Common Problems

Common Causes & Solutions

Frequently Asked Questions

What is codesign in macOS?

How do I verify that a binary is signed with codesign?

Why would codesign fail to sign an app during build?

Can I disable Gatekeeper or code signing checks for development?

Where is the codesign tool located on macOS and how do I run it?

Related Processes