mirror of
https://github.com/291-Group/LAN-Orangutan.git
synced 2026-04-27 10:25:59 +03:00
[PR #23] [MERGED] Potential fix for code scanning alert no. 3: Workflow does not contain permissions #23
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/LAN-Orangutan#23
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/291-Group/LAN-Orangutan/pull/23
Author: @FileBay
Created: 1/2/2026
Status: ✅ Merged
Merged: 1/2/2026
Merged by: @FileBay
Base:
main← Head:alert-autofix-3📝 Commits (1)
461f075Potential fix for code scanning alert no. 3: Workflow does not contain permissions📊 Changes
1 file changed (+3 additions, -0 deletions)
View changed files
📝
.github/workflows/ci.yml(+3 -0)📄 Description
Potential fix for https://github.com/291-Group/LAN-Orangutan/security/code-scanning/3
In general, the problem is fixed by explicitly setting a
permissions:block to restrict theGITHUB_TOKENto the minimum capabilities required. Since this workflow only needs to read the repository contents to run builds and tests,contents: readis sufficient. You can set this at the workflow level so it applies to all jobs by default, without changing individual job behavior.The single best fix here is to add a top-level
permissions:section right after thename: CIline (and beforeon:) in.github/workflows/ci.yml. This will apply to all three jobs (go-lint,legacy-lint, andtest) since they do not define their ownpermissionsblocks. No imports or additional methods are needed, because this is purely a YAML configuration change for GitHub Actions. Functionality remains unchanged: checkout and all build/lint/test commands will still work withcontents: readpermissions.Suggested fixes powered by Copilot Autofix. Review carefully before merging.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.