-
Notifications
You must be signed in to change notification settings - Fork 34
Modernize daily-firewall-report workflow with toolset configuration #2618
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…cument permissions Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR modernizes the Daily Firewall Report workflow by replacing deprecated individual tool allow-lists with the newer toolset configuration pattern, while adding documentation to clarify permission requirements.
Key Changes:
- Migrated from explicit tool
allowedlist totoolset: [actions]configuration - Added inline comments documenting permission requirements for
actions: readandcontents: read
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
.github/workflows/daily-firewall-report.md |
Updated tool configuration to use toolset: [actions] pattern and added permission documentation comments |
.github/workflows/daily-firewall-report.lock.yml |
Generated workflow changes reflecting the toolset configuration with wildcard tool allowance and simplified Copilot CLI arguments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| "list_workflow_runs", | ||
| "download_workflow_run_artifact" | ||
| ], | ||
| "tools": ["*"], |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using wildcard tool allowance [\"*\"] grants access to all tools in the actions toolset without explicit control. Consider whether all tools in the actions toolset are necessary, or if the previous explicit list (list_workflows, list_workflow_runs, download_workflow_run_artifact) provided better security through principle of least privilege. If the toolset contains additional tools beyond these three, document why broader access is acceptable.
| "tools": ["*"], | |
| "tools": ["list_workflows", "list_workflow_runs", "download_workflow_run_artifact"], |
| mkdir -p /tmp/gh-aw/agent/ | ||
| mkdir -p /tmp/gh-aw/.copilot/logs/ | ||
| copilot --add-dir /tmp/ --add-dir /tmp/gh-aw/ --add-dir /tmp/gh-aw/agent/ --log-level all --log-dir /tmp/gh-aw/.copilot/logs/ --disable-builtin-mcps --allow-tool 'github(download_workflow_run_artifact)' --allow-tool 'github(list_workflow_runs)' --allow-tool 'github(list_workflows)' --allow-tool safeoutputs --allow-tool 'shell(cat)' --allow-tool 'shell(date)' --allow-tool 'shell(echo)' --allow-tool 'shell(grep)' --allow-tool 'shell(head)' --allow-tool 'shell(ls)' --allow-tool 'shell(pwd)' --allow-tool 'shell(sort)' --allow-tool 'shell(tail)' --allow-tool 'shell(uniq)' --allow-tool 'shell(wc)' --allow-tool 'shell(yq)' --prompt "$COPILOT_CLI_INSTRUCTION" 2>&1 | tee /tmp/gh-aw/agent-stdio.log | ||
| copilot --add-dir /tmp/ --add-dir /tmp/gh-aw/ --add-dir /tmp/gh-aw/agent/ --log-level all --log-dir /tmp/gh-aw/.copilot/logs/ --disable-builtin-mcps --allow-tool github --allow-tool safeoutputs --allow-tool 'shell(cat)' --allow-tool 'shell(date)' --allow-tool 'shell(echo)' --allow-tool 'shell(grep)' --allow-tool 'shell(head)' --allow-tool 'shell(ls)' --allow-tool 'shell(pwd)' --allow-tool 'shell(sort)' --allow-tool 'shell(tail)' --allow-tool 'shell(uniq)' --allow-tool 'shell(wc)' --allow-tool 'shell(yq)' --prompt "$COPILOT_CLI_INSTRUCTION" 2>&1 | tee /tmp/gh-aw/agent-stdio.log |
Copilot
AI
Oct 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Copilot CLI now uses --allow-tool github without scoping, which grants access to all GitHub tools rather than just the three specific operations previously allowed (download_workflow_run_artifact, list_workflow_runs, list_workflows). This represents a significant expansion of permissions. Verify this is intentional and document why broader GitHub API access is needed beyond the original three operations.
| copilot --add-dir /tmp/ --add-dir /tmp/gh-aw/ --add-dir /tmp/gh-aw/agent/ --log-level all --log-dir /tmp/gh-aw/.copilot/logs/ --disable-builtin-mcps --allow-tool github --allow-tool safeoutputs --allow-tool 'shell(cat)' --allow-tool 'shell(date)' --allow-tool 'shell(echo)' --allow-tool 'shell(grep)' --allow-tool 'shell(head)' --allow-tool 'shell(ls)' --allow-tool 'shell(pwd)' --allow-tool 'shell(sort)' --allow-tool 'shell(tail)' --allow-tool 'shell(uniq)' --allow-tool 'shell(wc)' --allow-tool 'shell(yq)' --prompt "$COPILOT_CLI_INSTRUCTION" 2>&1 | tee /tmp/gh-aw/agent-stdio.log | |
| copilot --add-dir /tmp/ --add-dir /tmp/gh-aw/ --add-dir /tmp/gh-aw/agent/ --log-level all --log-dir /tmp/gh-aw/.copilot/logs/ --disable-builtin-mcps --allow-tool 'github(download_workflow_run_artifact)' --allow-tool 'github(list_workflow_runs)' --allow-tool 'github(list_workflows)' --allow-tool safeoutputs --allow-tool 'shell(cat)' --allow-tool 'shell(date)' --allow-tool 'shell(echo)' --allow-tool 'shell(grep)' --allow-tool 'shell(head)' --allow-tool 'shell(ls)' --allow-tool 'shell(pwd)' --allow-tool 'shell(sort)' --allow-tool 'shell(tail)' --allow-tool 'shell(uniq)' --allow-tool 'shell(wc)' --allow-tool 'shell(yq)' --prompt "$COPILOT_CLI_INSTRUCTION" 2>&1 | tee /tmp/gh-aw/agent-stdio.log |
Issue #2604 reported "Permission denied and could not request permission from user" errors. Investigation reveals this is a Copilot CLI warning (not a GitHub API permission error) that occurs when the CLI encounters operations requiring user interaction in automated environments. Already correctly classified as warning in
pkg/workflow/copilot_engine.go.Changes
toolset: [actions]actions: readandcontents: readare requiredBefore:
After:
Verification
Current permissions are correct per GitHub REST API docs. The
actions: readpermission is sufficient for all workflow API operations. No additional permissions likemetadata: readneeded.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.