Skip to content

macOS Binary Signing (Developer ID) and .pkg Installer support #2040

@uurazzle

Description

@uurazzle

Hi:

Currently, sops for macOS is distributed as a standalone binary. While functional, it poses challenges for enterprise deployment because it lacks a verifiable Apple Developer Team ID embedded in the code signature.

The Request

We propose two enhancements to your macOS release workflow:

Sign the standalone binary with a Developer ID: Ensure the binary is signed and notarized by Apple so that the command spctl -a -vv /usr/local/bin/sops returns a valid "TeamID" (e.g., TeamID=XXXXXXXXXX).

Provide a standard Apple Installer Package (.pkg): Along with the binary, provide a notarized .pkg. This allows for "Zero-Touch" deployments where MDMs can install the tool without user intervention or "unidentified developer" Gatekeeper warnings.

Why this matters for the Mac Admin community:

Verification (Installomator/AutoPkg): These tools use the Team ID to verify that a download is authentic. Without it, admins must rely on less secure methods (like SHA checksums alone), which do not guarantee the vendor's identity.

Gatekeeper Compatibility: Notarized binaries bypass the "app is from an unidentified developer" prompt, which is critical for developers and automated CI/CD runners on macOS.

Enterprise Deployment: MDMs natively support .pkg files. A signed installer can be deployed to thousands of machines instantly, whereas a raw binary requires custom scripting to move the file and set permissions.

Implementation Overview:

If your team has an Apple Developer Program account, these steps can be integrated into your CI/CD (e.g., GitHub Actions):

For the Binary:

# Sign the binary
codesign --timestamp --options runtime --sign "Developer ID Application: [Your Team Name]" sops
# Notarize (via notarytool)
xcrun notarytool submit sops.zip --team-id [TeamID] --apple-id [AppleID] --password [AppSpecificPassword] --wait

For the Package (.pkg):

# Build and sign the package
pkgbuild --identifier "com.getsops.sops" --version [version] --install-location /usr/local/bin --root ./root sops.pkg
productsign --sign "Developer ID Installer: [Your Team Name]" sops.pkg sops-signed.pkg
# Notarize the .pkg
xcrun notarytool submit sops-signed.pkg ...

Supporting these standards would significantly lower the barrier for security-conscious organizations to adopt and maintain sops across their macOS fleets.

We would be happy to assist with testing or providing more detailed documentation for your CI pipeline if needed.

Thank you for your incredible work on this project.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions