Repository navigation
security: Claude/App secret jobs run in the main-only mind-main environment - #573
Merged
Merged
Conversation
…nd-main environment Old Mind heads keep pre-hardening workflow copies that a dispatch at that ref would run with the org secrets. Every job that reads CLAUDE_CODE_OAUTH_TOKEN or APP_PRIVATE_KEY now declares environment: mind-main (deployable from main only); the hole closes once the human moves both secrets into that environment. Draft: draft/maintenance/pyautomind/old_branch_workflow_secret_exposure.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he secret scan Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Summary
Closes the main half of
draft/maintenance/pyautomind/old_branch_workflow_secret_exposure.md. Aworkflow_dispatchruns the workflow file at the ref the caller picks, and Mind keeps about 244 old heads whose copies predate the input hardening of #565, with the org secrets in reach.mind-main, restricted to deployment branchmain. It was created by the lead on 2026-11-16.CLAUDE_CODE_OAUTH_TOKENorAPP_PRIVATE_KEYnow declaresenvironment: mind-main. That is 10 jobs in 8 workflows. All are schedule, dispatch or push-to-main jobs;spawn_drift'sdriftjob is skipped onpull_request.tests/test_workflow_environment.pyfails on any job that reads either secret without the environment.policy/github_tokens.md: a new "Old refs" paragraph, and the secret table rows updated.The hole closes only after the human moves the secrets. Merge this first, then:
CLAUDE_CODE_OAUTH_TOKENandAPP_PRIVATE_KEYasmind-mainenvironment secrets.CLAUDE_CODE_OAUTH_TOKEN.APP_PRIVATE_KEY's repository list.That alone does not close it (independent security review, FINDINGS): Mind
mainis unprotected, and a pre-hardeningmind_ledger_merge.ymlon an old head hascontents: writeplus an injectableinputs.branch. A dispatch there can push code tomainthat amind-mainjob later runs with the secrets. So also either prune the old heads that predate5a5d9dd80, or protectmain, which first needs the ledger pushes moved to a bypass actor. That choice is the human's.can_admins_bypassonmind-mainis nowfalse. The webhook secrets stay outside the environment, since they can only post to Slack.Test plan
tests/test_workflow_environment.pyfails on main (1 failed) and passes here (7 tests, including case-insensitive, indexed,toJSON(secrets)andsecrets: inheritspellings), along with the 59 existing workflow-injection tests.spawn_driftonmainmints the App token inside the environment.🤖 Generated with Claude Code