Skip to content

ci: run release-please under the main-secrets environment - #247

Merged
Artexis10 merged 1 commit into
mainfrom
ci/main-only-environment
Nov 29, 2026
Merged

Artexis10 merged 1 commit into
mainfrom
ci/main-only-environment

Conversation

@Artexis10

Copy link
Copy Markdown
Collaborator

What changed

The release-please job now runs under the main-secrets Environment. That Environment admits deployments from main only.

Why

The job reads the release App ID and private key. A workflow pushed on any other branch could read repository-level secrets. An Environment secret, behind a branch policy, cannot be read that way.

Proof

Workflow Job Triggers Secrets Moves?
release-please.yml release-please push to main RELEASE_PLEASE_APP_ID, RELEASE_PLEASE_APP_PRIVATE_KEY yes
  • No other workflow references these secrets. release.yml, go-ci.yml, nix-integration.yml and ci-efficacy-audit.yml do not.
  • The YAML parses, and the job carries environment: main-secrets. actionlint was not available.

Risk and undo

  • Until the Environment holds its own copies, the job still reads the repository-level secrets. Behaviour on main does not change.
  • Revert this commit to undo. No secret value is touched.

Follow-up (owner)

  1. Add both secrets to the main-secrets Environment.
  2. Let the next push to main run release-please and check it passes.
  3. Delete the repository-level copies.

The job mints a release App token. An environment limited to main stops a workflow on any other branch from reading the App key.
@Artexis10

Copy link
Copy Markdown
Collaborator Author

Automated review: APPROVE
Head: 0fed0d1
Base: 31d34fd
Patch: d02ce431d8fc3873d1f1c061a1be9cd5e3e0ef65
Reviewer: lane-reviewer, claude-opus-5-5
Blocking by round: 0
Net call: ship
Risk lens: yes
Pass: fdc925a7b128ecd0

Net call: ship. The repository is public, so environment secrets and deployment branches work on every plan. The one job that reads the release secrets now runs under the main-secrets environment.

Weight: 1 workflow line, no proof.

Non-blocking:

  • The follow-up order is sound. An environment secret overrides a repository secret of the same name, so the step-2 run on main proves that the environment copy works.
  • Each push to main now records a main-secrets deployment in the repository's deployment history. This is cosmetic.
  • No other workflow reads either secret. release.yml uses GITHUB_TOKEN only.
  • CI: Go Tests is still in progress at review time.
  • Scale/performance: absent. C4/C6: absent.

@Artexis10

Copy link
Copy Markdown
Collaborator Author

Automated review: APPROVE
Head: 0fed0d1
Base: 31d34fd
Patch: d02ce431d8fc3873d1f1c061a1be9cd5e3e0ef65
Reviewer: lane-reviewer, claude-opus-5-5, effort not stated
Blocking by round: 0
Net call: ship
Risk lens: yes
Pass: 6c05b6d0434307f4

Net call: ship. One job reads the release App secrets, and it runs only on a push to main. Putting that job under an Environment is the right mechanism for a public repository.

Weight: 1 line of workflow configuration, no proof lines.

Non-blocking:

  • Inventory: release-please.yml is the only workflow that reads RELEASE_PLEASE_APP_*. No workflow uses pull_request_target, workflow_run, secrets: inherit or OIDC, so the Environment changes no token subject.
  • Follow-up step 2 is a real check: an Environment secret takes precedence over a repository secret with the same name, so the first run after step 1 reads the Environment copies.
  • C4/C6: none. Scale and performance: none.
  • CI: Go Tests was still in progress at review time.

@github-actions

Copy link
Copy Markdown
Contributor

Quality report

08046ef against base 31d34fd. Only the gate fails this check; the rest informs review. Why each check exists: PRACTICES.md.

Gate: passed

Check Result
Unreachable Go functions (deadcode) passed
Go bugs, simplifications and style (staticcheck) passed
Shell script bugs (ShellCheck) no shell script changed

Proof weight

Product +1 lines against proof +0 lines (no proof classes changed).

Measures on added lines

Nothing found by jscpd.

Test runtime

This run against the median of the last 5 successful main runs of this workflow on the same runner, from the GitHub Actions API.

Job This run Median on main Change
Go Tests 22m 33s 22m 39s (5 runs) -0%
Go Tests (macos-latest) 1m 14s 1m 51s (5 runs) -33%
Go Tests (ubuntu-latest) 1m 29s 1m 28s (5 runs) +1%
Integration Test (windows) 0m 50s 0m 46s (5 runs) +9%
Synthetic Shard 0 1m 25s 1m 22s (5 runs) +4%
Synthetic Shard 1 1m 13s 1m 14s (5 runs) -1%
Synthetic Shard 2 1m 05s 1m 14s (5 runs) -12%
Synthetic Shard 3 1m 15s 1m 18s (5 runs) -4%
Synthetic Shard 4 1m 06s 1m 19s (5 runs) -16%
Synthetic Shard 5 1m 34s 1m 11s (5 runs) +32%
Synthetic Shard 6 1m 19s 1m 10s (5 runs) +13%
Synthetic Shard 7 1m 03s 1m 15s (5 runs) -16%
Catalog Matrix 0m 19s 0m 20s (5 runs) -5%
Notepad++ Synthetic Engine Contract 0m 19s 0m 19s (5 runs) +0%

Every table: this run's summary.

@Artexis10
Artexis10 merged commit 508f0fd into main Nov 29, 2026
17 checks passed
@Artexis10
Artexis10 deleted the ci/main-only-environment branch November 29, 2026 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant