Skip to content

Apply the Workflow Token Defaults Across the Fleet and Confirm the --lower-workflow-token Option #4433

Backlog

Description

@ptr727

Problem

PR #4426 (the configure.sh half of #1783) made repo-config/configure.sh declare, check, and apply the Actions workflow token defaults from repo-config/workflow-permissions.json: default_workflow_permissions: read and can_approve_pull_request_reviews: false. The code reached main in release 2.0.1595, but no repository has been applied. Every repository whose live values differ reports drift on configure.sh check until it is, the hub included.

A fleet apply of this group is an outward settings write on each repository it changes, so it was not run. Per the maintainer's 2026-11-01 answer on #1783 (option 1), each repository that reads write first needs a read confirming no job relies on the implicit write, then the maintainer's go-ahead at apply time.

#1783 stays open for its other half, the audit check requiring permissions: {} on entry-point callers. This issue holds only the apply and the option confirmation.

Evidence

The new option to confirm: --lower-workflow-token

  • What it does. configure.sh apply holds back the workflow token group on a repository whose live default is write while the payload declares read. The group writes nothing there, the other groups still apply, and the run ends non-zero. The held group is named in the run's output, in a dry run, and before the secrets group. --lower-workflow-token lets the write go through. It is valid only with apply, and is refused elsewhere before any read. A repository already on read needs no option, so its approval setting is written without it.
  • Why it exists. Without a gate in the code, a routine apply, such as the one RESYNC.md step 5 runs for whatever check reports, would lower the default unread. The option is how the operator says the read and the go-ahead have happened.
  • PR Declare and Apply the Actions Workflow Token Defaults Through configure.sh #4426 asked the maintainer to confirm this design at the promotion review. No confirmation is on record.

Steps, per repository

  1. Read the repository's live defaults: gh api repos/<owner>/<repo>/actions/permissions/workflow.
  2. Where it reads write, read its workflows on every branch that runs them. Confirm that each job writing through GITHUB_TOKEN declares the scope it needs, and that none relies on the implicit write. Record the result here.
  3. With the maintainer's go-ahead for that repository, run repo-config/configure.sh apply <owner>/<repo> <model> from a hub checkout at main. Add --lower-workflow-token only on a repository that reads write and passed step 2.
  4. Run repo-config/configure.sh check <owner>/<repo> <model> and confirm the workflow token group reports no drift.

The hub reads read already, so its apply needs no option and changes only can_approve_pull_request_reviews.

Done looks like

  • The maintainer has confirmed or changed the --lower-workflow-token design, recorded here.
  • Every cataloged repository reads default_workflow_permissions: read and can_approve_pull_request_reviews: false, or is named here with the reason it is held.
  • configure.sh check reports no workflow token drift for any applied repository, the hub included.

Activity

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions