Skip to content

ci: add zizmor GH actions analysis#35089

Merged
danielroe merged 5 commits into
mainfrom
ci/zizmor
May 18, 2026
Merged

ci: add zizmor GH actions analysis#35089
danielroe merged 5 commits into
mainfrom
ci/zizmor

Conversation

@huang-julien

@huang-julien huang-julien commented May 16, 2026

Copy link
Copy Markdown
Member

related #35088

📚 Description

Following the recent supply chain attacks, this PR adds zizmor to statically analysz our workflows in a CI to strenghten our CI and catch any improvements that can be made to our workflow files.

@huang-julien huang-julien requested a review from danielroe as a code owner May 16, 2026 21:00
@github-actions github-actions Bot added 5.x 🧹 p1-chore Low priority maintenance task labels May 16, 2026
@huang-julien huang-julien changed the title ci(workflows): add zizmor GH actions analysis ci: add zizmor GH actions analysis May 16, 2026
@coderabbitai

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/zizmor.yml:
- Line 9: The workflow currently sets "permissions: {}" which denies
GITHUB_TOKEN access; update the workflow permissions to grant at least
"contents: read" so actions/checkout and the zizmor analysis can clone and read
repository files (i.e., replace or augment the "permissions: {}" entry to
include "contents: read" for the GITHUB_TOKEN used by actions/checkout and the
zizmor action).
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 72e6ca75-4ff1-49b7-a8bd-c0b7463220ca

📥 Commits

Reviewing files that changed from the base of the PR and between fe86029 and f11c552.

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

pull_request:
branches: ["**"]

permissions: {}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Critical: Add contents: read permission for workflow to function.

The permissions: {} configuration denies all permissions to the GITHUB_TOKEN. However, the actions/checkout action requires contents: read permission to clone the repository, and the zizmor action needs to read workflow files for analysis. This configuration will cause the workflow to fail.

🔒 Proposed fix to grant necessary permissions
-permissions: {}
+permissions:
+  contents: read
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
permissions: {}
permissions:
contents: read
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/zizmor.yml at line 9, The workflow currently sets
"permissions: {}" which denies GITHUB_TOKEN access; update the workflow
permissions to grant at least "contents: read" so actions/checkout and the
zizmor analysis can clone and read repository files (i.e., replace or augment
the "permissions: {}" entry to include "contents: read" for the GITHUB_TOKEN
used by actions/checkout and the zizmor action).

@danielroe danielroe merged commit 8854ac3 into main May 18, 2026
23 checks passed
@danielroe danielroe deleted the ci/zizmor branch May 18, 2026 21:48
@github-actions github-actions Bot mentioned this pull request May 18, 2026
4 tasks
danielroe pushed a commit that referenced this pull request May 21, 2026
@github-actions github-actions Bot mentioned this pull request May 21, 2026
danielroe pushed a commit that referenced this pull request Jun 2, 2026
danielroe pushed a commit that referenced this pull request Jun 2, 2026
danielroe pushed a commit that referenced this pull request Jun 2, 2026
This was referenced Jun 1, 2026
danielroe pushed a commit that referenced this pull request Jun 2, 2026
danielroe pushed a commit that referenced this pull request Jun 2, 2026
danielroe pushed a commit that referenced this pull request Jun 2, 2026
danielroe pushed a commit that referenced this pull request Jun 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 🧹 p1-chore Low priority maintenance task

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants