Skip to content

chore: pin GitHub Actions to SHA refs#33

Merged
JulianUmbhau merged 2 commits into
masterfrom
chore/pin-github-actions
Apr 14, 2026
Merged

chore: pin GitHub Actions to SHA refs#33
JulianUmbhau merged 2 commits into
masterfrom
chore/pin-github-actions

Conversation

@kthy

@kthy kthy commented Mar 25, 2026

Copy link
Copy Markdown
Member

Summary

Pin GitHub Actions to full SHA refs for supply-chain security.

Pinned actions

  • actions/checkout@v2de0fac2 (v6.0.2)
  • actions/cache@v16682284 (v5.0.4)
  • actions/upload-artifact@masterbbbca2d (v7.0.0)

🤖 Generated by audit-actions --create-prs

Summary by CodeRabbit

  • Chores
    • CI/CD workflow configurations updated to pin action steps to specific commit SHAs for improved stability and supply-chain security. No functional workflow behavior or public APIs were changed.

@coderabbitai

coderabbitai Bot commented Mar 25, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Updated three GitHub Actions step references in .github/workflows/R-CMD-check.yaml from tag-based versions to pinned commit-SHA versions for actions/checkout, actions/cache, and actions/upload-artifact.

Changes

Cohort / File(s) Summary
Workflow step pinning
\.github/workflows/R-CMD-check.yaml
Replaced uses values for actions/checkout, actions/cache, and actions/upload-artifact from tag-based refs (v2, v1, master) to specific commit SHAs (de0fac2e..., 66822842..., bbbca2dd...). No other workflow logic changed.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 I hopped through YAML with a careful paw,
Three action refs fixed to commits I saw,
No more drifting tags, just exacting names,
The workflow's steady now across all lanes. 🥕

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'chore: pin GitHub Actions to SHA refs' clearly and concisely describes the main change: pinning GitHub Actions to commit SHA references for security purposes.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/pin-github-actions

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
.github/workflows/R-CMD-check.yaml (1)

34-34: Consider pinning r-lib actions for complete supply-chain security.

The PR pins actions/* to SHA refs for supply-chain security, but r-lib/actions/setup-r@master and r-lib/actions/setup-pandoc@master remain unpinned. Using @master means these actions can change without notice, which contradicts the security objective of this PR.

For consistent supply-chain hardening, consider pinning these to SHA refs as well.

🔒 Suggested approach for pinning r-lib actions

First, identify the current commit SHAs for the master branch:

#!/bin/bash
# Get current master commit for r-lib/actions
git ls-remote https://github.com/r-lib/actions.git HEAD

Then update the workflow to use those SHAs with comments:

-      - uses: r-lib/actions/setup-r@master
+      - uses: r-lib/actions/setup-r@<SHA_HERE> # master

-      - uses: r-lib/actions/setup-pandoc@master
+      - uses: r-lib/actions/setup-pandoc@<SHA_HERE> # master

Also applies to: 38-38

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/R-CMD-check.yaml at line 34, Replace unpinned r-lib
actions by pinning their commit SHAs: update the uses entries for
r-lib/actions/setup-r@master and r-lib/actions/setup-pandoc@master to use the
corresponding full commit SHA refs (e.g., r-lib/actions/setup-r@<sha> and
r-lib/actions/setup-pandoc@<sha>), obtaining the SHAs with git ls-remote or from
the actions repo, and include a short comment noting the pinned SHA for
supply-chain traceability; ensure both occurrences (setup-r and setup-pandoc)
are updated consistently.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/R-CMD-check.yaml:
- Line 34: Replace unpinned r-lib actions by pinning their commit SHAs: update
the uses entries for r-lib/actions/setup-r@master and
r-lib/actions/setup-pandoc@master to use the corresponding full commit SHA refs
(e.g., r-lib/actions/setup-r@<sha> and r-lib/actions/setup-pandoc@<sha>),
obtaining the SHAs with git ls-remote or from the actions repo, and include a
short comment noting the pinned SHA for supply-chain traceability; ensure both
occurrences (setup-r and setup-pandoc) are updated consistently.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 3da4d811-42fc-4ebf-8ca9-b221829bd99f

📥 Commits

Reviewing files that changed from the base of the PR and between 13a062d and 00ddebc.

📒 Files selected for processing (1)
  • .github/workflows/R-CMD-check.yaml

@JulianUmbhau
JulianUmbhau merged commit c19e4bf into master Apr 14, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants