Skip to content

Stop exposing repository secrets to PR-modifiable code (ADR 0164 follow-up) #9619

Open

Description

@waynesun09

Follow-up to ADR 0164 (#9227), raised by @ifireball in this review thread.

Problem

ADR 0164 runs the shim on pull_request for same-repo PRs. The PR branch's copy of the shim then receives the repository secrets it forwards. That exposure is bounded by writer trust, and agent tokens cannot edit workflow files, but the secrets are still reachable by PR-modifiable code.

Direction

Stop exposing secrets to PR-modifiable code:

  • Move the remaining repository secrets behind WIF, as already done for the mint and inference.
  • Where a secret must stay, serve it from a store that only trusted code can read, for example one gated on the OIDC job_workflow_ref claim (see the existing Vault ADR).

Note: the GitHub API never returns Actions secret values, so mint tokens cannot read them from the repository directly.

Out of scope

Automatic review for fork PRs. Fork pull_request runs also get a read-only token, so removing secrets does not bring fork review back by itself. That is covered by ADR 0171 (#9381).

Activity

  1. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 4:00 PM UTC · Completed 4:02 PM UTC

    Commit: 3e8fae6 · View workflow run →

    Runtime: claude · Model: sonnet → claude-sonnet-5-5 · Effort: high · Cost: $0.18

  2. added
    blocked
    on Nov 17, 2026
  3. fullsend-ai-triage commented on Nov 17, 2026

    @fullsend-ai-triage

    This follow-up depends on work that has not landed yet, so it is not ready for implementation.

    Once those land, the issue still needs scoping. The scaffold workflows currently forward more secrets than the Vault-eligible set. These include the Jira client id, client secret and email, the inference gateway and OpenAI API keys, and the GCP project and WIF provider values. Maintainers will need to decide, secret by secret, whether each moves behind WIF, moves to Vault, or can stay. Splitting that into per-secret sub-issues may be the best way to track it.

    Note that the changes will likely touch the shim and scaffold workflow files under .github/workflows/. The code agent cannot modify workflow files under current permissions, so those edits will need a human PR or maintainer action.

    This issue will be re-assessed once the prerequisites are resolved.

    Blocked by:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    blocked

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions