Skip to content

Limit operator GitHub tokens to authenticated children - #1746

Merged
mergify[bot] merged 3 commits into
mainfrom
lean178/1656-1657-child-token-scope
Nov 26, 2026
Merged

mergify[bot] merged 3 commits into
mainfrom
lean178/1656-1657-child-token-scope

Conversation

@eowca

@eowca eowca commented Nov 26, 2026 •

Copy link
Copy Markdown
Contributor

Limit operator GitHub tokens to authenticated children

Context and goal

  • Context: The optional App helper mints its own installation token, and remote cleanup initializes a local bare repository before pushing a lease-protected deletion.
  • Problem: The helper and local git init both inherit the operator token variables used for authenticated GitHub commands.
  • Goal: Keep the operator token variables out of those two processes and preserve the credentials used by gh and the cleanup push.

Closes #1656
Closes #1657

Acceptance

  • A synthetic App mint helper receives neither GH_TOKEN nor GITHUB_TOKEN and still mints an installation token used for reads.
  • A successful cleanup git init receives neither token. The subsequent push receives both configured operator variables and retains its credential helper and ref lease.
  • Existing App fallback behavior continues to work.

Notes

  • Owner Decisions approved this patch at 3b32c04adf99. The merge from main preserves the approved additions and deletions exactly.

  • The App helper keeps its other environment variables and existing mint or fallback behavior. This narrows who receives operator tokens without changing the architecture of GitHub authentication.

  • The GitHub test file and the full heavy-slot check passed on 3b32c04adf99. The remote receipt uses different settings from this local checkout, so the generated Validation block marks it unverified for local readiness.

Base

main @ aa563c2
Base: aa563c2

Validation

Recorded for 84f9603455eb

  • uv run --group dev ruff check src tests: exit 0
  • uv run --group dev tach check: exit 0
  • uv run --python 3.14 python scripts/check_architecture_docs.py: exit 0
  • scripts/size_budget.sh: exit 0
  • uv run --group dev pytest -q: exit 0

Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Review

  • primary, claude, 3b32c04, approve

Architecture-Review: unchanged; the App mint and cleanup init use the common non-token environment and authenticated gh and push retain their credentials.
Co-Authored-By: Codex <noreply@openai.com>
@eowca eowca added the hold label Nov 26, 2026

@loopzero-feder-positronics loopzero-feder-positronics Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

loopzero primary review by claude on 3b32c04adf99a8a14424039ecde184b2d44f9037, 13.9s: approve (0 critical, 0 important, 0 suggestion)

Settings per native call (launch configuration and CLI claims, not backend attestation):

  • Call 1: requested model claude-opus-5-5 (effort medium); CLI-reported model claude-opus-5-5 (effort unknown); configured model claude-opus-5-5 (effort medium)

Native Claude output is retained in the restricted local review receipt.

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

Owner Decisions: auth ruling, APPROVED at head 3b32c04a (issues #1656, #1657). Posted by Lean178 on OD's behalf because OD's REST quota is exhausted.

The diff only narrows scope:

  • GH_TOKEN and GITHUB_TOKEN are no longer passed to the App mint helper or to the cleanup git init.
  • The cleanup push still gets them, together with the gh credential helper.
  • The installed mint helper (~/.config/loopzero/app-token -> mint-token.py) reads no token variables, so App minting is unaffected.
  • No new capability. Token and App precedence are unchanged.

Next: remove the hold, mark it ready, and queue it after keystone #1731. A new head that touches anything beyond these two call sites needs a new ruling.

@eowca eowca removed the hold label Nov 26, 2026
@eowca
eowca marked this pull request as ready for review November 26, 2026 10:58
@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

@Mergifyio queue

@mergify

mergify Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

✅ Merged into main as 903aaf5 at 11:04 UTC

5 min in the queue, 3 min of it CI.

So far

  • ✅ Entered the queue Thu 26 Nov, 10:59 · rule main · triggered by @eowca with the @mergifyio queue command
  • ✅ Passed · draft #1826
  • ✅ Merged 11:04 · 903aaf5 · squash
3 merge conditions met
  • github-review-approved · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = checks
    • check-neutral = checks
    • check-skipped = checks
  • any of · required by GitHub repository ruleset rule main: PR only, Mergify queue, existing checks required:
    • check-success = Loop-zero Eligibility
    • check-neutral = Loop-zero Eligibility
    • check-skipped = Loop-zero Eligibility

Times in UTC · dashboard · how the merge queue works

@eowca

eowca commented Nov 26, 2026

Copy link
Copy Markdown
Contributor Author

No description provided.

@mergify
mergify Bot merged commit 903aaf5 into main Nov 26, 2026
17 checks passed
@mergify mergify Bot removed the queued label Nov 26, 2026
@eowca
eowca deleted the lean178/1656-1657-child-token-scope branch November 26, 2026 11:05
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.

Keep GitHub tokens out of cleanup git init Keep operator GitHub tokens out of the App mint helper environment

1 participant