Skip to content

repos install: warn when a private repo sends secrets or write tokens to fork PR workflows #9630

Open

Description

@waynesun09

Follow-up from #9230 (implements ADR 0164) and the discussion on #9227.

Problem

After the shim moves to pull_request, a fork PR in a private or internal repository runs its own copy of the workflow. Two repository Actions settings decide what that run gets:

  • "Send write tokens to workflows from pull requests"
  • "Send secrets to workflows from pull requests"

ADR 0164 rule 2 requires both to stay off. With "send write tokens" on, a fork run gets a write GITHUB_TOKEN and id-token: write. In a vendored install the dispatch workflow's fork check is in a PR-controlled file, so it can't stop that run. Nothing in fullsend checks these settings today. #9230 documents them in the required-upgrade section of docs/guides/getting-started/repo-management.md.

Requested change

fullsend repos install (and fullsend repos status, for parity) reads the setting for private and internal repositories and warns when either option is on:

  • API: GET /repos/{owner}/{repo}/actions/permissions/fork-pr-workflows-private-repos (send_write_tokens_to_workflows, send_secrets_and_variables), through forge.Client.
  • The call needs repository administration read access. When the token lacks it (403), print a notice that the setting could not be checked and must be verified by hand. Do not fail the install.
  • Public repositories: skip, because GitHub never sends secrets or write tokens to fork PR runs there.

Done when

  • Unit tests cover: on, off, 403, and public-repository skip.
  • The docs name the warning and the manual check.

Activity

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

    @fullsend-ai-triage

    🤖 Finished Triage · ✅ Success · Started 7:10 PM UTC · Completed 7:12 PM UTC

    Commit: d7dd6dd · View workflow run →

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

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

    @fullsend-ai-triage

    Triage notes: the request is well specified and ready for implementation. The target code exists in internal/cli/repos.go (install and status flows) and internal/forge (the forge.Client interface, GitHub implementation and fake).

    Implementation notes

    • The new endpoint needs a forge.Client method, a GitHub implementation, and a fake for tests. Other forges will need a no-op or unsupported result.
    • A 403 must be distinguishable from other errors so the install and status flows can print the manual-check notice and carry on.
    • Visibility (private, internal or public) needs to be available at the call site so public repos are skipped before any API call.

    Coordination with #9230: that PR is still open and does not implement this check, so it is not a blocker. Its required-upgrade docs section is not on main yet, so the docs change here may need a rebase or a separate section. Whoever picks this up should check where #9230 stands before editing docs/guides/getting-started/repo-management.md.

    Proposed test case

    Fake forge client, for install and status:
    1. private repo, send_write_tokens_to_workflows=true -> warning printed, exit success
    2. internal repo, only send_secrets_and_variables=true -> warning printed
    3. private repo, both false -> no warning
    4. endpoint returns 403 -> 'could not check, verify manually' notice, exit success
    5. public repo -> endpoint not called, no warning
    

    Next steps:

    • /fs-code — agent creates a PR to implement this issue
    • /fs-code <your instruction> — agent implements with your specific guidance
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

    featuretriaged

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions