-
Notifications
You must be signed in to change notification settings - Fork 293
Open
Labels
Description
Analysis
Error Recap
The CI validator reports this error when validating the .github/workflows/ci-coach.lock.yml workflow file:
The workflow is not valid. .github/workflows/ci-coach.lock.yml (Line: 259, Col: 7): The permission 'copilot-requests' is not allowed
Root Cause Investigation
-
GitHub Actions Permission Model
- GitHub Actions supports a fixed set of permissions for jobs and workflows, documented at https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs.
- Each permission must be one allowed by GitHub. Custom, arbitrary, or internal names are not accepted.
-
copilot-requests Permission
- There is no documented permission named
copilot-requestsin GitHub Actions' permissions model (as of March 2026). - The only supported permissions include scopes like
contents,pull-requests,issues, etc (see full list in GitHub docs).
- There is no documented permission named
-
How Did 'copilot-requests' Get Introduced?
- Either the workflow YAML or a workflow compilation step (i.e., the
ci-coach.lock.ymlfile, possibly auto-generated from a markdown workflow) is declaringpermissions: copilot-requests: ...under a workflow or job section. - It is likely that during workflow authoring or conversion, an invalid permission name was specified—perhaps as a typo, a speculative scope, or due to a misunderstanding of available permissions, or because of copy-pasta from older or non-standard Copilot workflow content.
- Either the workflow YAML or a workflow compilation step (i.e., the
-
Actions Validator Behavior
- The validator enforces the allowed set of permissions strictly. Any unknown permission triggers this error, blocking workflow runs or merges in repos with strict policies.
Why This Happened
- There is no
copilot-requestspermission in official GitHub Actions permissions. Its use indicates a documentation gap, mistaken assumption, or improper copying from somewhere else. - If converting a markdown workflow to
.lock.yml, it suggests the toolchain allows or does not warn about invalid permission scopes, letting the error slip through to workflow validation. - If hand-edited, it may be legacy or accidental entry.
Impact
- The workflow fails validation and cannot run or be merged if workflows are checked strictly.
- This may block CI, automation, or deployments relying on the CI Coach workflow.
Proposed Remediation Plan
- Locate every use of
permissions: copilot-requests: ...in both the markdown source(s) and the compiled.lock.yml. - Remove or replace
copilot-requestswith only valid permission scopes, per GitHub documentation.- If Copilot API or workflow context is needed, check if
contentsor openId-related scopes are required instead. (There is nocopilot-requestsscope as of this writing.)
- If Copilot API or workflow context is needed, check if
- If generated by a tool:
- Update the workflow generation logic to warn about and block non-standard permission scopes that are not part of the documented set.
- Recompile and validate:
- Rerun the workflow generator (e.g.,
gh aw compile) and commit updated workflows. - Validate that no invalid permission scopes remain.
- Rerun the workflow generator (e.g.,
- Document:
- Update any developer docs and CONTRIBUTING.md to remind contributors to only use documented GitHub Actions permissions.
References
- GitHub Actions permissions docs
- CONTRIBUTING.md (community and CI guidelines)
Reactions are currently unavailable