ci: pin third-party actions to commit SHAs#5865
Conversation
Replaces version tags (e.g. astral-sh/setup-uv@v6, slackapi/slack-github-action@v2.1.0) with full commit SHAs across every workflow. Mitigates supply-chain risk from mutable tags.
📝 WalkthroughWalkthroughWorkflow files replace floating action tags with pinned commit SHAs (and update one GitHub App token action's input keys). Step logic and other job configuration are unchanged. ChangesGitHub Actions SHA Pinning
🎯 2 (Simple) | ⏱️ ~10 minutes
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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/generate-tool-specs.yml:
- Line 25: Replace the archived action reference
"tibdex/github-app-token@3beb63f4bd073e61482598c45c71c1019b59b73a" with a
maintained alternative such as "actions/create-github-app-token@v1" (pin to a
stable tag or SHA), and update the step's inputs/outputs to match the new
action's contract (adjust any "with:" keys, outputs consumed later in the job,
and required permissions or secrets) so the workflow still receives the same
token value; verify and update subsequent steps that reference the old action's
output name to the new action's output name.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 942ee6a4-a67c-4e8c-98ab-0a8e4e95b42b
📒 Files selected for processing (11)
.github/workflows/build-uv-cache.yml.github/workflows/generate-tool-specs.yml.github/workflows/linter.yml.github/workflows/nightly.yml.github/workflows/pr-size.yml.github/workflows/pr-title.yml.github/workflows/publish.yml.github/workflows/tests.yml.github/workflows/type-checker.yml.github/workflows/update-test-durations.yml.github/workflows/vulnerability-scan.yml
…ub-app-token The tibdex action is archived. Switches to the maintained actions/create-github-app-token (pinned to v3.2.0 SHA) and renames the inputs from app_id/private_key to app-id/private-key. The token output name is unchanged, so downstream references continue to work.
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/generate-tool-specs.yml (1)
25-28: ⚡ Quick winExplicitly scope the GitHub App token to the current repository.
The action has default scoping, but declaring
ownerandrepositoriesexplicitly improves security posture by following the principle of least privilege and avoiding reliance on implicit defaults.Suggested hardening
- name: Generate GitHub App token id: app-token uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 with: app-id: ${{ secrets.CREWAI_TOOL_SPECS_APP_ID }} private-key: ${{ secrets.CREWAI_TOOL_SPECS_PRIVATE_KEY }} + owner: ${{ github.repository_owner }} + repositories: | + ${{ github.event.repository.name }}🤖 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/generate-tool-specs.yml around lines 25 - 28, Add explicit repo-scoping to the GitHub App token step to avoid default wide scope: in the step that uses actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1, include the inputs "owner" (use github.repository_owner) and "repositories" (use github.repository or the specific repo name) alongside the existing app-id and private-key entries so the generated token is limited to the current repository.
🤖 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/generate-tool-specs.yml:
- Around line 25-28: Add explicit repo-scoping to the GitHub App token step to
avoid default wide scope: in the step that uses
actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1,
include the inputs "owner" (use github.repository_owner) and "repositories" (use
github.repository or the specific repo name) alongside the existing app-id and
private-key entries so the generated token is limited to the current repository.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ee9e099a-7179-407c-9ec5-9f12b4189597
📒 Files selected for processing (1)
.github/workflows/generate-tool-specs.yml
Summary
.github/workflows/to a full commit SHA (e.g.astral-sh/setup-uv@d0cc045d04ccac9d8b7881df0226f9e82c39688e # v6) instead of a mutable version tag.Test plan
Note
Low Risk
Low-risk CI-only change that pins third-party actions for reproducible builds; primary risk is workflow breakage if any pinned SHA is incorrect or removed.
Overview
Hard-pins third-party GitHub Actions across CI workflows (tests/lint/type-check/nightly/publish/vulnerability scan/etc.) from mutable tags (e.g.
@v6) to specific commit SHAs with version comments for auditability.Also swaps the tool-specs workflow’s GitHub App token step from
tibdex/github-app-token@v2toactions/create-github-app-token@v3.2.0(updating input names accordingly), and pins the Slack notification action to a commit SHA.Reviewed by Cursor Bugbot for commit 025cb62. Bugbot is set up for automated code reviews on this repo. Configure here.
Summary by CodeRabbit