ci: declare workflow-level contents: read on 4 check workflows#1040
ci: declare workflow-level contents: read on 4 check workflows#1040arpitjain099 wants to merge 1 commit into
contents: read on 4 check workflows#1040Conversation
Four workflows (code-quality, unit-tests, visual-regression-tests, build-health-checkup) just run checks and tests; no GitHub API writes from the workflows. Post-CVE-2025-30066 (tj-actions/changed-files) hardening pattern. yaml.safe_load validated. Signed-off-by: Arpit Jain <arpitjain099@gmail.com>
|
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
Reviewed by Cursor Bugbot for commit 2e75881. Configure here.
| HUSKY: 0 | ||
|
|
||
| permissions: | ||
| contents: read |
There was a problem hiding this comment.
Missing actions: write permission breaks artifact upload
Medium Severity
The workflow-level permissions: contents: read declaration causes all unspecified permissions to default to none. The actions/upload-artifact@v6 step (used on test failure) requires actions: write permission to upload artifacts. This means when visual regression tests fail, the artifact upload step will also fail, preventing developers from accessing the Playwright report and test results needed to debug failures.
Reviewed by Cursor Bugbot for commit 2e75881. Configure here.


Adds workflow-level
permissions: contents: readto four check workflows:code-quality,unit-tests,visual-regression-tests,build-health-checkup. None make GitHub API writes.Same post-CVE-2025-30066 (
tj-actions/changed-files) hardening pattern. YAML validated locally.Note
Low Risk
YAML-only CI permission tightening with no application or secret-handling changes; checkout and existing steps remain sufficient with read access.
Overview
Four CI workflows (
build-health-checkup,code-quality,unit-tests,visual-regression-tests) now declare workflow-levelpermissions: contents: read, limiting the defaultGITHUB_TOKENto repository read access (checkout and build/test steps only).This matches the existing hardening on workflows like
storybook-verceland aligns with least-privilege guidance after supply-chain incidents affecting Actions permissions. No job steps or triggers are changed—only the explicit permission block is added under each workflow’senvsection.Reviewed by Cursor Bugbot for commit 2e75881. Bugbot is set up for automated code reviews on this repo. Configure here.