Repository navigation
Publish only from release, and stop reshaping secrets in CI - #3090
Merged
Merged
Conversation
configure_publishing_secrets.py base64-decoded NEXUS_PASS64 and GPG_KEY64 and wrote the plaintext to $GITHUB_ENV. GitHub masks the value of a secret as it was given, so a decoded value is a string it has never seen, and the runner prints $GITHUB_ENV variables in the env: header of every later step. That put the Maven Central password and the armored signing subkey into public logs. Drop the script and hand each secret straight to Gradle under the name the publishing plugin reads, so nothing is ever decoded in a workflow step and every value stays masked. This needs the plaintext secrets NEXUS_PASS and GPG_KEY; the base64 variants stay for the other diffplug repos, which decode them inside Gradle. Publishing also goes back to --no-configuration-cache, to keep the signing key out of the configuration cache. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The publishing secrets are now reachable only from the maven-central environment, whose deployment branch policy allows main and release only, so a push to any other branch can no longer read them. GITHUB_TOKEN drops to contents:read by default; the five test jobs opt back into checks:write for the JUnit reporter, and changelog-print and scheduled-cleanup declare read. Flip the repo's default workflow permissions to read-only once this merges. renovate-changelog.yml took github.head_ref and github.base_ref straight into shell commands. A branch name is attacker-controlled text, so it moves to env vars. The publish job was not exploitable (checkout of a fork branch fails first), but the pattern shouldn't stay. CODEOWNERS covers the paths that can move secrets or change what ships. It only bites once branch protection requires approvals and code owner review. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Snapshot publishing on main is gone: the job is removed from ci.yml, so no workflow outside a release can touch publishing credentials. The maven-central environment's branch policy now allows only `release`, which only nedtwigg can push to, so the secrets are unreachable from main, from any topic branch, and from any fork. CONTRIBUTING.md no longer advertises snapshots; publishToMavenLocal is the way to test an unreleased change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Replaces 0x4272C851, whose encrypted copy was exposed in public CI logs. The old subkey is not revoked, so existing signatures stay valid. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
A single code owner cannot approve their own pull request, which would block every change to these paths. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This was referenced Sep 17, 2026
Closed
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.
Follow-up to the credential exposure described in #3089.
What changed
configure_publishing_secrets.pydecodedNEXUS_PASS64/GPG_KEY64and wrote the plaintext to$GITHUB_ENV, which the runner prints inthe
env:header of every later step. GitHub only masks the value it was given, so the decodedvalues were printed in the clear. The script is deleted; each secret is now stored in the exact
form the build consumes and passed straight to Gradle.
release. The snapshot publish job is removed fromci.ymlentirely, and the credentials live in the
maven-centralenvironment, whose branch policy allowsonly
release.0xFA5C18CFB74EC7C6, replacing0x4272C851, whose encrypted copy wasexposed. The old subkey is not revoked, so existing signatures remain valid.
contents: readby default, withchecks: writeonly on the jobsthat post JUnit results.
renovate-changelog.ymlinjection fixed.github.head_refandgithub.base_refnow arrivethrough env vars instead of being spliced into shell commands.
Already done outside this PR
maven-centralenvironment exists, restricted torelease, and holdsGPG_KEY,GPG_PASSPHRASE,NEXUS_USERandNEXUS_PASS.After merging
reporter loses
checks: write:releaseto exercise the new signing key.🤖 Generated with Claude Code