GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked · Issue #1759 · developing-today-forks/opencode

fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked #1759

New issue
Copy link
New issue
Copy link
Closed
#2105
Closed
fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked#1759
#2105
Copy link
Labels
app/scriptPackage: script (pkgs/ or apps/ in this repo)area/ciCI, workflows, and build infrastructurekind/ciCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

Description

@developing-today
developing-today
bot
opened on Nov 5, 2026
Issue body actions

Finding

The permissions policy PR #1594 added to check:workflows (for #1503) validates only the top-level permissions: block. No job-level permissions: block ever has its content checked against the policy — and reusable-workflow caller jobs are not even gated on having a block:

  • In script/check-workflows.ts (current main e28985a80863), workflowViolations validates scope keys (PERMISSION_SCOPES), levels (PERMISSION_LEVELS), the scalar-shorthand ban, and the write-only-on-contents rule only inside the top-level branch (lines ~210–258).
  • Caller jobs: lines 267–277 — a job with uses: is checked only for its key names against REUSABLE_WORKFLOW_CALLER_KEYS (which includes permissions) and then continues, before any permissions handling. The comment at lines 265–266 says a caller job's block "still counts as using a baseline exception," but nothing checks that the job is in JOB_PERMISSION_EXCEPTIONS — any caller job may declare any permissions: content, including write-all or issues: write, and check:workflows reports no violation.
  • Non-caller jobs: the block at lines ~279–288 checks only presence against JOB_PERMISSION_EXCEPTIONS. A baselined exception job (e.g. the 13 entries in JOB_PERMISSION_EXCEPTIONS) may change its block to any scopes/levels — scalar write-all included — with no violation, even though the top-level branch explicitly calls the scalar shorthand a grant that "never satisfies the least-privilege posture."

Evidence

  • Source PR: feat(ci): add a permissions policy to check:workflows (#1503) #1594 (merged 2026-11-04T07:19:40Z, merge commit 53f06c2ead835, commits 006592843a06, 70bd31b26c3f) — its body states the policy as "every workflow must declare a top-level permissions: mapping in the least-privilege posture" with scope/level/write rules; the job-level content path was not implemented.
  • Current main verification (this run): re-read script/check-workflows.ts at main e28985a80863 twice — the caller branch still continues at line 277 ahead of the no-job-level-permissions check, and no code path calls the scope/level/write validation on a job-level value. PERMISSION_SCOPES / PERMISSION_LEVELS / WRITE_PERMITTED_SCOPES are referenced only for the top-level block.
  • Live posture today is conformant by inspection (e.g. agents.yml's job-level block mirrors its top level), so this is a gate hole, not a live over-grant: the next caller or exception job that widens its block is invisible to the gate fix(ci): check:workflows does not require permissions: — the #118 GITHUB_TOKEN fallback class has no regression net #1503 created to catch exactly this class (CI: six workflows across opencode + openchamber declare no permissions — GITHUB_TOKEN falls back to repo defaults (set) #118: GITHUB_TOKEN falling back to broader grants than intended).
  • Dedupe: searched open + closed issues for caller permissions, job-level permissions, check-workflows (2026-11-05). fix(ci): check:workflows does not require permissions: — the #118 GITHUB_TOKEN fallback class has no regression net #1503 (closed) is the parent policy; open PR fix(ci): require permissions on every non-reusable workflow job #1504 is the superseded weaker variant whose closure is tracked by open chore(ci): close superseded open PRs #1497, #1566, #1504 — work landed via #1576 and #1594 #1654 — neither covers validating job-level content in the landed policy. chore(ci): close superseded open PRs #1497, #1566, #1504 — work landed via #1576 and #1594 #1654 does not mention this gap.

Why it matters

The #1503 policy's value is that a broader-than-intended GITHUB_TOKEN grant cannot land silently. At job level it still can: job-level blocks replace the top-level grant wholesale for that job (the PR's own words), so the unchecked path is precisely the one that determines the effective grant for caller jobs and for the sync/gate jobs that hold today's issues/pull-requests/id-token write exceptions. A one-line edit widening any of those blocks — or a new caller job declaring permissions: write-all — passes bun run check:workflows clean.

Acceptance criteria

  • workflowViolations applies the same content validation to every job-level permissions: value it permits (caller jobs and JOB_PERMISSION_EXCEPTIONS jobs): mapping form only (no write-all/read-all scalar), scope keys in PERMISSION_SCOPES, levels in PERMISSION_LEVELS.
  • Job-level write grants beyond contents require a named baseline: either the existing exception maps gain the granted scopes per job, or an equivalent ratcheted record — an unbaselined job-level write grant is a violation, and a baselined grant that disappears is a stale-exception violation, mirroring the top-level rules.
  • A caller job declaring permissions: without a baseline entry is a violation (per the line 265–266 comment's stated intent), or the comment and policy text are corrected to say caller blocks are intentionally unbaselined — one of the two, not the current mismatch.
  • Tests in script/check-workflows.test.ts cover: caller job with permissions: write-all flagged; caller job with an unbaselined issues: write flagged; excepted job whose block widens beyond its baseline flagged; today's real workflows still pass collectViolations with no new violations.

Found by pr-diff-review lane B while reviewing PRs #1566–#1596 (2026-11-05 run), PR #1594 in particular.

Activity

  1. developing-today
    added
    kind/ciCI/CD pipelines, workflows, and build automation
    task/triageQueue packet kind: verify, reproduce, and route this item
    status/needs-triageNot yet triaged; needs a first look
    source/pr-diff-reviewFiled by the pr-diff-review 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)
    on Nov 5, 2026
  2. developing-today commented on Nov 5, 2026

    @developing-today
    developing-todayBot
    on Nov 5, 2026 – with developing.today
    Author
    More actions

    🤖 Agent note · filed

    • Agent: pr-diff-review-b
    • Session / ID: cron pr-diff-review-b run 2026-11-05 11:18 CST
    • Found via: filed this run
    • Task: Filed this issue after reviewing PRs fix(ci): disposition effect-patterns violations and wire scan into CI #1566–fix(www): regenerate OpenAPI copies from protocol (#1593) #1596 in this run's developing-today-forks/opencode batch (watermark 1565 → 1596): PR feat(ci): add a permissions policy to check:workflows (#1503) #1594's check:workflows permissions policy validates only the top-level block — on current main e28985a80863, script/check-workflows.ts caller jobs continue at line 277 before any permissions handling (their blocks are never content-checked and never checked against JOB_PERMISSION_EXCEPTIONS, despite the line 265–266 comment), and baselined exception jobs are presence-checked only, so a job-level permissions: write-all or an unbaselined write grant passes the gate. Filed via the developing.today GitHub App (fleet-paperwork) after the user token hit the secondary content-creation rate limit (403 at 2026-11-05T17:48Z); verified by independent REST readback.
    • Expectation: effort s — task/triage first per queue protocol: confirm the intended job-level baseline shape (exception maps carrying scopes per job), then route the validation + tests.
    • Links: source PR feat(ci): add a permissions policy to check:workflows (#1503) #1594; evidence body pr-review-b-2026-11-05-1118-cst/issue-caller-permissions-body.md in the goal's hidden_files; queue packet packet-opencode-1759.json
  3. dezren39 commented on Nov 5, 2026

    @dezren39
    dezren39
    on Nov 5, 2026
    More actions

    Agent note - handed off

    • Agent: opencode claimant (opencode-claimant)
    • Session / ID: queue task 10680; bound session ses_e5e5305dd36ffeZw1YP1MbM7Lz
    • Found via: queue task handoff on the opencode execution lane
    • Task: Triage fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked #1759: fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the fix(ci): check:workflows does not require permissions: — the #118 GITHUB_TOKEN fallback class has no regression net #1503 poli
    • Expectation: the bound worker session works task 10680 to a terminal queue state and must not claim another task. It revalidates the issue/PR before acting.
    • Links: fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked #1759
  4. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    More actions

    Agent note · triaged — CONFIRMED verbatim on current main; fix now routed as queue task 12759

    • Agent: repo-worker-opencode (queue worker, lane opencode-a)
    • Session / ID: queue task 11851, repo-queue-worker-shift-opencode run 2026-11-07

    Fresh verification this shift (script/check-workflows.ts, current main): caller jobs are key-checked and then continue (:267-277) before any permissions handling; non-caller exception jobs are presence-checked only against a name-only JOB_PERMISSION_EXCEPTIONS set (:259, :279-288). The bypass is present exactly as filed. (The earlier triage, task 10680, was handed off 2026-11-05 and left no verdict — the gap the code#7016 audit caught.)

    Routing: fix packet enqueued as queue task 12759 (repo-health-opencode-pilot, dedupe repo-health:v1:fix:...:issue:1759), using the baseline shape the filing note names — exception maps carrying scopes per job: migrate the 13 entries to per-job allowed scopes/levels, content-validate every job-level block with the top-level branch's rules, require caller jobs to be baselined and within their entry, and keep the stale-exception shrink rules working. Tests cover caller write-all, unbaselined caller, over-scope exception, scalar shorthand, and conforming cases; the repo's own workflows must pass the tightened check (real over-grants dispositioned in the PR).

    Verdict: issue stays OPEN for the fix. No blockers, no Drew decision needed.

  5. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    More actions

    Correction to the triage note above (comment 6717117794): the fix packet was enqueued as queue task 12760, not 12759 — the note was written before the enqueue returned its id. Everything else in that note stands.

  6. dezren39
    added
    work/assignedAn agent holds this item via the queue (claimed task)
    queue/claimedA queue worker has claimed the task for this item
    status/in-progressActively being worked
    and removed
    status/needs-triageNot yet triaged; needs a first look
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 8, 2026
  7. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    More actions

    🤖 Agent note · picked up

    • Agent: repo-worker-opencode (OpenChamber scheduled lane)
    • Session / ID: OpenCode ses_e5e45e668edffeulmoVomHmhse · queue task 12760
    • Found via: atomic claim from repo-health-opencode-pilot, lane 3fe37e8a-c61b-419c-9e97-769ecd264d5d
    • Task: Validate workflow job-level permissions content against per-job least-privilege baselines for issue fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked #1759.
    • Expectation: Reproduce the policy gap, implement content-carrying exceptions and validation for caller and non-caller jobs, add tests, then run the workflow check and targeted tests.
    • Links: fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked #1759 · policy issue fix(ci): check:workflows does not require permissions: — the #118 GITHUB_TOKEN fallback class has no regression net #1503
  8. dezren39
    added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    status/in-progressActively being worked
    queue/claimedA queue worker has claimed the task for this item
    work/assignedAn agent holds this item via the queue (claimed task)
    on Nov 8, 2026
  9. dezren39 commented on Nov 8, 2026

    @dezren39
    dezren39
    on Nov 8, 2026
    More actions

    🤖 Agent note · handed off

    • Agent: repo-worker-opencode (OpenChamber scheduled lane)
    • Session / ID: OpenCode ses_e5e45e668edffeulmoVomHmhse · queue task 12760
    • Task: Tighten check:workflows job-level permission validation for fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked #1759.
    • Outcome: Code is committed as dcf3b88d17 and pushed to queue/12760-1759-job-level-permissions. Targeted tests (10 reruns), workflow check, oxlint, formatting, and diff checks pass. gh pr create was blocked before creating a PR by the GitHub GraphQL API rate-limit response; the queue task was failed as transient and is requeued for 2026-11-08T08:42:21Z.
    • Resume brief: Reclaim task 12760, verify the branch still has commit dcf3b88d17, retry creating the PR with Closes #1759, then inspect checks. No PR currently exists.
    • Links: fix(ci): check:workflows never validates job-level permissions content — caller jobs bypass the #1503 policy entirely, excepted jobs unchecked #1759 · branch queue/12760-1759-job-level-permissions
  10. dezren39
    added a commit that references this issue on Nov 8, 2026

    Merge pull request #2105 from developing-today-forks/queue/12760-1759…

    426c71b
  11. dezren39
    closed this as completedin #2105on Nov 8, 2026
  12. dezren39
    removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Nov 8, 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 infrastructurekind/ciCI/CD pipelines, workflows, and build automationpriority/normalOrdinary priority (the default)source/pr-diff-reviewFiled by the pr-diff-review jobtask/triageQueue packet kind: verify, reproduce, and route this item

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.