Add explicit GITHUB_TOKEN permissions to CI Test workflow - #74
Merged
Conversation
CodeQL actions/missing-workflow-permissions (alert #3) flagged the `build` job in .github/workflows/build.yml, which had no effective permissions block and so inherited the repository default. The job only checks out the repo, installs Ruby and the bundle, and runs rspec — it writes nothing back to GitHub — so a workflow-level `contents: read` is the least privilege that keeps it working. Placed at the workflow level (matching push_gem.yml in this repo) since build.yml has a single job. push_gem.yml and standardrb.yaml already declare permissions and are not flagged; left untouched.
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.
CodeQL actions/missing-workflow-permissions (alert #3) flagged the
buildjob in .github/workflows/build.yml, which had no effectivepermissions block and so inherited the repository default.
The job only checks out the repo, installs Ruby and the bundle, and runs
rspec — it writes nothing back to GitHub — so a workflow-level
contents: readis the least privilege that keeps it working. Placed atthe workflow level (matching push_gem.yml in this repo) since build.yml
has a single job.
push_gem.yml and standardrb.yaml already declare permissions and are not
flagged; left untouched.
Alerts resolved
actions/missing-workflow-permissions(medium) —.github/workflows/build.yml:5Verification
permissions:block (cross-checked by parsing the YAML against the alert list).actionlintoutput is byte-identical tomain— no new findings introduced.codeql.ymluntouched.