Repository navigation
ci: add explicit permissions blocks to 11 workflows - #4495
Merged
vvbandeira merged 2 commits intoSep 1, 2026
Merged
vvbandeira merged 2 commits into
vvbandeira merged 2 commits into
Conversation
CodeQL flagged 6 workflows with no permissions block, so their GITHUB_TOKEN gets the repo default scope. Each workflow only checks out code and runs a local lint, format, or test step; none of them pushes or writes to GitHub. Add an explicit contents: read block to each, so a compromised step cannot write past what the workflow needs. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
CodeQL flagged 5 workflows with no permissions block, so their GITHUB_TOKEN gets the repo default scope, wider than what each workflow's push or publish step needs. Add an explicit permissions block per workflow, matched to its own steps: - github-actions-cron-update-OR.yml: contents write, pull-requests write, and issues write (the PR gets a label, which GitHub serves through the issues API even for a PR). - github-actions-cron-update-yosys.yml: contents write and pull-requests write, same PR flow with no label. - github-actions-manual-update-rules.yml: contents write, for its direct commit and push. - github-actions-update-rules.yml: contents write and pull-requests write, for its two push paths. - github-actions-publish-docker-images.yml: one top-level block covering all 3 jobs, contents read and packages write, since all 3 push images to GHCR under the same scope. No workflow's steps change; this only makes each one's existing GITHUB_TOKEN use explicit instead of relying on the org default. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
Contributor
|
Note Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported. |
Member
🔍 QoR checkMetrics reflect the PR merge build — i.e. what will land on the target branch. Advisory — results are log-only and do not affect build status. The authoritative QoR gate remains the local rules-file check. Commit 62 design(s) checked — 10 with regression(s), 0 without a comparable baseline.
❌ asap7/mock-alu base — 1 failing metric(s)
❌ nangate45/ibex base — 1 failing metric(s)
❌ nangate45/mempool_group base — 3 failing metric(s)
❌ nangate45/swerv_wrapper base — 3 failing metric(s)
❌ sky130hd/chameleon base — 6 failing metric(s)
❌ sky130hd/jpeg base — 2 failing metric(s)
❌ sky130hd/riscv32i base — 2 failing metric(s)
❌ sky130hs/ibex base — 3 failing metric(s)
❌ sky130hs/jpeg base — 1 failing metric(s)
❌ sky130hs/riscv32i base — 3 failing metric(s)
|
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.
Summary
missing-workflow-permissionsfindings: none of 11 workflows declares apermissions:block, so each runs with the repo/org defaultGITHUB_TOKENscope, wider than any of them need.permissions:block to each of the 11 workflows, matched to what its own steps do (checkout-only vs. pushing commits, opening PRs, publishing GHCR images). No workflow's runtime behavior changes.contents: readonly) and write-capable workflows (scoped to their push/PR/publish needs).Test plan
actionlintpasses on all 11 edited files (checked locally, clean apart from 2 pre-existingset-outputdeprecation warnings unrelated to this change).missing-workflow-permissionsfindings clear.