DocsRelease signing: macOS, Linux and Windows (#162)
Release signing: macOS, Linux and Windows (#162)
Every package that we publish is signed. A check of stage main builds the binaries on the Linux runners, signs them,
and the release of the landing takes the files (artifacts, see docs/runs.md). No Mac and no password are involved.
Proven on 2026-11-09 with munhq/sealkeep v0.5.2.
What is signed with what
| Platform | Signature | Checked by |
|---|---|---|
| macOS | Developer ID Application: Munmun Solutions SRL (A698GH43QC), hardened runtime, Apple timestamp, notarized by Apple (rcodesign) |
codesign --verify --check-notarization; Gatekeeper accepts a download |
| Linux | cosign signature of each file and of SHA256SUMS (<file>.sigstore.json) |
cosign verify-blob --key cosign.pub --bundle <file>.sigstore.json <file> |
| Windows | the same cosign signature. There is no Authenticode signature (the owner's decision of 2026-11-08: no paid certificate), so SmartScreen warns on a download | the same |
The macOS identifier is com.munhq.<name>. The Keychain trusts a binary by identifier and team, so a signed rebuild does
not ask for the login password again.
The secrets
sealkeep holds them; Vault (mount agent) replicates them; the ExternalSecrets of munhq/k3s-gpu
(charts/desk/templates/apple-signing-secret.yaml, release-signing-secret.yaml) make Kubernetes Secrets; the runner
gets each as DESK_BUILD_SECRET_<ID>, and a check names it in secrets.
sealkeep name (shared/...) |
Build secret id | Check variable |
|---|---|---|
apple-signing/prod/DEVELOPER_ID_P12_BASE64 |
apple_p12 |
APPLE_P12 |
apple-signing/prod/DEVELOPER_ID_P12_PASSWORD |
apple_p12_password |
APPLE_P12_PASSWORD |
apple-signing/prod/ASC_KEY_P8 |
asc_key_p8 |
ASC_KEY_P8 |
apple-signing/prod/ASC_KEY_ID |
asc_key_id |
ASC_KEY_ID |
apple-signing/prod/ASC_ISSUER_ID |
asc_issuer_id |
ASC_ISSUER_ID |
release-signing/prod/COSIGN_PRIVATE_KEY |
cosign_key |
COSIGN_KEY |
release-signing/prod/COSIGN_PASSWORD |
cosign_password |
COSIGN_PASSWORD |
COSIGN_PUBLIC_KEY is public and is released as cosign.pub. The secrets reach only a check on main after a landing.
Any repository of the server that names them can sign as the company: grant a repository a check with these secrets
only after a review. The Vault role desk-github-app reads only agent/data/shared/{apple,release}-signing/prod.
The owner keeps a backup of the certificate, its .p12 and password, the App Store Connect key (munhq-notary, role
Developer, Key ID J5T987256Z) and the cosign key in ~/.config/munsign/ on the owner's Mac, readable only by the owner.
The runner image
docker/base/runner-rust.Dockerfile (image desk-runner-rust-base, pinned by digest in the image desk-runner-rust)
holds the tools, each pinned and checked by its hash:
- rcodesign (apple-codesign) and cargo-zigbuild, from crates.io with
cargo install --locked; - zig 0.13.0 for cargo-zigbuild (zig 0.14.1 breaks the macOS link with an SDKROOT) and zig 0.16.0 for repositories written in zig (codeindex);
- the macOS SDK 15.5 in
/opt/MacOSX.sdkand cosign v3.1.4. Both come from GitHub through the API asset path (api.github.com/repos/<owner>/<repo>/releases/assets/<id>):releases/downloadanswered 504 for hours on 2026-11-08; - the Rust targets for macOS, Linux arm64 and Windows;
- three scripts in
/usr/local/bin(source indocker/base/).
| Script | Use |
|---|---|
macos-release.sh <package> <identifier> <out> |
Rust: build both macOS targets, sign, notarize, verify |
release-build.sh <package> <out> |
Rust: build Linux x86_64 and aarch64 and Windows x86_64, write SHA256SUMS, cosign each file |
release-sign.sh <identifier> <out> |
any build: sign and notarize the files named -darwin or -macos, then SHA256SUMS and cosign for all |
A runner gives a check a clean environment, so the scripts set SDKROOT and the zig path themselves. The scripts link the
macOS binaries with -headerpad_max_install_names; without it rcodesign stops on x86_64 with "insufficient room to write
code signature load command".
Opt in a repository
A Rust repository, as munhq/sealkeep does it (.desk/config.json):
{
"validation": [
{ "name": "release-macos", "command": "macos-release.sh sealkeep com.munhq.sealkeep dist/macos && (cd dist/macos && sha256sum sealkeep-darwin-* > SHA256SUMS-macos)",
"paths": ["Cargo.toml", ".desk/config.json"], "stage": "main", "timeoutMinutes": 60,
"artifacts": ["dist/macos/*"],
"secrets": { "APPLE_P12": "apple_p12", "APPLE_P12_PASSWORD": "apple_p12_password", "ASC_KEY_P8": "asc_key_p8", "ASC_KEY_ID": "asc_key_id", "ASC_ISSUER_ID": "asc_issuer_id" } },
{ "name": "release-linux-windows", "command": "release-build.sh sealkeep dist/release",
"paths": ["Cargo.toml", ".desk/config.json"], "stage": "main", "timeoutMinutes": 60,
"artifacts": ["dist/release/*"],
"secrets": { "COSIGN_KEY": "cosign_key", "COSIGN_PASSWORD": "cosign_password" } }
],
"release": { "versionFile": "Cargo.toml", "tagPrefix": "v" }
}
Two checks that write the same file name clash: the release keeps the first, so give each check its own SHA256SUMS name.
A repository that does not build with cargo builds its files into a folder and ends with release-sign.sh; see
scripts/release-desk.sh of munhq/codeindex (zig 0.16, six targets).
To release: bump the version in every manifest of the repository and land. The check runs when paths match, the
release is recorded after the checks pass, and its files are the artifacts of the checks of release.needs.
Verify a release
desk release view v0.5.2
codesign --verify --check-notarization sealkeep-darwin-arm64
cosign verify-blob --key cosign.pub --bundle sealkeep-linux-x86_64.sigstore.json sealkeep-linux-x86_64
shasum -a 256 -c SHA256SUMS
Renew and rotate
- Certificate (expires 2027-12-07): create a new Developer ID Application certificate at developer.apple.com
(Certificates, +, Developer ID Application) with a new CSR, export the
.p12,sealkeep setthe twoapple-signingvalues, andsealkeep sync --from local --to vault --folder shared/apple-signing. The identifier and the team stay, so Keychain trust survives. Revoke the old one when the new one works. If the key is ever exposed, revoke the certificate at once. - App Store Connect key: create a new team key (Users and Access, Integrations), replace the three values, sync.
- cosign key:
cosign generate-key-pair, replace the threerelease-signingvalues, sync, and publish the newcosign.pub. Older releases stay verifiable with their owncosign.pub. - A new tool version: change the pin and its hash in the Dockerfile, land, pin the new base digest in
.desk/config.json(imagedesk-runner-rust), land again, and wait for the runners to roll out.
Known limits
- Windows binaries carry no Authenticode signature.
- The release lives on desk.
install.shof sealkeep still reads GitHub releases, which get only the tag. - A release belongs to the head of
mainwhen its checks end: a landing that arrives first and does not run the check again makes a release without files. - The macOS App Store is not covered: this is Developer ID signing for downloads outside the store. iOS apps go through
the lane
ios(a Mac with Xcode), see "Publish: an iOS app" indocs/runs.md.