Existing check search
Provider
GitHub
New provider name
No response
Service or product area
organization
Suggested check name
organization_default_workflow_permissions_read_only
Context and goal
- Security condition to validate: The organization default
GITHUB_TOKEN permissions granted to GitHub Actions workflows are read-only, so a workflow has to opt in to write access with an explicit permissions block.
- Why it matters: When the organization default is read-write, every workflow run in every repository starts with a token that can push commits, move tags, and edit releases. Any compromised step or dependency in any of those workflows inherits that token, which turns a single malicious action into a code integrity problem across the organization. Setting the default to read-only makes write access an explicit, reviewable decision per workflow.
- Resource, feature, or configuration involved: Organization Settings > Actions > General > Workflow permissions, exposed as
default_workflow_permissions on GET /orgs/{org}/actions/permissions/workflow.
This is an organization-level setting rather than something written in a workflow file, so it is not visible to the existing githubactions_workflow_security_scan check, which reports workflow file findings from zizmor. I searched the github provider for default_workflow_permissions, workflow_permissions, and GITHUB_TOKEN and found no coverage.
Expected behavior
- Resource or scope to evaluate: Each organization in scope.
- PASS when:
default_workflow_permissions is read.
- FAIL when:
default_workflow_permissions is write.
- Exclusions, thresholds, or edge cases: Personal accounts have no such setting, and a token without organization administration access cannot read it. In both cases the setting is unknown, so no finding should be reported for that organization rather than guessing a status.
References
Suggested severity
High
Additional implementation notes
- Required permissions or scopes: the organization Actions permissions endpoints need
admin:org for classic personal access tokens, or organization administration read for fine-grained tokens. Without it the endpoint returns 403 and the setting stays unknown.
- Other constraints: the same endpoint also returns
can_approve_pull_request_reviews, which is a separate control and would fit better as its own check rather than being folded into this one.
I would like to work on this one, and I already have an implementation ready to open as a PR: the field is read in organization_service.py through the same raw request pattern used for repository rulesets, with unit tests covering read, write, unknown, 404, and 403.
Existing check search
Provider
GitHub
New provider name
No response
Service or product area
organization
Suggested check name
organization_default_workflow_permissions_read_only
Context and goal
GITHUB_TOKENpermissions granted to GitHub Actions workflows are read-only, so a workflow has to opt in to write access with an explicitpermissionsblock.default_workflow_permissionsonGET /orgs/{org}/actions/permissions/workflow.This is an organization-level setting rather than something written in a workflow file, so it is not visible to the existing
githubactions_workflow_security_scancheck, which reports workflow file findings from zizmor. I searched thegithubprovider fordefault_workflow_permissions,workflow_permissions, andGITHUB_TOKENand found no coverage.Expected behavior
default_workflow_permissionsisread.default_workflow_permissionsiswrite.References
{"default_workflow_permissions": "read", "can_approve_pull_request_reviews": false}Suggested severity
High
Additional implementation notes
admin:orgfor classic personal access tokens, or organization administration read for fine-grained tokens. Without it the endpoint returns 403 and the setting stays unknown.can_approve_pull_request_reviews, which is a separate control and would fit better as its own check rather than being folded into this one.I would like to work on this one, and I already have an implementation ready to open as a PR: the field is read in
organization_service.pythrough the same raw request pattern used for repository rulesets, with unit tests covering read, write, unknown, 404, and 403.