GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||
GeezerVison is showing github.com — fork: delete four outside-started upstream workflows and keep them deleted by scuttletoby · Pull Request #14 · scuttletoby/t3code Conversation
|
| File | Why outside events can start it |
|---|---|
.github/workflows/mobile-eas-preview-fork.yml |
pull_request_target: it runs main's copy with a write token |
.github/workflows/desktop-macos-preview.yml |
owner decision |
.github/workflows/thread-transfer-report.yml |
workflow_run on a workflow named "CI", and an outside PR can add a workflow with that name |
.github/workflows/mobile-fingerprint-label.yml |
same workflow_run "CI" pattern |
.github/fork-removed-workflows.txt is the list, kept in config rather than in a hand-kept patch. fork-follow.sh reads it from the series head..github/workflows/<name>.yml (or is a fork-* file), stops the plan red and leaves the series as it is.fork: delete upstream workflows listed in …). This happens when the fork's deleting patch was dropped as empty because upstream deleted the file itself, and upstream later re-adds it.The events that count, from GitHub's full event list:
pull_request_target, pull_request_review, pull_request_review_comment (anyone can review a PR from a fork/* branch, and that branch's copy then runs with the repository's token), issues, issue_comment, discussion, discussion_comment, watch, fork, gollum (the fork's wiki is on).workflow_run (an outside PR can add a workflow with the watched name), and check_run, check_suite, status and deployment_status (apps post these on an outside PR's commits).pull_request from another fork gets a read-only token and no secrets. The other events need write access or more.The triggers are read by the new dependency-free fork-workflow-triggers.cjs. It reads only the top-level on:, so issues: write under permissions or a job named issues does not count.
Any pull_request_target or workflow_run word anywhere in the file also counts.
The reader reads plain YAML only. Anything else counts as unreadable, so the plan stops:
\n or \r\n (a lone \r, U+0085, U+2028, U+2029), or a tab in the indent;key: (or "on":), --- or .... This refuses on :, escaped or quoted keys, ? on, directives, a root-level list and a BOM;needs:), or one that never closes;on: twice, several YAML documents, no on:;on:: a flow mapping, a list over lines, an anchor, alias or tag, a block scalar, <<, uneven indent, or a name that is not an event name.So a decoy on: cannot hide in a multi-line string or list. Over all 30 workflow files on fork main and all 26 on upstream main, the reader's output matches PyYAML's on: keys.
fork-contracts.test.py gets a new removed section. It checks that the list exists, that every line is an upstream workflow path that is not in the tree, and that the four files above are on it. Each of these has a broken copy that must fail.git rebase --abort), so the series is left as it is. Later steps (candidate push, release, branch move) are unchanged and already handle re-runs.fork-* path, a path with a space, and ../).SERIES_BRANCH (fork-follow.yml), so it runs main's current fork-follow.sh. Before this merges that script has no list logic, hits a modify/delete conflict on these files and stops red, as today. After it merges, the run uses this logic. Either way it does not ship them.The tests never reach GitHub: fork-follow.test.sh runs under fork-test-gh.sh (no GH_TOKEN/GITHUB_TOKEN, .invalid GH_HOST, stub gh), and the plan uses only local git remotes.
bash .github/scripts/fork-follow.test.sh: all 131 checks pass here. Run against fork main's scripts (FORK_FOLLOW_DIR=<main's .github/scripts>), 24 fail: every new plan check except the three that cover unchanged behaviour (an empty list goes on, a push-only new workflow goes on, a rename is refused, which main also does through its plain conflict).node --test .github/scripts/fork-workflow-triggers.test.cjs: 13 tests of the reader. They cover every shape it reads and every refusal, including upstream's own forms (CRLF, block scalars with quotes in them, a needs: list over lines).fork-workflow-triggers.test.cjs (1 test each): the odd line break check, the tab check, the plain-key: rule, the open-quote rule, the bracket-indent rule, the never-closed bracket, the aligned closing line, on: twice, several documents, the unknown on: forms, <<, uneven indent, empty on:, the event-name check, a nested list under on:, quotes only at a token start, ASCII-only indent, the block-scalar skip, the block's key and dash indent, the block's end, and exit 2 on error.fork-follow.test.sh: the CR strip on list lines (1 fails), the plain-text pull_request_target|workflow_run backstop (1), and the review and gollum events (3).key: rule. The reader test covers the quote rule on its own.python3 .github/scripts/fork-contracts.test.py: all pass here. Run on fork main's tree with this test file, 3 fail (the list is missing, the four files are not on it, and the "listed file still in the tree" mutant).node .github/scripts/fork-ci-tests.cjs (every listed fork test: fork-release.test.sh, fork-secret-scan.test.sh, fork-release-workflow.test.py, the fork-*.test.cjs tests), node .github/scripts/fork-tests-drift.cjs, actionlint 1.7.12 (the pinned, checksummed release) on fork-*.yml, vp fmt --check and vp lint on .github, and knip's file check. Without the new test file knip reports fork-workflow-triggers.cjs as unused, as CI did; with it, it does not.fork-workflow-triggers.cjs now exports readTriggers, and fork-workflow-triggers.test.cjs requires it. Every other fork-*.cjs script is kept in use this way, through knip's .github/**/*.test.cjs entry. The test is listed in .github/fork-ci-tests.txt.vp check: knip failed first, so vp check never ran on this PR. fork-schema-check.test.cjs (from PR fork: outside PRs run nothing, one checkout without actions/checkout, contract tests #12, which merged without a Fork tests run) has an unused cmd parameter that vp lint reports as an error. It is dropped here.vp lint fix touches fork-schema-check.test.cjs, and the check refuses any change to its own files ("Only the owner may do that: the check stays red, and the owner merges past it"). Reverting the fix would make this check green but leave vp check red in Lint, so the fix stays.fork-tests.yml is disabled in the fork (since 17:33Z), so no run started for the push. Once it is enabled, a new push or a close and reopen of this PR starts it.desktop-macos-preview-publish.yml (workflow_run on "Desktop macOS Preview" plus pull_request_target), pr-limits.yml, pr-size.yml, pr-vouch.yml (also issue_comment), relay-preview-cleanup.yml. They stay as they are (already listed by GitHub and disabled by the sweep). The general check covers only files that are new on a release. Adding any of them to the list is a one-line change if wanted..github/fork-ci-tests.txt has a stale comment, "Upstream runs this one from thread-transfer-report.yml". That file belongs to PR fork: Fork tests on the repository's own fleet runners, chosen per run (CI_RUNNERS) #13, so it is left alone. The test it describes still runs from fork-tests.yml..github/fork-ci-tests.txt is also changed in PR fork: Fork tests on the repository's own fleet runners, chosen per run (CI_RUNNERS) #13. This PR adds one line after fork-tests-drift.test.cjs, and fork: Fork tests on the repository's own fleet runners, chosen per run (CI_RUNNERS) #13 adds one after fork-contracts.test.py. The hunks are apart, so either order merges cleanly.issue-labels, mobile-android-apk, mobile-showcase-screenshots, publish-aur, release, release-desktop, stale-needs-more-info, windows-tests. If a release edits one of them to add an outside event, the plan passes it. Only the later REQUIRE_NEW_OFF gate in fork-workflows.sh stops the branch move, and its advice is to move main by hand if the files look harmless. Fix: also check changed files and refuse when the new version has an outside event the old one lacked (or check every added or changed file GitHub does not list).fork/* branches still carry mobile-eas-preview-fork.yml (for example fork/ci, fork/auto-update, fork/follow-upstream, fork/release-workflow, fork/fleet-runners). pull_request_target runs the base branch's copy, so an outside PR aimed at one of those branches still starts it, and the sweep cannot disable it. Today it fires only on labeled, with a job if on the label, which needs triage rights. Fix: delete the stale branches, or restrict PR base branches.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…leted The fork's sweep disables upstream workflows only once GitHub lists them, so it cannot stop the first run of one an outside event starts. Owner decision 2026-11-12: delete mobile-eas-preview-fork.yml (pull_request_target), desktop-macos-preview.yml, thread-transfer-report.yml and mobile-fingerprint-label.yml (workflow_run on "CI", a name an outside PR can take). .github/fork-removed-workflows.txt lists them. fork-follow.sh reads it from the series head (missing or malformed: the plan stops), resolves a rebase conflict on listed files only by deleting them, deletes again any listed file upstream brings back, refuses a same-base series that still has one, and refuses a new upstream workflow that outside events can start (or whose triggers fork-workflow-triggers.cjs cannot read) unless the list names it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
lens: security S1 · reviewer: opus high (t3lens-14-s1) · read at: cf7f3b8 covered: the full diff of 919556a..cf7f3b8 and every function it calls in fork-follow.sh (fail, on_error, workflow_paths, new_workflows, refuse_upstream_fork_named, schema_check, latest_release, the advance/stage path); fork-workflow-triggers.cjs line by line; the fork-follow.yml plan job (checkout, env, token scope); fork-workflows.sh's unregistered/REQUIRE_NEW_OFF gate; the new tests in fork-follow.test.sh and fork-contracts.test.py. I formed my view before reading the PR body. Live state (read only): GitHub lists 19 workflows in the fork. The 4 deleted files are not among them. Of the files on main that can be started from outside, the listed ones (desktop-macos-preview-publish, pr-limits, pr-size, pr-vouch, relay-preview-cleanup) are all disabled_manually. 8 upstream files on main were never listed: issue-labels, mobile-android-apk, mobile-showcase-screenshots, publish-aur, release-desktop, release, stale-needs-more-info, windows-tests. Today none of them has an outside trigger. has_wiki=true, has_issues=false, has_discussions=false. checks:
finding: minor .github/scripts/fork-workflow-triggers.cjs:49 the reader takes the first column-0 blockers: none. Safe to merge as it stands. Finding 1 is cheap to close in this PR, and finding 2 can be a follow-up. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
lens: security S2 · reviewer: opus high (t3lens-14-s2) · read at: cf7f3b8 covered: the full diff (fork-removed-workflows.txt, fork-follow.sh, fork-workflow-triggers.cjs, fork-contracts.test.py, fork-follow.test.sh, fork-follow.yml) and what it calls or feeds: fail, on_error, workflow_paths, new_workflows, refuse_upstream_fork_named, schema_check, latest_release, the plan/push/sweep steps in fork-follow.yml, and fork-workflows.sh (NEW_WORKFLOWS, REQUIRE_NEW_OFF). I also listed the fork's registered workflows (gh api, read only) and checked every branch in the fork for the deleted files. checks:
finding: minor .github/scripts/fork-workflow-triggers.cjs:29 The parser fails open (exit 0, prints |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…tests - fork-workflow-triggers.cjs exports readTriggers and gets fork-workflow-triggers.test.cjs, like the other fork-*.cjs scripts. The test requires it, so knip no longer reports it as an unused file. - The reader refuses: a line break other than \n or \r\n (a lone \r, U+0085, U+2028, U+2029); an unindented line that is not a plain `key:` (`on :`, escaped or quoted keys, `? on`, directives, a root list, a BOM); a quote left open at the end of a line; a bracket list whose later lines are not indented more than its first, or that never closes. Block scalar text is skipped. Indent counts ASCII spaces only. - Outside events add pull_request_review, pull_request_review_comment, gollum, check_run, check_suite, status and deployment_status. - fork-follow.test.sh: plan cases for a CRLF list, the plain-text pull_request_target backstop, the new events and a decoy on: in a multi-line string. - fork-schema-check.test.cjs: drop an unused parameter that vp check reports as an error.
|
lens: correctness+security r2 · reviewer: opus high (t3lens-14-r2) · read at: 95a2264 covered: the full fix diff cf7f3b8..95a2264 (fork-workflow-triggers.cjs rewritten, the new fork-workflow-triggers.test.cjs, outside_events and new cases in fork-follow.sh / fork-follow.test.sh, fork-ci-tests.txt, the lint fix in fork-schema-check.test.cjs). I also read what it calls into: refuse_outside_workflows, workflow_paths, the list reader (CR strip, removed_re) and the fail path. I checked each S1 and S2 round-1 finding against the new code and the PR body's Follow-ups section. checks:
finding: minor .github/scripts/fork-workflow-triggers.cjs:42 A quote after an anchor or tag ( blockers: none. The round-1 reader findings are fixed at the root and fail closed. The open items are the two minors above and the two follow-ups the PR body already lists. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
- README: a merge conflict stops only pull_request, pull_request_review and pull_request_review_comment runs (GitHub's docs: pull_request_target still runs there); "removes or breaks its own copy" reworded so it does not read against the next paragraph on cancelling another PR's runs. - review_run_pr log: with several open PRs on one head it lists them all and says the head is judged once in the job for the lowest number; it no longer says "#12 judges it for #14" (the lowest may be a draft or into another base; target's "judging" line names the ones judged). Verdicts unchanged. - Tests: 9 vs 10 vs 100 (number order, not text), a PR number given as a string (or 12.0) is refused, a number listed twice is named once, the log claims no PR as judge. - Workflow test reads REVIEW_EVENTS with ast.literal_eval, so a double-quoted extra event goes red. Fixes #400 Co-authored-by: Claude Opus 5.5 <[email protected]>
…leted (#14) * fork: delete four outside-started upstream workflows and keep them deleted The fork's sweep disables upstream workflows only once GitHub lists them, so it cannot stop the first run of one an outside event starts. Owner decision 2026-11-12: delete mobile-eas-preview-fork.yml (pull_request_target), desktop-macos-preview.yml, thread-transfer-report.yml and mobile-fingerprint-label.yml (workflow_run on "CI", a name an outside PR can take). .github/fork-removed-workflows.txt lists them. fork-follow.sh reads it from the series head (missing or malformed: the plan stops), resolves a rebase conflict on listed files only by deleting them, deletes again any listed file upstream brings back, refuses a same-base series that still has one, and refuses a new upstream workflow that outside events can start (or whose triggers fork-workflow-triggers.cjs cannot read) unless the list names it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: the trigger reader fails closed on more shapes and has its own tests - fork-workflow-triggers.cjs exports readTriggers and gets fork-workflow-triggers.test.cjs, like the other fork-*.cjs scripts. The test requires it, so knip no longer reports it as an unused file. - The reader refuses: a line break other than \n or \r\n (a lone \r, U+0085, U+2028, U+2029); an unindented line that is not a plain `key:` (`on :`, escaped or quoted keys, `? on`, directives, a root list, a BOM); a quote left open at the end of a line; a bracket list whose later lines are not indented more than its first, or that never closes. Block scalar text is skipped. Indent counts ASCII spaces only. - Outside events add pull_request_review, pull_request_review_comment, gollum, check_run, check_suite, status and deployment_status. - fork-follow.test.sh: plan cases for a CRLF list, the plain-text pull_request_target backstop, the new events and a decoy on: in a multi-line string. - fork-schema-check.test.cjs: drop an unused parameter that vp check reports as an error. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
- README: a merge conflict stops only pull_request, pull_request_review and pull_request_review_comment runs (GitHub's docs: pull_request_target still runs there); "removes or breaks its own copy" reworded so it does not read against the next paragraph on cancelling another PR's runs. - review_run_pr log: with several open PRs on one head it lists them all and says the head is judged once in the job for the lowest number; it no longer says "#12 judges it for #14" (the lowest may be a draft or into another base; target's "judging" line names the ones judged). Verdicts unchanged. - Tests: 9 vs 10 vs 100 (number order, not text), a PR number given as a string (or 12.0) is refused, a number listed twice is named once, the log claims no PR as judge. - Workflow test reads REVIEW_EVENTS with ast.literal_eval, so a double-quoted extra event goes red. Fixes #400 Co-authored-by: Claude Opus 5.5 <[email protected]>
…leted (#14) * fork: delete four outside-started upstream workflows and keep them deleted The fork's sweep disables upstream workflows only once GitHub lists them, so it cannot stop the first run of one an outside event starts. Owner decision 2026-11-12: delete mobile-eas-preview-fork.yml (pull_request_target), desktop-macos-preview.yml, thread-transfer-report.yml and mobile-fingerprint-label.yml (workflow_run on "CI", a name an outside PR can take). .github/fork-removed-workflows.txt lists them. fork-follow.sh reads it from the series head (missing or malformed: the plan stops), resolves a rebase conflict on listed files only by deleting them, deletes again any listed file upstream brings back, refuses a same-base series that still has one, and refuses a new upstream workflow that outside events can start (or whose triggers fork-workflow-triggers.cjs cannot read) unless the list names it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: the trigger reader fails closed on more shapes and has its own tests - fork-workflow-triggers.cjs exports readTriggers and gets fork-workflow-triggers.test.cjs, like the other fork-*.cjs scripts. The test requires it, so knip no longer reports it as an unused file. - The reader refuses: a line break other than \n or \r\n (a lone \r, U+0085, U+2028, U+2029); an unindented line that is not a plain `key:` (`on :`, escaped or quoted keys, `? on`, directives, a root list, a BOM); a quote left open at the end of a line; a bracket list whose later lines are not indented more than its first, or that never closes. Block scalar text is skipped. Indent counts ASCII spaces only. - Outside events add pull_request_review, pull_request_review_comment, gollum, check_run, check_suite, status and deployment_status. - fork-follow.test.sh: plan cases for a CRLF list, the plain-text pull_request_target backstop, the new events and a decoy on: in a multi-line string. - fork-schema-check.test.cjs: drop an unused parameter that vp check reports as an error. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
- README: a merge conflict stops only pull_request, pull_request_review and pull_request_review_comment runs (GitHub's docs: pull_request_target still runs there); "removes or breaks its own copy" reworded so it does not read against the next paragraph on cancelling another PR's runs. - review_run_pr log: with several open PRs on one head it lists them all and says the head is judged once in the job for the lowest number; it no longer says "#12 judges it for #14" (the lowest may be a draft or into another base; target's "judging" line names the ones judged). Verdicts unchanged. - Tests: 9 vs 10 vs 100 (number order, not text), a PR number given as a string (or 12.0) is refused, a number listed twice is named once, the log claims no PR as judge. - Workflow test reads REVIEW_EVENTS with ast.literal_eval, so a double-quoted extra event goes red. Fixes #400 Co-authored-by: Claude Opus 5.5 <[email protected]>
…leted (#14) * fork: delete four outside-started upstream workflows and keep them deleted The fork's sweep disables upstream workflows only once GitHub lists them, so it cannot stop the first run of one an outside event starts. Owner decision 2026-11-12: delete mobile-eas-preview-fork.yml (pull_request_target), desktop-macos-preview.yml, thread-transfer-report.yml and mobile-fingerprint-label.yml (workflow_run on "CI", a name an outside PR can take). .github/fork-removed-workflows.txt lists them. fork-follow.sh reads it from the series head (missing or malformed: the plan stops), resolves a rebase conflict on listed files only by deleting them, deletes again any listed file upstream brings back, refuses a same-base series that still has one, and refuses a new upstream workflow that outside events can start (or whose triggers fork-workflow-triggers.cjs cannot read) unless the list names it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: the trigger reader fails closed on more shapes and has its own tests - fork-workflow-triggers.cjs exports readTriggers and gets fork-workflow-triggers.test.cjs, like the other fork-*.cjs scripts. The test requires it, so knip no longer reports it as an unused file. - The reader refuses: a line break other than \n or \r\n (a lone \r, U+0085, U+2028, U+2029); an unindented line that is not a plain `key:` (`on :`, escaped or quoted keys, `? on`, directives, a root list, a BOM); a quote left open at the end of a line; a bracket list whose later lines are not indented more than its first, or that never closes. Block scalar text is skipped. Indent counts ASCII spaces only. - Outside events add pull_request_review, pull_request_review_comment, gollum, check_run, check_suite, status and deployment_status. - fork-follow.test.sh: plan cases for a CRLF list, the plain-text pull_request_target backstop, the new events and a decoy on: in a multi-line string. - fork-schema-check.test.cjs: drop an unused parameter that vp check reports as an error. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
- README: a merge conflict stops only pull_request, pull_request_review and pull_request_review_comment runs (GitHub's docs: pull_request_target still runs there); "removes or breaks its own copy" reworded so it does not read against the next paragraph on cancelling another PR's runs. - review_run_pr log: with several open PRs on one head it lists them all and says the head is judged once in the job for the lowest number; it no longer says "#12 judges it for #14" (the lowest may be a draft or into another base; target's "judging" line names the ones judged). Verdicts unchanged. - Tests: 9 vs 10 vs 100 (number order, not text), a PR number given as a string (or 12.0) is refused, a number listed twice is named once, the log claims no PR as judge. - Workflow test reads REVIEW_EVENTS with ast.literal_eval, so a double-quoted extra event goes red. Fixes #400 Co-authored-by: Claude Opus 5.5 <[email protected]>
…leted (#14) * fork: delete four outside-started upstream workflows and keep them deleted The fork's sweep disables upstream workflows only once GitHub lists them, so it cannot stop the first run of one an outside event starts. Owner decision 2026-11-12: delete mobile-eas-preview-fork.yml (pull_request_target), desktop-macos-preview.yml, thread-transfer-report.yml and mobile-fingerprint-label.yml (workflow_run on "CI", a name an outside PR can take). .github/fork-removed-workflows.txt lists them. fork-follow.sh reads it from the series head (missing or malformed: the plan stops), resolves a rebase conflict on listed files only by deleting them, deletes again any listed file upstream brings back, refuses a same-base series that still has one, and refuses a new upstream workflow that outside events can start (or whose triggers fork-workflow-triggers.cjs cannot read) unless the list names it. Co-Authored-By: Claude Opus 5.5 <[email protected]> * fork: the trigger reader fails closed on more shapes and has its own tests - fork-workflow-triggers.cjs exports readTriggers and gets fork-workflow-triggers.test.cjs, like the other fork-*.cjs scripts. The test requires it, so knip no longer reports it as an unused file. - The reader refuses: a line break other than \n or \r\n (a lone \r, U+0085, U+2028, U+2029); an unindented line that is not a plain `key:` (`on :`, escaped or quoted keys, `? on`, directives, a root list, a BOM); a quote left open at the end of a line; a bracket list whose later lines are not indented more than its first, or that never closes. Block scalar text is skipped. Indent counts ASCII spaces only. - Outside events add pull_request_review, pull_request_review_comment, gollum, check_run, check_suite, status and deployment_status. - fork-follow.test.sh: plan cases for a CRLF list, the plain-text pull_request_target backstop, the new events and a decoy on: in a multi-line string. - fork-schema-check.test.cjs: drop an unused parameter that vp check reports as an error. --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
- README: a merge conflict stops only pull_request, pull_request_review and pull_request_review_comment runs (GitHub's docs: pull_request_target still runs there); "removes or breaks its own copy" reworded so it does not read against the next paragraph on cancelling another PR's runs. - review_run_pr log: with several open PRs on one head it lists them all and says the head is judged once in the job for the lowest number; it no longer says "#12 judges it for #14" (the lowest may be a draft or into another base; target's "judging" line names the ones judged). Verdicts unchanged. - Tests: 9 vs 10 vs 100 (number order, not text), a PR number given as a string (or 12.0) is refused, a number listed twice is named once, the log claims no PR as judge. - Workflow test reads REVIEW_EVENTS with ast.literal_eval, so a double-quoted extra event goes red. Fixes #400 Co-authored-by: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.