Skip to content

ci: add explicit permissions blocks to 11 workflows - #4495

Merged
vvbandeira merged 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:codeql-permissions-fix
Sep 1, 2026
Merged

vvbandeira merged 2 commits into
The-OpenROAD-Project:masterfrom
The-OpenROAD-Project-staging:codeql-permissions-fix

Conversation

@vvbandeira

Copy link
Copy Markdown
Member

Summary

  • CodeQL's dry-run scan (docker_shell: connect container to host network #1818) found 13 missing-workflow-permissions findings: none of 11 workflows declares a permissions: block, so each runs with the repo/org default GITHUB_TOKEN scope, wider than any of them need.
  • Add an explicit, minimally scoped 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.
  • Split into two commits: read-only workflows (contents: read only) and write-capable workflows (scoped to their push/PR/publish needs).

Test plan

  • actionlint passes on all 11 edited files (checked locally, clean apart from 2 pre-existing set-output deprecation warnings unrelated to this change).
  • Re-run CodeQL's dry-run workflow (from docker_shell: connect container to host network #1818) on this branch and confirm the 13 missing-workflow-permissions findings clear.
  • Confirm each workflow's own steps still succeed on its next real trigger (cron/dispatch/push), since none can be exercised end-to-end before merge.

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>
@vvbandeira vvbandeira self-assigned this Sep 1, 2026
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@vvbandeira
vvbandeira merged commit 774ff75 into The-OpenROAD-Project:master Sep 1, 2026
6 of 8 checks passed
@vvbandeira
vvbandeira deleted the codeql-permissions-fix branch September 1, 2026 22:24
@openroad-ci

Copy link
Copy Markdown
Member

🔍 QoR check

Metrics 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 82d09ca · Jenkins build #1 · Baseline: build

62 design(s) checked — 10 with regression(s), 0 without a comparable baseline.
Design Variant Verdict local vs inline passed / failed / missing
asap7/aes base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes-block base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes-mbff base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/aes_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/cva6 base ✅ pass ✅ MATCH 12 / 0 / 0
asap7/ethmac base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/ethmac_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/gcd-ccs base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/jpeg_lvt base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/mock-alu base ❌ fail ⚠️ MISMATCH 24 / 1 / 0
asap7/mock-cpu base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/riscv32i-mock-sram base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/swerv_wrapper base ✅ pass ✅ MATCH 25 / 0 / 0
asap7/uart base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/aes base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/aes-hybrid base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
gf180/uart-blocks base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/aes base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
gt2n/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/aes base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/i2c-gpio-expander base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/riscv32i base ✅ pass ✅ MATCH 25 / 0 / 0
ihp-sg13g2/spi base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/aes base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ariane133 base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ariane136 base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/black_parrot base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/bp_be_top base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/bp_fe_top base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/bp_multi_top base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/cva6 base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/dynamic_node base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/ibex base ❌ fail ⚠️ MISMATCH 24 / 1 / 0
nangate45/jpeg base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/mempool_group base ❌ fail ⚠️ MISMATCH 9 / 3 / 0
nangate45/swerv base ✅ pass ✅ MATCH 25 / 0 / 0
nangate45/swerv_wrapper base ❌ fail ⚠️ MISMATCH 22 / 3 / 0
nangate45/tinyRocket base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/aes base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/chameleon base ❌ fail ⚠️ MISMATCH 19 / 6 / 0
sky130hd/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/ibex base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/jpeg base ❌ fail ⚠️ MISMATCH 23 / 2 / 0
sky130hd/microwatt base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hd/riscv32i base ❌ fail ⚠️ MISMATCH 23 / 2 / 0
sky130hs/aes base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/gcd base ✅ pass ✅ MATCH 25 / 0 / 0
sky130hs/ibex base ❌ fail ⚠️ MISMATCH 22 / 3 / 0
sky130hs/jpeg base ❌ fail ⚠️ MISMATCH 24 / 1 / 0
sky130hs/riscv32i base ❌ fail ⚠️ MISMATCH 22 / 3 / 0
❌ asap7/mock-alu base — 1 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -17900.6 -17471 2.4589319443649478% -17531.0 PeriodPadding 20%
❌ nangate45/ibex base — 1 failing metric(s)
Metric target base delta limit band
finish__timing__setup__tns -1.37097 -0.639933 114.23649038258692% -1.079933 PeriodPadding 20%
❌ nangate45/mempool_group base — 3 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -11521.7 -11431.7 0.7872844808733609% -11432.3 PeriodPadding 20%
finish__timing__setup__tns -11778.1 -11436.4 2.9878283375887515% -11437.0 PeriodPadding 20%
globalroute__timing__setup__tns -11791.2 -11499.3 2.5384153818058492% -11499.9 PeriodPadding 20%
❌ nangate45/swerv_wrapper base — 3 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -466.276 -418.569 11.3976429214777% -418.969 PeriodPadding 20%
finish__timing__setup__tns -514.421 -386.759 33.00815236361662% -387.159 PeriodPadding 20%
globalroute__timing__setup__tns -544.137 -422.165 28.89202089230514% -422.565 PeriodPadding 20%
❌ sky130hd/chameleon base — 6 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -171.306 -133.679 28.14727818131494% -134.279 PeriodPadding 20%
detailedroute__antenna__violating__nets 1 0 — 0.0 Padding 30%
detailedroute__antenna_diodes_count 162 119 36.134453781512605% 119.119 Metric 0.1%
finish__timing__setup__tns -145.049 -84.9843 70.6774074740864% -85.5843 PeriodPadding 20%
globalroute__antenna_diodes_count 181 138 31.159420289855074% 138.138 Metric 0.1%
globalroute__timing__setup__tns -150.876 -91.9306 64.1194553282585% -92.5306 PeriodPadding 20%
❌ sky130hd/jpeg base — 2 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -122.743 -111.478 10.105132851324925% -112.478 PeriodPadding 20%
globalroute__timing__setup__tns -172.569 -168 2.719642857142857% -169.0 PeriodPadding 20%
❌ sky130hd/riscv32i base — 2 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -60.821 -55.8465 8.907451675575013% -57.0465 PeriodPadding 20%
globalroute__timing__setup__tns -103.769 -102.214 1.5213180190580546% -103.414 PeriodPadding 20%
❌ sky130hs/ibex base — 3 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -1.96242 0 — -1.4 PeriodPadding 20%
finish__timing__setup__tns -39.3099 -14.057 179.64643949633634% -15.457 PeriodPadding 20%
globalroute__timing__setup__tns -119.866 -77.3387 54.98838227174752% -78.7387 PeriodPadding 20%
❌ sky130hs/jpeg base — 1 failing metric(s)
Metric target base delta limit band
globalroute__antenna_diodes_count 111 8 1287.5% 100 Metric 0.1%
❌ sky130hs/riscv32i base — 3 failing metric(s)
Metric target base delta limit band
cts__timing__setup__tns -121.456 -33.4452 263.14927104636837% -34.2452 PeriodPadding 20%
finish__timing__setup__tns -281.625 -137.948 104.15301417925595% -138.748 PeriodPadding 20%
globalroute__timing__setup__tns -447.723 -354.108 26.436849774645022% -354.908 PeriodPadding 20%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants