Conversation
…orkflows Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Replace read-all permissions with minimal permissions in workflows
Replace read-all permissions with explicit minimal permissions in 7 workflows
Nov 1, 2025
pelikhan
approved these changes
Nov 1, 2025
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the broad permissions: read-all declaration with explicit, granular read permissions across multiple GitHub Agentic Workflow files. This change follows the principle of least privilege by only granting the specific permissions that each workflow needs.
Key Changes
- Replaces
permissions: read-allwith explicit permission lists - Applies consistent permission patterns across all affected workflows
- Updates both source
.mdfiles and their compiled.lock.ymlcounterparts
Reviewed Changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/test-timestamp-js.md | Adds explicit read permissions for contents, issues, and pull-requests |
| .github/workflows/technical-doc-writer.md | Replaces read-all with granular permissions (contents, pull-requests, issues, actions) |
| .github/workflows/technical-doc-writer.lock.yml | Compiled output reflecting the explicit permissions in both workflow and agent job levels |
| .github/workflows/smoke-detector.md | Replaces read-all with specific read permissions including actions access |
| .github/workflows/smoke-detector.lock.yml | Compiled output with explicit permissions at workflow and agent job levels |
| .github/workflows/daily-news.md | Adds granular read permissions including discussions access |
| .github/workflows/daily-news.lock.yml | Compiled output reflecting the explicit permission configuration |
| .github/workflows/copilot-pr-prompt-analysis.md | Replaces read-all with specific read permissions (contents, issues, pull-requests, actions) |
| .github/workflows/copilot-pr-prompt-analysis.lock.yml | Compiled output with explicit permissions in workflow and agent job |
| .github/workflows/copilot-agent-analysis.md | Replaces read-all with granular read permissions matching workflow needs |
| .github/workflows/copilot-agent-analysis.lock.yml | Compiled output reflecting the explicit permission changes |
| .github/workflows/ci-doctor.md | Adds specific read permissions for contents, issues, pull-requests, and actions |
| .github/workflows/ci-doctor.lock.yml | Compiled output with explicit permissions at workflow and agent job levels |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Fixes MEDIUM severity excessive-permissions vulnerabilities identified by zizmor security scanner. The
permissions: read-allpattern grants overly broad access that increases risk of credential theft or unauthorized actions if tokens are compromised.Changes
Replaced
permissions: read-allwith explicit minimal permissions in 7 workflows:Each workflow now specifies only required permissions based on its tools and safe-outputs configuration:
The
issuesandpull-requestsread permissions are required by default GitHub MCP toolsets. Theactionsread permission enables workflows to read workflow run data. Additional permissions likediscussions: readare specified only where needed (e.g., daily-news.md).All
.lock.ymlfiles regenerated. Zizmor scan confirms no excessive-permissions issues remain for these workflows.Closes #2950
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.