Skip to content

ci: ensure that all workflows define permissions of the GITHUB_TOKEN#990

Merged
tbouffard merged 2 commits intomainfrom
ci/set_permissions_in_all_wf
Jan 9, 2026
Merged

ci: ensure that all workflows define permissions of the GITHUB_TOKEN#990
tbouffard merged 2 commits intomainfrom
ci/set_permissions_in_all_wf

Conversation

@tbouffard
Copy link
Copy Markdown
Member

@tbouffard tbouffard commented Jan 7, 2026

This is a missing good practice in some existing workflows, highlighted by CodeQL workflow runs.

Summary by CodeRabbit

  • Chores
    • Updated GitHub Actions workflows with enhanced configuration settings.

✏️ Tip: You can customize this high-level summary in your review settings.

This is a missing good practice in some existing workflows, highlighted by CodeQL workflow runs.
@tbouffard tbouffard added the chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) label Jan 7, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 7, 2026

Warning

Rate limit exceeded

@tbouffard has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 4 minutes and 41 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 9d47260 and 392c714.

📒 Files selected for processing (1)
  • .github/workflows/build.yml

Walkthrough

Two GitHub Actions workflows (build.yml and generate-website.yml) are updated to add permissions blocks to their build jobs, granting contents: read access for reading repository content during workflow execution.

Changes

Cohort / File(s) Summary
GitHub Actions Workflow Permissions
.github/workflows/build.yml, .github/workflows/generate-website.yml
Added permissions block under jobs.build with contents: read to explicitly grant read access to repository contents for each build job.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. It lacks required sections such as issue reference, overview of changes, testing information, and documentation updates per the repository template. Add issue reference (closes #...), detailed explanation of why this change is needed, testing approach, and confirmation of documentation status per the template.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding explicit GITHUB_TOKEN permissions definitions to all workflows, which aligns with the actual changes in the pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch ci/set_permissions_in_all_wf

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In @.github/workflows/build.yml:
- Around line 36-37: Align the YAML indentation for the permissions block: under
the existing permissions key, adjust the contents key (the line with contents:
read) so it uses the same indentation level as the permissions child keys used
elsewhere (six spaces relative to the file start) instead of the extra spaces;
update the permissions -> contents alignment to be consistent with the
repository's YAML style.
📜 Review details

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 42384ac and 9d47260.

📒 Files selected for processing (2)
  • .github/workflows/build.yml
  • .github/workflows/generate-website.yml
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: tbouffard
Repo: maxGraph/maxGraph PR: 849
File: packages/html/stories/DragSource.stories.js:98-101
Timestamp: 2025-06-13T07:48:10.300Z
Learning: User tbouffard prefers answers in English; avoid switching to other languages in future replies.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: build (macos-14)
  • GitHub Check: build (windows-2022)
  • GitHub Check: build (ubuntu-24.04)
  • GitHub Check: build
🔇 Additional comments (1)
.github/workflows/generate-website.yml (1)

46-47: LGTM! Good security practice.

The explicit contents: read permission appropriately restricts the build job to read-only access, following the principle of least privilege. This is sufficient for all operations in this job (checkout, build, and artifact upload).

Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 8, 2026

@tbouffard tbouffard merged commit c2d6b44 into main Jan 9, 2026
11 checks passed
@tbouffard tbouffard deleted the ci/set_permissions_in_all_wf branch January 9, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant