-
Notifications
You must be signed in to change notification settings - Fork 34
Fix workflow compilation errors by using read-only permissions with safe-outputs #9269
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
Fix workflow compilation errors by using read-only permissions with safe-outputs #9269
Conversation
…permissions in strict mode Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot change discussions: write to discussions: true. Remove feature flag. |
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
| strict: true | ||
| tracker-id: daily-issues-report | ||
| features: | ||
| dangerous-permissions-write: true |
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.
@copilot use read permissions instead
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.
Done! Changed all 4 workflows to use read permissions instead. The safe-outputs system will automatically grant write permissions to the consolidation job for creating discussions. This follows the principle of least privilege - the agent job has minimal read-only permissions. (commit ef0cbbf)
…ring dangerous-permissions-write flag Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Done! Changed I also implemented full support for boolean
All workflows now compile successfully. (commit a2d21fe) |
…ations Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
|
@copilot Do not add support for Boolean, specify discussions: read |
…ditional code changes Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Four workflows using
strict: truemode with write permissions were failing compilation. This PR fixes the compilation errors by changing workflows to use read-only permissions and relying on the safe-outputs system to handle write operations securely.Changes
Workflow Updates:
discussions: writetodiscussions: readin 3 workflowscontents/issues/pull-requests: writetoreadin 1 workflowAffected workflows:
daily-issues-report.md- Daily repository issues analysisdaily-performance-summary.md- Daily performance metricsexample-permissions-warning.md- Permissions exampleorg-health-report.md- Organization health reportsUpdated permissions syntax:
Security Model
The workflows now follow the principle of least privilege:
This architecture minimizes the attack surface by granting the main agent job only read permissions, while the safe-outputs consolidation job handles all write operations securely.
Benefits
These workflows create GitHub Discussions for automated reporting. The safe-outputs system handles the write operations, allowing the main agent job to run with minimal read-only permissions.
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.