Skip to content

fix(ci): check:workflows does not require permissions: — the #118 GITHUB_TOKEN fallback class has no regression net #1503

Description

@dezren39

Problem

check:workflows — the gate built by #1406 to turn workflow policy from convention into a regression net — does not check permissions:. #118 fixed the instances (six workflows declared no permissions and fell back to the repo-default GITHUB_TOKEN), but no gate prevents the next workflow from landing the same way: a new or edited workflow with no permissions: at workflow or job level passes every wired check while its token silently inherits the repo defaults.

Evidence (verified this run, 2026-11-03, clean laptop probe worktree at origin/main d370a29)

Why it matters

This fork's workflows hold write tokens on purpose (contents: write, pull-requests: write, id-token: write in several). The one workflow that forgets to declare permissions does not fail closed — it runs with whatever the repo default grants, and nothing in CI notices. The repo's established pattern for exactly this situation is a gate policy (#1406, #1481, #1494, #1500); permissions is the remaining #118-class policy still enforced by convention only.

Acceptance criteria

  • script/check-workflows.ts fails a workflow in which any job would run without an applicable permissions: declaration (workflow-level or job-level), with reusable-workflow caller jobs handled consistently with the existing caller-key policy.
  • script/check-workflows.test.ts gains fixture coverage: a workflow with no permissions anywhere fails, a job-level-only declaration passes, a workflow-level-only declaration passes.
  • The gate stays green on the current 29 workflows (bun script/check-workflows.ts exits 0) and bun run check:workflows remains the wired CI entry.

Activity

  1. added
    kind/ciCI/CD pipelines, workflows, and build automation
    task/triageQueue packet kind: verify, reproduce, and route this item
    source/creatorFiled by the new-issue-creator job
    priority/normalOrdinary priority (the default)
    queue/queuedHas a queued task in the Supabase agent queue
    area/ciCI, workflows, and build infrastructure
    app/scriptPackage: script (pkgs/ or apps/ in this repo)
    effort/sSmall: expected under 2 hours of work
    on Nov 3, 2026
  2. dezren39 commented on Nov 3, 2026

    @dezren39
    Author

    🤖 Agent note · state: filed

    • Agent: new-issue-creator job (new-issue-creator-opencode)
    • Session / ID: cron job new-issue-creator-opencode, run 2026-11-03T08:35Z
    • Found via: filed this run
    • Task: Filed after verifying on a clean laptop probe worktree at origin/main d370a29: bun script/check-workflows.ts exits 0 over all 29 workflows, every workflow currently declares permissions: (top- or job-level), and the gate's source contains no permissions requirement — the CI: six workflows across opencode + openchamber declare no permissions — GITHUB_TOKEN falls back to repo defaults (set) #118 fallback class is convention-only again.
    • Expectation: effort/s — extend check-workflows with a permissions policy (workflow- or job-level, reusable callers handled like the existing caller-key policy) plus fixture tests in check-workflows.test.ts.
    • Links: evidence in the issue body; queue packet packet-opencode-1503.json (hidden_files)
  3. added
    work/assignedAn agent holds this item via the queue (claimed task)
    queue/claimedA queue worker has claimed the task for this item
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 3, 2026
  4. 27 remaining items

  5. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    agent-note:v1
    state: picked-up
    queue: repo-health-opencode-pilot
    task: 6809 (small_fix, worker repo-worker-opencode, lane 3fe37e8a-c61b-419c-9e97-769ecd264d5d)
    by: openchamber-scheduled-lane
    at: 2026-11-04T05:44:42Z

    Claimed and freshly revalidated #1503, PR #1594, and the related PR #1504. The issue is open; both PRs are open and authored by dezren39 (Drewry Pope). Hard stop: do not edit or merge either Drew-owned PR.

  6. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    agent-note:v1
    state: parked
    queue: repo-health-opencode-pilot
    task: 6809 (parked, worker repo-worker-opencode, lane 3fe37e8a-c61b-419c-9e97-769ecd264d5d)
    by: openchamber-scheduled-lane
    at: 2026-11-04T05:45:26Z

    Task 6809 parked for 30 minutes because the current PR #1594 and related PR #1504 are open and Drew-authored. No edits or merge performed. Resume only after fresh evidence clears ownership restrictions, then revalidate reviews, checks, and diff.

  7. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    agent-note:v1
    state: parked
    queue: repo-health-opencode-pilot
    task: 6809 (parked, worker repo-worker-opencode, lane 3fe37e8a-c61b-419c-9e97-769ecd264d5d)
    by: openchamber-scheduled-lane
    at: 2026-11-04T06:45:33Z

    Task 6809 parked for 30 minutes after fresh verification: issue #1503 is open; PR #1594 (head 70bd31b) and related PR #1504 (head ab20d93) are open and authored by dezren39 (Drewry Pope). No edits or merge performed. Existing labels already reflect parked/assigned state. Resume only after fresh evidence clears ownership restrictions, then revalidate checks and review the diff.

  8. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    agent-note:v1
    state: picked-up
    queue: repo-health-opencode-pilot
    task: 6809 (small_fix, worker repo-worker-opencode, lane 3fe37e8a-c61b-419c-9e97-769ecd264d5d)
    by: openchamber-scheduled-lane
    at: 2026-11-04T06:41:57Z

    Claimed task 6809 and began fresh revalidation of #1503 and related PRs #1594/#1504. Prior ownership evidence was stale; no files or PRs were touched before verifying current GitHub state.

  9. added a commit that references this issue on Nov 4, 2026
  10. dezren39 commented on Nov 4, 2026

    @dezren39
    Author

    Done — PR #1594 merged (2026-11-04, task 6809)

    PR #1594 merged as 53f06c2ead83525e6033ee7b7cf967a5d8eaa149 at 2026-11-04T07:19:40Z; this issue auto-closed on merge. check:workflows now carries the permissions policy.

    Final verification at head 70bd31b26c3f88e27cdf6cbd89dff9279d5dc15c: Codex review state (summary 6622068579) reports has_any_findings: false, has_unresolved_findings: false at that head, receipt 6623187018 clean. The two P2 findings from the earlier head (4463396680 documented permission scopes, 4463396684 stale exceptions for deleted/renamed workflows) were both fixed at this head and answered on their threads; tests 34/34 and the gate green were recorded by the implementing shift. Queue/parked/work labels are being cleaned with this note.

  11. removed
    status/parkedDeliberately paused with a recorded resume condition
    queue/parkedQueue task is parked (waiting on CI, time, or an event)
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 4, 2026
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

    app/scriptPackage: script (pkgs/ or apps/ in this repo)area/ciCI, workflows, and build infrastructureeffort/sSmall: expected under 2 hours of workkind/ciCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)source/creatorFiled by the new-issue-creator jobtask/small-fixQueue packet kind: bounded fix with reproduction and targeted tests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions