fix(security): fix workflow does not contain permissions alert#79
Merged
fix(security): fix workflow does not contain permissions alert#79
Conversation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Adrián Constante <ad_con.reload@proton.me>
…does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Adrián Constante <ad_con.reload@proton.me>
…does not contain permissions Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> Signed-off-by: Adrián Constante <ad_con.reload@proton.me>
Contributor
|
👋 Thanks for opening this PR, @adcondev! Here's what will happen next:
Please make sure:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request adds explicit permissions declarations to three GitHub Actions workflows to address security alerts about workflows not containing permissions. The changes follow GitHub Actions security best practices by implementing the principle of least privilege.
Key changes:
- Added explicit
permissionsblocks to three workflow files that previously lacked them - Configured minimal required permissions for each workflow based on their operations
- Aligns with the repository's existing pattern of declaring permissions (as seen in
ci.yml,dependabot-automerge.yml, andrelease.yml)
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
.github/workflows/tag-protection.yml |
Added contents: read permission for workflow that documents tag creation |
.github/workflows/pr-status-check.yml |
Added contents: read and issues: write permissions for workflow that monitors PRs and creates issues; requires additional pull-requests: read permission |
.github/workflows/examples.yml |
Added contents: read permission for workflow that builds and tests examples |
💡 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.
Description
This pull request updates the permissions configuration for several GitHub Actions workflows to follow best practices for security and access control. The main changes involve explicitly specifying the required permissions for each workflow.
Workflow permissions updates:
.github/workflows/pr-status-check.yml: Addedcontents: readandissues: writepermissions to ensure the workflow can read repository contents and update issue status as needed..github/workflows/examples.yml: Addedcontents: readpermission to restrict the workflow to only reading repository contents..github/workflows/tag-protection.yml: Addedcontents: readpermission to limit the workflow's access to repository contents.Type of Change
Component(s) Affected
composer- ESC/POS protocol composerconnection- Printer connectionscommands- ESC/POS command implementationsdocument- Document processinggraphics- Image processingprinter- Barcode generationprofile- Printer profilesservice- High-level printer servicegithub- GitHub related files and workflowsHow Has This Been Tested?
Test Configuration
Checklist
Screenshots/Examples
Breaking Changes
Additional Notes