8000 ci(release): pass the GitHub App client secret to the build jobs by norrietaylor · Pull Request #2320 · gominimal/minimal · GitHub
[go: up one dir, main page]

Skip to content

ci(release): pass the GitHub App client secret to the build jobs - #2320

Merged
norrietaylor merged 5 commits into
mainfrom
chore/release-github-app-client-secret
Oct 30, 2026
Merged

norrietaylor merged 5 commits into
mainfrom
chore/release-github-app-client-secret

Conversation

@norrietaylor
@norrietaylor norrietaylor commented Oct 18, 2026 •
Copy link
Copy Markdown
Member

What

The three build jobs that compile min (build-release-linux-amd64, build-release-linux-arm64, build-release-macos-arm64) now pass MINIMAL_GITHUB_APP_CLIENT_SECRET from the repository secret of that name. The secret is already set.

Why

min auth login signs in under the Minimal-published GitHub App (client id Iv23liv6KetAFJp4Eb5K). The browser flow needs the App's client secret, which min reads at compile time with option_env!. A build without it offers only the device flow. This is the sign-in task in the BEP plan, #2263, under epic #1501.

  • The secret is set in the env of the one step in each job that compiles min: "Build static release binaries" on Linux amd64 and arm64, and "Build release minimal binary" on macOS. No other step and no other job sees it.
  • The value is the App's public client secret: it ships in the min binary by design (crates/minimal/src/cmd/auth.rs), and the browser flow uses PKCE.
  • Nightly calls this workflow with secrets: inherit, so nightly builds get it too.
  • Nothing reads the variable until #2263 lands, so this can merge first.

Checks

  • actionlint .github/workflows/release.yml: clean.
  • zizmor --offline: no findings before or after (26 suppressed, unchanged), checked on the job-level version.

Summary by CodeRabbit

  • Chores
    • Updated release build configuration for Linux AMD64 and ARM64, and macOS ARM64.
    • No changes to end-user functionality.

The three build jobs that compile `min` now export
MINIMAL_GITHUB_APP_CLIENT_SECRET from the repository secret of that
name. `min auth login` reads it at compile time for the browser sign-in
under the Minimal-published GitHub App; a build without it offers only
the device flow. Nightly reuses this workflow with inherited secrets, so
it gets the variable too. Nothing reads it until the sign-in lands.
@coderabbitai
coderabbitai Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: a8e09785-9bb7-49b0-899d-3e3a0b2534a6
Commits

Reviewing files that changed from the base of the PR and between 95b4bab and 5bba365.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

No actionable comments were generated in the recent review.

ℹ️ Recent review info
⚙️ Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 01fa1b91-25c2-4b6c-b383-02b19b847853
📥 Commits

Reviewing files that changed from the base of the PR and between 608ab9c and 95b4bab.

📒 Files selected for processing: 1
  • .github/workflows/release.yml

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 1 remain after this review.

Walkthrough

The release workflow now passes MINIMAL_GITHUB_APP_CLIENT_SECRET to the AMD64 and ARM64 static builds and the macOS ARM64 minimal build.

Changes: Release builds

Layer / File(s) Summary
Pass secret to release builds
.github/workflows/release.yml
The AMD64 and ARM64 static build steps and the macOS ARM64 minimal build step receive MINIMAL_GITHUB_APP_CLIENT_SECRET from the workflow secret.

Priority: Low

Estimated code review effort: 1 (Trivial) | ~4 minutes

Change: Other

Possibly related issues

  • Issue 1501: The release builds now receive the GitHub App client secret described as enabling the browser sign-in path.
  • Issue 2276: The release builds now receive the client secret identified as needed for browser sign-in.

Suggested reviewers: bryan-minimal

Merge Risk: Minimal · previous review 95b4b

The release workflow now passes the GitHub App client secret only to the steps that compile the binary, so release builds can offer browser sign-in. No concrete merge-blocking risk remains; the normal CODEOWNER review of the workflow change still applies.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title uses the required Conventional Commit format and clearly describes the primary change: passing the GitHub App client secret to release build jobs.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The description follows the repository template in substance. It has a Summary-equivalent ('What' and 'Why' sections) that explains the change, the reason for it, and the scope of the secret. It links…
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (1 skipped: 1 unsupported.)

Full details: Description check

Explanation

The description follows the repository template in substance. It has a Summary-equivalent ('What' and 'Why' sections) that explains the change, the reason for it, and the scope of the secret. It links related issues (#2263, #1501). The Testing-equivalent 'Checks' section lists actionlint and zizmor runs with results, though it does not paste raw output. The Checklist section is absent: it does not say whether docs were updated, and it does not address the BREAKING CHANGE footer. The PR title is not shown in the provided context, so its Conventional Commit format cannot be checked.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the build step’s nest
A secret joins the release quest
Three targets greet the added key
Then hop along, securely
The workflow runs, neat as can be

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor marked this pull request as ready for review October 18, 2026 20:02
@norrietaylor
norrietaylor requested a review from a team as a code owner October 18, 2026 20:02
@minimal-foundry
minimal-foundry Bot commented Oct 18, 2026 •
Copy link
Copy Markdown
Contributor

Reviewed: 2 findings, none blocking at 5bba365cc9ac.

Address the comments on the diff.

Clobber: none seen.

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 3 findings, 1 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread .github/workflows/release.yml Resolved
@bryan-minimal bryan-minimal left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two things before I'd stamp this. The bot's HIGH is right about the fact and wrong about the conclusion: an option_env! secret ships in every public binary, so it is public by construction; that is also how gh itself ships its OAuth client secret, and GitHub Apps have no PKCE alternative for the browser flow. So the model is 'the client secret is not a secret', and the PR should say so in the comment above the env line (one sentence), so the next reader does not file the same finding. Second, and cheap: move the env from job level to the cargo build step. At job level every step in the job sees it, the third-party disk-free action included; at step level only the compile does. Nothing else to change.

@norrietaylor
Copy link
Copy Markdown
Member Author

/revise address all comments and review findings.

@minimal-foundry
minimal-foundry Bot commented Oct 20, 2026 •
Copy link
Copy Markdown
Contributor

Round 1 of 10 changed nothing: Noop. The only file in this pull request is .github/workflows/release.yml, and the survey refuses every path under .github/ to this agent. So I changed nothing. The finding has two parts. Part 1 (the secret is compiled into public binaries) does not hold: crates/minimal/src/cmd/auth.rs:24-27 documents BUILT_IN_SECRET as 'The App's public client secret', and the browser flow already uses PKCE (code_challenge S256, code_verifier). GitHub App token exchange requires client_secret even with PKCE, so the design treats it as public and relies on PKCE and the 127.0.0.1 redirect. Part 2 (scope the env to the cargo build step, not the job) is a fair hardening. It needs an edit to .github/workflows/release.yml at the three job env blocks (near lines 194, 339 and 473), which a person with CODEOWNER rights must make. I ran no tests because I changed no file.. This pull request is still open.

branch chore/release-github-app-client-secret

round outcome job
1 changed nothing: Noop. The only file in this pull request is .github/workflows/release.yml, and the survey refuses every path under .github/ to this agent. So I changed nothing. The finding has two parts. Part 1 (the 5a8f7724

Updated 2026-10-20T21:35:56.797Z.

@minimal-foundry
Copy link
Copy Markdown
Contributor

Round 1 of 10 on a /revise note: the coder changed nothing. Noop. The only file in this pull request is .github/workflows/release.yml, and the survey refuses every path under .github/ to this agent. So I changed nothing. The finding has two parts. Part 1 (the secret is compiled into public binaries) does not hold: crates/minimal/src/cmd/auth.rs:24-27 documents BUILT_IN_SECRET as 'The App's public client secret', and the browser flow already uses PKCE (code_challenge S256, code_verifier). GitHub App token exchange requires client_secret even with PKCE, so the design treats it as public and relies on PKCE and the 127.0.0.1 redirect. Part 2 (scope the env to the cargo build step, not the job) is a fair hardening. It needs an edit to .github/workflows/release.yml at the three job env blocks (near lines 194, 339 and 473), which a person with CODEOWNER rights must make. I ran no tests because I changed no file.

Review threads the coder judged:

  • 👎 invalid — .github/workflows/release.yml:194: The secret in the binary is by design: crates/minimal/src/cmd/auth.rs:24-27 calls it the App's public client secret. The browser flow uses PKCE (S256 challenge, code_verifier) and a 127.0.0.1 redirect, and GitHub App token exchange needs client_secret even with PKCE. The step-scope point is fair, bu

@bryan-minimal
Copy link
Copy Markdown
Member

Correcting myself after the revise round's note: the code already does both halves of what I asked for on the model. crates/minimal/src/cmd/auth.rs calls it "the App's public client secret, embedded at build time", and the browser flow uses PKCE (S256) with a 127.0.0.1 callback; the secret is still needed for the token exchange, which is GitHub's rule, not a gap. So there is no sentence to add. The one thing left is the cheap one: move the env from job level to the build step in the three jobs (release.yml lines 194, 339, 473), which the bot may not edit; with that, this is an approve from me.

norrietaylor and others added 2 commits October 23, 2026 05:12
Move MINIMAL_GITHUB_APP_CLIENT_SECRET from the job-level env of the three
build jobs to the one step in each that compiles `min`: "Build static
release binaries" (scripts/dist-build.sh) on Linux amd64 and arm64, and
"Build release minimal binary" on macOS. No other step sees it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WhCC5TEBNzPeWgytRsU4rc
Copy link
Copy Markdown
Member Author

@bryan-minimal the client secret is now scoped to a step, in 95b4bab. In all three build jobs it is set only on the step that compiles min, and no other step sees it. The branch also has main merged in.


Generated by Claude Code

@minimal-foundry minimal-foundry Bot left a comment
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimal-review — advisory review

Verdict COMMENT — 2 findings, 2 inline.

Panel: 3 of 3 personas ran (correctness, security, supply-chain).

Comment thread .github/workflows/release.yml Resolved
Comment thread .github/workflows/release.yml Resolved
@norrietaylor
Copy link
Copy Markdown
Member Author

/review

@bryan-minimal bryan-minimal left a comment
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both asks met in substance: step-scoped since 95b4bab, and the public-by-construction point is in the PR body; the one-line comment above the env can follow. Needed for tonight's nightly so released min offers the browser flow.

@norrietaylor
norrietaylor added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 28, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Oct 28, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 30, 2026
Merged via the queue into main with commit 892033c Oct 30, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the chore/release-github-app-client-secret branch October 30, 2026 05:56
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.

2 participants

0