You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[TASK] Restrict workflow token permissions across org repositories #96
A Moat security audit (v1.0.9, 2026-07-08) found 101 workflows across 29 org repositories that either grant write scopes or omit a top-level permissions: block entirely.
Why this matters
Without a declared permissions: block, every step in the workflow - including third-party actions - runs with the default token scopes. A compromised or typo'd third-party action then inherits far more access than the workflow needs. Restricting each workflow to the minimum scopes turns a hijacked action from a code-push primitive into a read-only nuisance.
Note: the org-level "Workflow permissions" default is already read-only (that check passes), so the exposure is workflows that explicitly request write scopes broader than they need, or rely on defaults without declaring intent.
Scope
All 29 repositories with workflows are affected, including this one. Full list via moat inference-gateway --verbose.
Suggested fix
For each .github/workflows/*.yml:
Add a top-level permissions: block with the minimum scopes needed.
For read-only workflows:
permissions:
contents: read
For workflows that need write access (release, PR-opening bots), scope the write grant to the specific permission (contents: write, pull-requests: write) rather than omitting the block.
This can be swept mechanically repo-by-repo; the reusable bot workflows (claude.yml, infer.yml, codex.yml) and the fan-out orchestrators in this repo are the highest-leverage place to start since they run with App tokens across the whole org.
Source
Moat check: repositories_workflow_permissions_are_restricted (FAIL, 29/29 repos with workflows).
This repo (.github): already compliant - all 15 workflows declare a top-level permissions: block; only release.yml grants write (required by semantic-release).
adl-generated workflows (agent repos' claude.yml/ci.yml, marked DO NOT EDIT): cannot be patched in place - fix goes in the templates, tracked in inference-gateway/adl-cli#251. Agents pick it up on the next regen cycle.
Remaining flagged workflows are explicit, job-scoped write grants (release/bot workflows) that legitimately need them.
Activity
edenreich commentedon Jul 8, 2026
Progress update:
This repo (
.github): already compliant - all 15 workflows declare a top-levelpermissions:block; onlyrelease.ymlgrants write (required by semantic-release).Hand-maintained workflows - PRs open adding top-level
permissions: contents: read(12 files, 10 repos):adl-generated workflows (agent repos'
claude.yml/ci.yml, markedDO NOT EDIT): cannot be patched in place - fix goes in the templates, tracked in inference-gateway/adl-cli#251. Agents pick it up on the next regen cycle.Remaining flagged workflows are explicit, job-scoped write grants (release/bot workflows) that legitimately need them.