Repository navigation
fix(release): make macOS codesign identity configurable via CODEXHOST_MACOS_SIGN_IDENTITY - #1350
Conversation
…_MACOS_SIGN_IDENTITY Ad-hoc signatures bind the TCC designated requirement to the per-build cdhash, so Screen Recording / Full Disk Access and other grants break after every update. Allow the release pipeline to sign every build with the same certificate identity; falls back to ad-hoc when unset. fixes BytePioneer-AI#1349
|
No actionable comments were generated in the recent review. Summary
Merge Risk:
|
|
感谢贡献,已合并到 main! |
Summary
macOS release builds are signed ad-hoc (
codesign --sign -), so the app's designated requirement is the per-build cdhash. Every update therefore invalidates TCC grants (Screen Recording, Full Disk Access, Downloads folder, Media library) and users must re-grant after each release.This PR makes the codesign identity configurable via the
CODEXHOST_MACOS_SIGN_IDENTITYenv var and applies it to every signing step (bundled node, shim, updater, helper app, main binary and the app bundle). When the variable is unset, the behavior is unchanged (ad-hoc signing), so CI and existing workflows need no modification.Setting the variable to a stable certificate (Developer ID, or a fixed self-signed code-signing certificate whose key is stored as a CI secret) keeps the designated requirement stable across versions, so TCC grants persist across updates.
codesign --verify --deep --strictis unchanged and still runs.Related issues
fixes #1349
UI Demo
无 / N/A
Test plan
bash -n scripts/release/macos/package.sh: syntax OK.-identical to the previous literal, and the verify steps after signing are untouched.