chore: pin GitHub Actions to SHA refs#33
Conversation
📝 WalkthroughWalkthroughUpdated three GitHub Actions step references in Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 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.
🧹 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, butr-lib/actions/setup-r@masterandr-lib/actions/setup-pandoc@masterremain unpinned. Using@mastermeans 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 HEADThen 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> # masterAlso 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
📒 Files selected for processing (1)
.github/workflows/R-CMD-check.yaml
Summary
Pin GitHub Actions to full SHA refs for supply-chain security.
Pinned actions
actions/checkout@v2→de0fac2(v6.0.2)actions/cache@v1→6682284(v5.0.4)actions/upload-artifact@master→bbbca2d(v7.0.0)🤖 Generated by
audit-actions --create-prsSummary by CodeRabbit