Repository navigation
fork-follow: grant actions: write to the release call; test called-workflow permissions - #66
Conversation
…rkflow permissions The first run of Fork follow upstream (workflow_dispatch, after FORK_PUSH_TOKEN moved into the fork-push Environment) ended in startup_failure: its release job grants actions: read, but fork-release.yml's tests job asks for actions: write (fork-tests.yml's fleet_watch). GitHub refuses a run whose called workflow asks for more than the caller grants, even for a skipped job, before any job starts and without a log. fork-reusable-permissions.test.py walks every fork-*.yml workflow and its local reusable calls (nested too) and fails when a called job asks for more than its caller grants. It fails on the old fork-follow.yml and passes on the fix; it first proves itself on made-up workflows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: correctness+security (follow perms) · reviewer: opus high (t3lens66) · read at: 751b379 covered: fork-follow.yml, fork-release.yml, fork-tests.yml, release-desktop.yml read at head; the diff; the new test; fork-ci-tests.txt and how fork-tests runs it. checks:
finding: minor · .github/scripts/fork-reusable-permissions.test.py:116 · The selftest never proves the second-level (leaf) check. Case 1 already fails at the first level (mid findings: blocker 0 · major 0 · minor 3 verdict: SAFE. The change is correct, the cause matches, and I found no other start-up blocker. The extra grant reaches only the two jobs that already declared it, and neither runs candidate or PR code in a release run. The minor findings are test-strength gaps and can follow in a later PR. |
…n grants, prove each rule Lens minors on #66 (issuecomment-6874463655), fixed in the same round: - a called workflow's own top-level permissions are compared with the caller's grant; - a job that calls a workflow with no permissions set anywhere fails instead of being skipped; - selftest cases for: only the second level asks more, a callee job taking the callee's top level, top level above the grant while every job asks less, `{}` on the calling job, and a caller with no permissions. Each guard was removed once; the selftest fails each time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
lens: correctness+security (follow perms) · reviewer: opus high (t3check66) · read at: 5d084d7 covered: the fix diff 751b379..5d084d7 (test file only); the test file in full at head; the top-level and job permissions of fork-follow.yml, fork-release.yml, fork-tests.yml and release-desktop.yml at head; round-1 findings in #66 (comment). checks:
finding: minor · .github/scripts/fork-reusable-permissions.test.py:140 · Case 5 says it proves "callee job without permissions takes the callee's top level", but it now fails only through the new top-level check, not through inheritance. Mutation: change line 78 to findings: blocker 0 · major 0 · minor 2 verdict: SAFE. Round-1 findings 1, 2(b) and 3 are really fixed, each new guard has a case that fails without it (except as above), the rules match GitHub, and the real fork workflows pass. The two minors are test-strength gaps of the same kind as before and can follow later. |
… own Re-check lens minors on #66: the inheritance case failed only via the top-level check, and the top-level check was tested one level deep only. Each new case fails when its rule is removed (checked by mutation). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Re-check minors (6874501422) fixed in the same round, commit above:
|
Why
The first run of Fork follow upstream (started by hand right after
FORK_PUSH_TOKENmoved into thefork-pushEnvironment, #36) ended instartup_failurewith no log. Cause: itsreleasejob grantsactions: read, butfork-release.yml'stestsjob asks foractions: write(forfork-tests.yml'sfleet_watch). GitHub refuses a run whose called workflow asks for more than the caller grants, even for a job that would be skipped.fork-release.ymlalready knew this rule one level down (comment at itstestsjob); the caller above it was never updated, and nothing could see it because the workflow had never run (the token was missing until now).Fix
fork-follow.ymlreleasejob:actions: write(with a comment saying why). No job gets more than it already declares:fork-release.yml's top level keeps its other jobs atactions: read.fork-reusable-permissions.test.py: walks everyfork-*.ymland its local reusable calls (nested too) and fails when a called job asks for more than its caller grants. It first proves itself on made-up workflows (nested, skipped job,{},write-all). Listed in.github/fork-ci-tests.txt.Red on the old file, green on the fix:
State question
Runs again / stops half-way / old state: the change is only a token grant and a static test; fork-follow's own plan (none / release / rebase / advance / stage) handles reruns as before. Nothing has been pushed by fork-follow yet, so there is no half-done state to meet.
General vs project
General: the test checks any fork workflow's reusable calls; no project facts.
🤖 Generated with Claude Code