Repository navigation
Description
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
- Source: PR Declare and Apply the Actions Workflow Token Defaults Through configure.sh #4426, sections "Owed to the maintainer" and "New option for the maintainer to confirm", repeated in promotion Promote Develop to Main: Host-Tool Line Tracker, Workflow Token Defaults, Secret Sync Fields, and Audit Account Fixes #4428.
- Live read of the hub's
actions/permissions/workflowtoday:default_workflow_permissionsisreadandcan_approve_pull_request_reviewsistrue, against the payload'sfalse. Soconfigure.sh check ptr727/ProjectTemplatefails the workflow token group now. - PR Declare and Apply the Actions Workflow Token Defaults Through configure.sh #4426 reports a live read on 2026-11-19 finding 13 cataloged repositories on
write, andcan_approve_pull_request_reviewstrueon the hub and, as of 2026-11-01, on 12 cataloged repositories. Re-read both before applying. origin/main:repo-config/README.md"Workflow Token Defaults" states the held-back behaviour and the option.
The new option to confirm: --lower-workflow-token
- What it does.
configure.sh applyholds back the workflow token group on a repository whose live default iswritewhile the payload declaresread. 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-tokenlets the write go through. It is valid only withapply, and is refused elsewhere before any read. A repository already onreadneeds 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 oneRESYNC.mdstep 5 runs for whatevercheckreports, 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
- Read the repository's live defaults:
gh api repos/<owner>/<repo>/actions/permissions/workflow. - Where it reads
write, read its workflows on every branch that runs them. Confirm that each job writing throughGITHUB_TOKENdeclares the scope it needs, and that none relies on the implicitwrite. Record the result here. - With the maintainer's go-ahead for that repository, run
repo-config/configure.sh apply <owner>/<repo> <model>from a hub checkout atmain. Add--lower-workflow-tokenonly on a repository that readswriteand passed step 2. - 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-tokendesign, recorded here. - Every cataloged repository reads
default_workflow_permissions: readandcan_approve_pull_request_reviews: false, or is named here with the reason it is held. configure.sh checkreports no workflow token drift for any applied repository, the hub included.
Activity