Repository navigation
ci: backport protected publishing environments to release - #7202
Conversation
Adapt the workflow hardening from main to the release branch, including its legacy Cachix publishers. Keep dry runs unprivileged and pass the environment-scoped JSR token only to deno publish. Co-Authored-By: GPT-6.1 Sol <noreply@openai.com>
…ts-release # Conflicts: # .github/workflows/dependabot.yml # .github/workflows/release-brew.yml # .github/workflows/release-go.yml # .github/workflows/release-swift-ffi.yml
|
Settings change applied 2026-10-31 by the maintainer's pick (legacy release tag access: admit the three tags and protect
These admit (Written by Claude Opus 5.5) |
|
This run hit its 1h time limit while still working. Give runs longer with
|
kixelated
left a comment
There was a problem hiding this comment.
Automated review by review (OpenAI)
Reviewed commit: 39f690a29802fdb8706e37c2c1e9156b8c62759e.
No actionable bugs found. Backporting the existing Environment boundary is a focused way to keep release publishing compatible with credential migration. Tag-to-commit checks fail closed before upstream code executes, protected environments align with publishing paths, and dry runs avoid those environments. JSR_TOKEN is removed before build/npm subprocesses and passed only to real Deno publication. No API or wire changes.
Verification limits: static GitHub inspection of all 16 changed files and relevant workflow paths, with an independent guard review. No builds, tests, mocked publishers or real publishing were run. Live Environment/ruleset settings, credential migration and external trusted-publisher restrictions were not independently verified; the documented settings migration remains necessary before repository credentials are removed.
(Written by OpenAI)
|
Landing summary for head 39f690a298, merged into Changes: backports Read-only PR CI: confirmed. The diff adds no Checks: all required checks passed on this head. The earlier Reviews: Codex and Claude local reviews of this head reported 0 findings (see Not done here: the credential migration (copying secrets into (Written by Claude Opus 5.5) |

Problem
releaseruns its own workflow copies, which still read write-capable repository secrets. Removing those secrets after moq-dev/moq#7166 would break releases.Approach
publish/npmEnvironments, release-tag verification for privileged workflow chains, and JSR token handling onto the existing release workflows.cache.ymlandcachix.ymlconsumers ofCACHIX_AUTH_TOKEN.dependabot,release-brew,release-go,release-go-ffi,release-swift-ffi,release-swift-lib) namebot, whichreleaseadopted in 7e240565e8 andmainalready uses; they read onlyAPP_CLIENT_ID/APP_PRIVATE_KEY.Impact
publishnow also admitsmoq-boy-v*,moq-gst-v*, andlibmoq-v*tags, and therelease tagsruleset also protectsrefs/tags/libmoq-v*. No secrets, organization secret access, trusted publishers, or JSR tokens changed. Existing JSR OIDC trust remains usable until the maintainer provisions its replacement token.Validation
origin/release:just gh check,just ci check origin/release, andjust ci test origin/releasepassed.publish,bot,npm,pypi,pub.dev); the remaining OIDC/inheritjobs call reusable workflows whose callee jobs name theirs. No workflow has a duplicateenvironment:key.Decisions
Maintainer pick, 2026-10-31:
release's Cachix publisher:moq-boy-v*,moq-gst-v*,libmoq-v*topublishand protectlibmoq-v*inrelease tags(applied by the agent withgh api)Agent choices under the maintainer's overnight authorization, for review:
release'sbotEnvironment: tookbotfor all six moq-bot jobs, including the two (release-go-ffi,release-swift-lib) where git's auto-merge silently left a secondenvironment: publishkey, keeping this branch's tag guards.release-rshad the same duplicate; it keeps onepublishkey withmain's comment, since it reads more than the moq-bot key.publishpolicies, so no unprotected tag pattern could deploy topublishin between.Review
quest review), gpt-6.1-sol, medium effort, head 39f690a298 againstorigin/release: 0 findings. Covers the hand-resolved merge.quest review --harness claudeCLI was not logged in), head 39f690a298: 0 findings. Covers Codex's original changes. Checked each Environment against the triggering refs, brew's tag filter against its three formula templates, that the tag guards fail closed, and thatrelease.tsmatchesmain's token isolation.Follow-ups
Tracked by quest/m0/ci/read-only-secrets.md and moq-dev/moq#7201, now updated: after this lands, the maintainer copies the remaining credentials into
publish, deletes the repository copies and access to the organization'sDISCORD_WEBHOOK, restricts npm/PyPI/pub.dev publishers to their Environments, provisionsJSR_TOKENinnpmbefore unlinking JSR repository trust, and runs the negative branch probe. Do not remove repository credentials before this backport is live.(Written by Claude Opus 5.5)