ci(setup): add skip-codesign-import lever for adhoc-only recipes#13197
ci(setup): add skip-codesign-import lever for adhoc-only recipes#13197tannevaled wants to merge 1 commit into
skip-codesign-import lever for adhoc-only recipes#13197Conversation
Defense-in-depth follow-up to pkgxdev/brewkit#353. Some recipes ship binaries with entitlements that require either adhoc signing or a Developer ID with a matching provisioning profile (notably `com.apple.security.virtualization` and `com.apple.security.hypervisor`). brewkit#353 already handles the binary side correctly -- it sees these entitlements in the Mach-O and forces adhoc signing in fix-machos.rb, regardless of what signing identity the workflow imported. This change adds a complementary workflow-level lever: when a caller knows a recipe needs adhoc only, it can pass `skip-codesign-import: true` and the Apple Developer ID is never brought into the keychain in the first place. Avoids importing a cert we won't end up using, and reduces the window during which the cert exists on the runner. The default stays false -- behavior of every existing call is unchanged. This patch only exposes the lever through the call chain: pkg.yml (workflow_call input) -> pkg-platform.yml (workflow_call input) -> .github/actions/setup (composite input, gates the import step) Picking which recipes opt in is intentionally left out of this patch. lima-vm.io is the obvious first candidate (see pkgxdev#7853). Refs: pkgxdev#7853, pkgxdev/brewkit#353 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
|
Heads-up on the red ci²: the 7 failures are all the fork-secrets limitation, not the change itself. Annotation reads:
(+ Pantry repo secrets aren't passed to The 11 SUCCESS checks cover the YAML validators and the lanes that don't depend on those secrets. The change itself is purely additive: new input defaults to If a real ci² pass is needed, the branch would need to live inside pkgxdev/pantry — happy to redo from a maintainer-pushed branch if that helps. Otherwise this is reviewable by diff (~30 lines, 3 YAML files). |
Summary
Defense-in-depth follow-up to pkgxdev/brewkit#353. Adds a workflow-level lever to skip importing the Apple Developer ID into the keychain for recipes that need adhoc signing.
Why
Some recipes ship binaries with entitlements that require either adhoc signing or a Developer ID with a matching provisioning profile — notably
com.apple.security.virtualizationandcom.apple.security.hypervisor. brewkit#353 handles the binary side correctly: it sees these entitlements in the Mach-O and forces adhoc signing infix-machos.rb, regardless of what signing identity the workflow imported.This PR is the workflow-level complement that @jhheider raised in #7853: when we know a recipe is in this category, why import a Developer ID at all? It's wasteful and leaves the cert in the keychain longer than necessary.
What changes
Purely additive lever. Default stays
false→ no behavior change for any current call.The
apple-actions/import-codesign-certs@v6step (and the prophylacticDelete keychainstep before it) are gated oninputs.skip-codesign-import != 'true'.What is not in this PR (deliberately)
Picking which recipes opt in. Two reasons:
lima-vm.iois the obvious first candidate (#7853) and a follow-up would add it.Test plan
false)skip-codesign-import: trueand confirm the import step is skippedRefs: #7853, pkgxdev/brewkit#353
🤖 Generated with Claude Code