Gate Apple signing secrets behind the release environment - #34
Merged
Conversation
release.yml is reachable via workflow_dispatch, which requires only write access. With the secrets held as plain repo secrets and no environment protection, any write-role account can trigger a signed release or read the signing identity. Adds environment: release to the release job so the job waits on a required reviewer and can only deploy from a protected branch.
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
environment: releaseto thereleasejob.Why
release.ymlis reachable viaworkflow_dispatch, and manually running aworkflow
requires only write access. The five Apple signing secrets
(
MAC_CERTIFICATE_P12,MAC_CERTIFICATE_PWD,APPLE_ID,APPLE_ID_PWD,APPLE_TEAM_ID) are plain repository secrets with no environment protection,so any write-role account could trigger a signed release — or add a workflow
on a branch that simply prints them.
A
releaseenvironment now exists on this repo with:Referencing it from the job makes the release wait for approval and blocks
dispatch from unprotected branches.
Follow-up required — this PR alone is not sufficient
The secrets are still repository secrets, which every job in the repo can
read regardless of environment. Secret values cannot be read back through the
API, so they could not be migrated automatically. To finish:
release.Until that is done the environment gate controls when the release job runs,
but not who can read the secrets.
Risk
Low. No build, signing, or notarization logic changed — only job placement
behind an approval gate. First release after merge will pause for approval,
which is the intent.