Repository navigation
chore: scope workflow permissions to least privilege (SEC-167) - #6911
Conversation
🔒 Scanned for secrets using gitleaks 8.30.1
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #6911 +/- ##
==========================================
- Coverage 80.05% 79.72% -0.34%
==========================================
Files 565 565
Lines 63324 63324
==========================================
- Hits 50696 50482 -214
- Misses 9644 9853 +209
- Partials 2984 2989 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Mrsandeep27
left a comment
There was a problem hiding this comment.
Right move — workflow-level least privilege with job-level escalation is the GitHub-recommended pattern. Two thoughts:
1. Only one job (`run-release`) gets `contents: write` back. Worth confirming all other jobs in this file (`check-schedule`, plus any earlier job from the un-shown portion of the diff) actually only need `contents: read`. `step-security/harden-runner` warns when a job over-asks; if any of them write tags, push, or create branches, the workflow-level cap will silently break them.
2. Audit the other workflows in this repo for the same hardening. Token compromise is most useful in workflows that don't touch the release path — `pr-checks.yml`, `scheduled-anything.yml` etc. — because attackers can stage their access there. Worth a follow-up SEC ticket to sweep all `.github/workflows/` files, not just this one.
3. `permissions: contents: read` at workflow level — since this is the GitHub Actions default for public repos but not for some org-level configurations (e.g. write-by-default), explicit is the right move. Bonus: also consider `pull-requests: read` if the workflow ever inspects PR data — leaving it unspecified means it inherits whatever the org settings allow.
LGTM on the change itself.
lokey
left a comment
There was a problem hiding this comment.
Approved: SEC-167 workflow-only changes
🤖 I have created a release *beep* *boop* --- ## [1.74.0-rc.1](v1.73.0...v1.74.0-rc.1) (2026-04-27) ### Features * add configurable batch size for bulk inserting failed rsources records ([#6873](#6873)) ([d8f6ea0](d8f6ea0)) * add native deletion support for identity removal in gzip files ([#6896](#6896)) ([c1e27d0](c1e27d0)) * deep job pickups when no results cache is cold ([#6850](#6850)) ([03e9d88](03e9d88)) * **jobsdb:** improve migration compaction ([#6844](#6844)) ([b7f2b9f](b7f2b9f)) ### Bug Fixes * add correct host for salesforceBU destination ([#6906](#6906)) ([2430cb4](2430cb4)) * batch router drained events metrics ([#6898](#6898)) ([c5b2927](c5b2927)) * build action failing ([#6899](#6899)) ([691a812](691a812)) * snowpipe struck scenarios ([#6895](#6895)) ([35b07a8](35b07a8)) * use tid instead of vid ([#6908](#6908)) ([954dcf7](954dcf7)) ### Miscellaneous * avoid marshalling proc error job payloads ([#6872](#6872)) ([145826b](145826b)) * bump build-scan-push-action from v2.1.0 to v2.2.0 ([#6903](#6903)) ([e917f9b](e917f9b)) * contract tests for dns regressions and overrides ([#6864](#6864)) ([b105678](b105678)) * pin and bump action refs (SEC-171) ([#6863](#6863)) ([8089953](8089953)) * pytransformer pooling contract tests ([#6883](#6883)) ([0530c8c](0530c8c)) * scope workflow permissions to least privilege (SEC-167) ([#6911](#6911)) ([5600dbe](5600dbe)) * update Slack notification method in scheduled release workflow ([#6879](#6879)) ([3b67dcb](3b67dcb)) * **vuln:** zizmor --fix=all findings (SEC-199) ([#6905](#6905)) ([d8cc34f](d8cc34f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [1.74.0](v1.73.0...v1.74.0) (2026-04-27) ### Features * add configurable batch size for bulk inserting failed rsources records ([#6873](#6873)) ([d8f6ea0](d8f6ea0)) * add native deletion support for identity removal in gzip files ([#6896](#6896)) ([c1e27d0](c1e27d0)) * deep job pickups when no results cache is cold ([#6850](#6850)) ([03e9d88](03e9d88)) * **jobsdb:** improve migration compaction ([#6844](#6844)) ([b7f2b9f](b7f2b9f)) ### Bug Fixes * add correct host for salesforceBU destination ([#6906](#6906)) ([2430cb4](2430cb4)) * batch router drained events metrics ([#6898](#6898)) ([c5b2927](c5b2927)) * build action failing ([#6899](#6899)) ([691a812](691a812)) * snowpipe struck scenarios ([#6895](#6895)) ([35b07a8](35b07a8)) * use tid instead of vid ([#6908](#6908)) ([954dcf7](954dcf7)) ### Miscellaneous * avoid marshalling proc error job payloads ([#6872](#6872)) ([145826b](145826b)) * bump build-scan-push-action from v2.1.0 to v2.2.0 ([#6903](#6903)) ([e917f9b](e917f9b)) * contract tests for dns regressions and overrides ([#6864](#6864)) ([b105678](b105678)) * pin and bump action refs (SEC-171) ([#6863](#6863)) ([8089953](8089953)) * pytransformer pooling contract tests ([#6883](#6883)) ([0530c8c](0530c8c)) * scope workflow permissions to least privilege (SEC-167) ([#6911](#6911)) ([5600dbe](5600dbe)) * update Slack notification method in scheduled release workflow ([#6879](#6879)) ([3b67dcb](3b67dcb)) * **vuln:** zizmor --fix=all findings (SEC-199) ([#6905](#6905)) ([d8cc34f](d8cc34f)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: rudderstack-github-actions[bot] <236995729+rudderstack-github-actions[bot]@users.noreply.github.com>
Remediate zizmor excessive-permissions (SEC-167).
actionlint: no regressions before/after.