fix(ci): resolve all zizmor findings and add zizmor pre-commit checks - #106
Conversation
📝 WalkthroughSummary by CodeRabbit
WalkthroughAdds workflow-level ChangesGitHub Actions security & pinning
Estimated Code Review Effort🎯 4 (Complex) | ⏱️ ~45 minutes Suggested Reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Tip 💬 Introducing Slack Agent: The best way for teams to turn conversations into code.Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.
Built for teams:
One agent for your entire SDLC. Right inside Slack. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/zizmor.yml:
- Around line 5-9: The policy currently exempts the rapidsai namespaces via the
entries "rapidsai/shared-workflows/*": any and "rapidsai/shared-actions/*": any
which defeats SHA-pinning; remove those two wildcard allowlist entries or
replace them with explicit immutable ref pins (e.g., specific SHA or explicit
immutable tags) so they no longer use the mutable "any" policy, and ensure the
default "*" remains "hash-pin" to enforce SHA-pinning for all remaining
actions/workflows.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: b5241dd2-654e-48fd-b63b-61a397c079e4
📒 Files selected for processing (6)
.github/workflows/build.yaml.github/workflows/labeler.yml.github/workflows/pr.yaml.github/workflows/test.yaml.github/zizmor.yml.pre-commit-config.yaml
| # We require SHA-pinning for all workflows and actions _except_ for those from | ||
| # rapidsai/shared-workflows and rapidsai/shared-actions | ||
| "rapidsai/shared-workflows/*": any | ||
| "rapidsai/shared-actions/*": any | ||
| "*": hash-pin |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "Shared workflow/action refs that still float on mutable branches:"
rg -n --glob '.github/workflows/*' \
'uses:\s*rapidsai/(shared-workflows|shared-actions)/[^@]+@(main|release/[^[:space:]]+)' \
.github/workflowsRepository: rapidsai/nvforest
Length of output: 3330
🏁 Script executed:
cat -n .github/zizmor.ymlRepository: rapidsai/nvforest
Length of output: 433
Remove mutable branch exemptions for shared workflows and actions.
The any policies for rapidsai/shared-workflows/* and rapidsai/shared-actions/* suppress hash-pin enforcement for refs that are still deployed with mutable branches (@main, @release/26.04). This exemption defeats the security control this PR introduces—allowing unreviewed workflow code changes from upstream repos without a PR here. Verify that pinning these shared refs is not feasible; if unfeasible, at least constrain the allowlist to specific immutable refs you intentionally trust rather than exempting entire namespaces.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/zizmor.yml around lines 5 - 9, The policy currently exempts the
rapidsai namespaces via the entries "rapidsai/shared-workflows/*": any and
"rapidsai/shared-actions/*": any which defeats SHA-pinning; remove those two
wildcard allowlist entries or replace them with explicit immutable ref pins
(e.g., specific SHA or explicit immutable tags) so they no longer use the
mutable "any" policy, and ensure the default "*" remains "hash-pin" to enforce
SHA-pinning for all remaining actions/workflows.
There was a problem hiding this comment.
It doesn't defeat the security controls, it's a well-considered trade-off, and we control the upstream repositories.
There was a problem hiding this comment.
@gforsyth, understood — thank you for the context. Since rapidsai controls both shared-workflows and shared-actions, granting any pinning policy for those namespaces is a reasonable and deliberate trust boundary rather than a gap. I'll note this for future reviews.
✏️ Learnings added
Learnt from: gforsyth
Repo: rapidsai/nvforest PR: 106
File: .github/zizmor.yml:5-9
Timestamp: 2026-05-04T16:49:24.324Z
Learning: In the rapidsai/nvforest repository, the `.github/zizmor.yml` exempts `rapidsai/shared-workflows/*` and `rapidsai/shared-actions/*` from SHA-pinning (policy: `any`) intentionally. This is a deliberate security trade-off because rapidsai controls those upstream repositories. Do not flag these exemptions as security issues in future reviews.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/pr.yaml (1)
58-60: Action pinned to commit SHA—good security practice. Consider adding a comment above the action with the corresponding tag/version (in this case, likely referencing "main" or v8) for maintainability and future reference.🤖 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/pr.yaml around lines 58 - 60, Add a brief inline comment above the nv-gha-runners/get-pr-info@090577647b8ddc4e06e809e264f7881650ecdccf action (the step with id "get-pr-info") indicating the corresponding readable tag or branch it pins to (e.g., "main" or "v8") and any rationale/version date; this preserves the security benefit of pinning to a commit SHA while making it easier for maintainers to know the intended version.
🤖 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.
Nitpick comments:
In @.github/workflows/pr.yaml:
- Around line 58-60: Add a brief inline comment above the
nv-gha-runners/get-pr-info@090577647b8ddc4e06e809e264f7881650ecdccf action (the
step with id "get-pr-info") indicating the corresponding readable tag or branch
it pins to (e.g., "main" or "v8") and any rationale/version date; this preserves
the security benefit of pinning to a commit SHA while making it easier for
maintainers to know the intended version.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 8bc9c322-d858-4409-85a9-1b7b66143c07
📒 Files selected for processing (3)
.github/workflows/build.yaml.github/workflows/pr.yaml.github/workflows/test.yaml
|
/merge |
Similar to upstream changes in
shared-workflows, this PR cleans up and annotates all of the workflows and adds thezizmorlinter to make sure changes are checked.Part of rapidsai/build-planning#275