Potential fix for code scanning alert no. 604: Workflow does not contain permissions - #1277
Open
derrabauke wants to merge 1 commit into
Open
Potential fix for code scanning alert no. 604: Workflow does not contain permissions#1277derrabauke wants to merge 1 commit into
derrabauke wants to merge 1 commit into
Conversation
Contributor
we do OSS, |
Workflow does not contain permissions
derrabauke
force-pushed
the
alert-autofix-604
branch
from
April 23, 2026 09:13
9b43c9c to
fdb8848
Compare
Member
Author
nice! Thx for the hint. Seemed a bit counter-intuitive but makes sense and works. ✨ |
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.
Potential fix for https://github.com/adfinis/ember-validated-form/security/code-scanning/604
In general, the fix is to explicitly define a
permissionsblock that grants only the minimum required scopes for theGITHUB_TOKEN. Since these jobs only check out code, install dependencies, and run lint/tests, they only need read access to repository contents; they do not need write access or special scopes likepull-requestsorissues.The simplest, non-disruptive fix is to add a top-level
permissionssection to.github/workflows/ci.yml(so it applies to all jobs) withcontents: read. This documents the intended permissions, prevents accidental escalation if repo/org defaults change, and does not alter current behavior for legitimate steps because none of them need write privileges.Concretely:
.github/workflows/ci.yml.name: CIline (or anywhere at the top-level beforejobs:), add:Suggested fixes powered by Copilot Autofix. Review carefully before merging.