Skip to content

chore: pin GitHub Actions to fixed SHAs#39

Merged
KooshaPari merged 2 commits into
mainfrom
chore/pin-github-actions-shas
May 1, 2026
Merged

chore: pin GitHub Actions to fixed SHAs#39
KooshaPari merged 2 commits into
mainfrom
chore/pin-github-actions-shas

Conversation

@KooshaPari
Copy link
Copy Markdown
Owner

@KooshaPari KooshaPari commented May 1, 2026

User description

Summary

Pin GitHub Actions to immutable SHAs for improved security and reproducibility.

Actions Pinned

Action SHA
checkout@v4 34e114876b0b11c390a56381ad16ebd13914f8d5
checkout@v6 de0fac2e4500dabe0009e67214ff5f5447ce83dd

Note

Low Risk
Low risk: only updates GitHub Actions references in workflow files, with no application code or runtime logic changes. Main risk is CI breakage if the pinned SHAs are incorrect or deprecated.

Overview
Pins previously tag-based GitHub Actions to specific commit SHAs across several CI workflows (Rust cargo-* checks, Rust CodeQL, and Scorecard artifact upload).

This improves CI reproducibility and reduces supply-chain risk by avoiding floating action versions.

Reviewed by Cursor Bugbot for commit 442686a. Bugbot is set up for automated code reviews on this repo. Configure here.


CodeAnt-AI Description

Pin GitHub Actions to fixed versions in CI workflows

What Changed

  • Several workflows now use fixed, immutable versions of GitHub Actions instead of floating tags.
  • This change covers checkout steps across Rust checks, CodeQL analysis, cargo-audit, cargo-deny, cargo-semver-checks, and cargo-machete, plus the artifact upload step in Scorecard.
  • CI runs will keep using the same action versions over time, reducing unexpected behavior from upstream changes.

Impact

✅ More predictable CI runs
✅ Fewer workflow surprises
✅ Lower supply-chain risk

🔄 Retrigger CodeAnt AI Review

Details

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

Pin GitHub Actions to immutable SHAs:
- checkout@v4: 34e114876b0b11c390a56381ad16ebd13914f8d5
- checkout@v6: de0fac2e4500dabe0009e67214ff5f5447ce83dd
Copilot AI review requested due to automatic review settings May 1, 2026 08:38
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@gemini-code-assist
Copy link
Copy Markdown

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 1, 2026

Warning

Rate limit exceeded

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

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: aa4f1967-1a08-4f35-9383-26cd9f6c8bd3

📥 Commits

Reviewing files that changed from the base of the PR and between 3ccd81b and 442686a.

📒 Files selected for processing (6)
  • .github/workflows/cargo-audit.yml
  • .github/workflows/cargo-deny.yml
  • .github/workflows/cargo-machete.yml
  • .github/workflows/cargo-semver-checks.yml
  • .github/workflows/codeql-rust.yml
  • .github/workflows/scorecard.yml
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/pin-github-actions-shas
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/pin-github-actions-shas

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
Review rate limit: 0/1 reviews remaining, refill in 40 minutes and 4 seconds.

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

@codeant-ai codeant-ai Bot added the size:XS This PR changes 0-9 lines, ignoring generated files label May 1, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 1, 2026

CodeAnt AI finished reviewing your PR.

Copy link
Copy Markdown

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 2 potential issues.

Fix All in Cursor

Bugbot Autofix is ON, but it could not run because on-demand usage is turned off. To enable Bugbot Autofix, turn on on-demand usage and set a spend limit in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 282ea90. Configure here.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pinned SHA appears to be v6, not v4

Medium Severity

The SHA 34e114876b0b11c390a56381ad16ebd13914f8d5 is labeled as checkout@v4 in the PR description, but this commit has the message "Cleanup actions/checkout@v6 auth style (#2305)" and belongs to the v6 branch. The known v4.3.0 release SHA is b3498302c5c423fa896b97a26bb183df735d08f8, which is entirely different. This silently upgrades four workflows from v4 to v6, which changes credential storage behavior, requires a newer Actions Runner, and uses Node.js 24 instead of Node.js 20.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 282ea90. Configure here.

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pinned SHAs missing version comments for maintainability

Low Severity

The pinned SHAs lack version-indicating comments, making it impossible to know at a glance which version is in use. The existing codeql.yml in this repo already follows the best practice of including a version comment (e.g., @b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1). The newly pinned actions are inconsistent with this established pattern.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 282ea90. Configure here.

@KooshaPari KooshaPari merged commit b43680e into main May 1, 2026
15 of 16 checks passed
@KooshaPari KooshaPari review requested due to automatic review settings May 1, 2026 09:02
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 6, 2026

CodeAnt AI is running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:XS This PR changes 0-9 lines, ignoring generated files and removed size:XS This PR changes 0-9 lines, ignoring generated files labels May 6, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 6, 2026

Sequence Diagram

This PR updates Rust-related GitHub Actions workflows to use pinned checkout and artifact upload SHAs, improving security and reproducibility while preserving the existing CI behavior.

sequenceDiagram
    participant Developer
    participant GitHub
    participant CIWorkflow as CI workflow
    participant Checkout as Pinned checkout action
    participant Analysis as Analysis actions
    participant Artifact as Pinned artifact upload

    Developer->>GitHub: Push code or open pull request
    GitHub->>CIWorkflow: Trigger Rust security and quality workflows
    CIWorkflow->>Checkout: Fetch repository code with pinned SHA
    CIWorkflow->>Analysis: Run audit, deny, machete, semver and codeql checks
    CIWorkflow->>Artifact: Upload scorecard results with pinned SHA
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 6, 2026

CodeAnt AI finished running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 6, 2026

CodeAnt AI is running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@codeant-ai codeant-ai Bot added size:XS This PR changes 0-9 lines, ignoring generated files and removed size:XS This PR changes 0-9 lines, ignoring generated files labels May 6, 2026
@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 6, 2026

Sequence Diagram

This PR updates multiple CI workflows so that checkout and artifact upload actions use immutable commit SHAs instead of floating tags, improving reproducibility and supply-chain security while keeping the overall workflow behavior the same.

sequenceDiagram
    participant GitHub
    participant CI Workflow
    participant Checkout Action
    participant Tool Actions
    participant Artifact Upload Action

    GitHub->>CI Workflow: Trigger Rust or security workflow
    CI Workflow->>Checkout Action: Fetch repository using pinned SHA version
    CI Workflow->>Tool Actions: Run Rust checks and analysis
    CI Workflow->>Artifact Upload Action: Upload results using pinned SHA version
Loading

Generated by CodeAnt AI

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented May 6, 2026

CodeAnt AI finished running the review.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@KooshaPari KooshaPari deleted the chore/pin-github-actions-shas branch May 21, 2026 08:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS This PR changes 0-9 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant