Smoke Copilot: grant PR write permissions required by safe outputs - #6366
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix issues with Copilot integration
Smoke Copilot: grant PR write permissions required by safe outputs
Jul 18, 2026
lpcox
marked this pull request as ready for review
July 18, 2026 15:21
Contributor
There was a problem hiding this comment.
Pull request overview
Aligns Smoke Copilot permissions with PR safe-output actions.
Changes:
- Grants write access for issues and pull requests.
- Mirrors permissions in the compiled workflow.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/smoke-copilot.md |
Updates source permissions. |
.github/workflows/smoke-copilot.lock.yml |
Updates generated job permissions; metadata needs regeneration. |
Review details
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Files reviewed: 2/2 changed files
- Comments generated: 1
- Review effort level: Medium
Comment on lines
+447
to
+448
| issues: write | ||
| pull-requests: write |
lpcox
added a commit
that referenced
this pull request
Jul 18, 2026
PR #6366 changed the smoke-copilot agent job to issues:write / pull-requests:write, but the gh-aw compiler (v0.82.13) forbids write permissions on the agent job — writes must flow through safe-outputs' scoped app token. As a result the lock file's frontmatter_hash could not be regenerated and stayed at the read-perm value (008d5a5c), while the .md advertised write perms. This mismatch made the 'Check workflow lock file' activation step fail on every open PR (CI builds the branch merged with main), e.g. #6362, even for PRs that never touched smoke-copilot. Revert issues/pull-requests to read (safe-outputs already handles the comment/label writes) and recompile so .md and lock are consistent. Copilot-Session: 23717692-af7a-4e03-a156-5b696c3f01bd Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
Smoke Copilotworkflow was failing inExecute GitHub Copilot CLIbecause the prompt requiresadd_comment/add_labelson PR triggers, while workflow permissions only allowed read access forissuesandpull-requests. This change aligns workflow permissions with the configured safe-output behavior.Scope of change
/home/runner/work/gh-aw-firewall/gh-aw-firewall/.github/workflows/smoke-copilot.md/home/runner/work/gh-aw-firewall/gh-aw-firewall/.github/workflows/smoke-copilot.lock.ymlto keep compiled output in syncPermission alignment
issues: read→issues: writepull-requests: read→pull-requests: writecopilot-requests: writeand other permissions unchangedResulting behavior
pull_requestruns, safe outputs can now post comment/label actions as intended by the workflow prompt and post-step checks.