Skip to content

ci: set explicit contents: read permissions on workflow jobs - #1333

Merged
aristarkhovNV merged 1 commit into
mainfrom
aaristarkhov/workflow-permissions
Oct 24, 2026
Merged

aristarkhovNV merged 1 commit into
mainfrom
aaristarkhov/workflow-permissions

Conversation

@aristarkhovNV

@aristarkhovNV aristarkhovNV commented Oct 23, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Add permissions: contents: read to the jobs flagged by code-scanning rule actions/missing-workflow-permissions.
  • None of these jobs use GITHUB_TOKEN beyond reading the repo; jobs that need more already declare their own permissions.

Code scanning alerts resolved

Alert Workflow Job
#19 build-ubuntu.yml test-viz-sanitizers
#28 build-ubuntu.yml build-ubuntu
#42 build-windows.yml build-windows
#48 build-ubuntu.yml test-viz-gpu
#49 build-ubuntu.yml test-cloudxr
#50 build-ubuntu.yml test-teleop-ros2
#51 pre-commit.yaml pre-commit

Test plan

  • CI passes on this PR
  • Code-scanning alerts close after merge

🤖 Generated with Claude Code

Resolves code-scanning alerts actions/missing-workflow-permissions
(#19, #28, #42, #48, #49, #50, #51) by limiting GITHUB_TOKEN to read-only
repository contents on the jobs that did not declare permissions.

Signed-off-by: Andrei Aristarkhov <aaristarkhov@nvidia.com>
@coderabbitai

coderabbitai Bot commented Oct 23, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between 5154984 and 508f65d.

📒 Files selected for processing: 3
  • .github/workflows/build-ubuntu.yml
  • .github/workflows/build-windows.yml
  • .github/workflows/pre-commit.yaml

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

📝 Walkthrough

Seven jobs across three GitHub Actions workflows now explicitly set the contents permission to read. The pre-commit job adds an explicit permissions block.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 508f6

The workflow permission changes are limited to necessary read-only access and present no merge-blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding explicit read-only contents permissions to CI workflow jobs.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@aristarkhovNV
aristarkhovNV merged commit 2b3f14e into main Oct 24, 2026
37 checks passed
@aristarkhovNV
aristarkhovNV deleted the aaristarkhov/workflow-permissions branch October 24, 2026 03:43

This branch was successfully deployed

1 active deployment
dev — 508f65d3 Deployed Oct 23, 2026 by aristarkhovNV via publish-wheel #5966
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants