Skip to content

Feature: Pin CI Actions version - #4015

Merged
infeo merged 3 commits into
developfrom
feature/pin-gh-actions-version
Oct 15, 2025
Merged

infeo merged 3 commits into
developfrom
feature/pin-gh-actions-version

Conversation

@infeo

@infeo infeo commented Oct 15, 2025

Copy link
Copy Markdown
Member

This PR pins the version for all external used CI actions to a SHA checksum. This follows best practices to protect from supply chain attacks.

The maintainability effort is only slightly increased, since dependabot also supports bumping SHA checksums.

@infeo infeo self-assigned this Oct 15, 2025
@infeo infeo added dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code labels Oct 15, 2025
@coderabbitai

coderabbitai Bot commented Oct 15, 2025 •

Copy link
Copy Markdown

Walkthrough

The pull request updates many GitHub Actions workflows to pin external action references to specific commit SHAs instead of tags or branches. Affected workflows include appimage.yml, aur.yml, av-whitelist.yml, build.yml, check-jdk-updates.yml, debian.yml, dependency-check.yml, dl-stats.yml, error-db.yml, flathub.yml, get-version.yml, mac-dmg-x64.yml, mac-dmg.yml, no-response.yml, post-publish.yml, pullrequest.yml, release-check.yml, stale.yml, win-exe.yml, winget.yml, and others. Changes are limited to uses: lines (action version pins); step inputs, parameters, control flow, and logic remain unchanged.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title succinctly captures the change of pinning all CI actions to specific SHA versions, directly reflecting the pull request’s main modification of locking external GitHub Actions to immutable commits.
Description Check ✅ Passed The description clearly explains that this PR pins external CI actions to SHA checksums for supply chain security and addresses maintainability considerations, matching the summarized changes and staying on-topic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/pin-gh-actions-version

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 83d2c39 and ccf2e60.

📒 Files selected for processing (20)
  • .github/workflows/appimage.yml (6 hunks)
  • .github/workflows/aur.yml (2 hunks)
  • .github/workflows/av-whitelist.yml (3 hunks)
  • .github/workflows/build.yml (2 hunks)
  • .github/workflows/check-jdk-updates.yml (2 hunks)
  • .github/workflows/debian.yml (3 hunks)
  • .github/workflows/dependency-check.yml (1 hunks)
  • .github/workflows/dl-stats.yml (2 hunks)
  • .github/workflows/error-db.yml (3 hunks)
  • .github/workflows/flathub.yml (2 hunks)
  • .github/workflows/get-version.yml (2 hunks)
  • .github/workflows/mac-dmg-x64.yml (4 hunks)
  • .github/workflows/mac-dmg.yml (4 hunks)
  • .github/workflows/no-response.yml (1 hunks)
  • .github/workflows/post-publish.yml (1 hunks)
  • .github/workflows/pullrequest.yml (1 hunks)
  • .github/workflows/release-check.yml (2 hunks)
  • .github/workflows/stale.yml (1 hunks)
  • .github/workflows/win-exe.yml (10 hunks)
  • .github/workflows/winget.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (14)
  • .github/workflows/dl-stats.yml
  • .github/workflows/debian.yml
  • .github/workflows/check-jdk-updates.yml
  • .github/workflows/win-exe.yml
  • .github/workflows/dependency-check.yml
  • .github/workflows/post-publish.yml
  • .github/workflows/pullrequest.yml
  • .github/workflows/aur.yml
  • .github/workflows/winget.yml
  • .github/workflows/flathub.yml
  • .github/workflows/stale.yml
  • .github/workflows/mac-dmg-x64.yml
  • .github/workflows/appimage.yml
  • .github/workflows/get-version.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: Build Debian Package
  • GitHub Check: Build Cryptomator.app for arm64
  • GitHub Check: Build .msi Installer (x64, windows-latest, zulu, 24.0.1+9, jdk)
  • GitHub Check: Compile and Test

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

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.

Actionable comments posted: 0

🧹 Nitpick comments (17)
.github/workflows/winget.yml (1)

21-21: Pinned action: good. Consider least-privilege token.

Since GH operations use CRYPTOBOT_PR_TOKEN, restrict default GITHUB_TOKEN.

Apply minimal job permissions:

 jobs:
   winget:
     name: Publish winget package
     runs-on: windows-latest
+    permissions:
+      contents: read
.github/workflows/flathub.yml (1)

46-46: Both actions pinned to SHAs: good. Consider explicit minimal permissions.

Workflow uses PATs/Slack webhook; default GITHUB_TOKEN can be read-only.

Add:

 jobs:
   flathub:
     name: Create PR for flathub
     runs-on: ubuntu-latest
     needs: [tarball, get-version]
+    permissions:
+      contents: read

Also applies to: 74-74

.github/workflows/dependency-check.yml (1)

10-10: Reusable workflow pinned: good. Consider minimal default token permissions.

Set read-only permissions at workflow level to tighten defaults; the called workflow can request what it needs.

Add near top-level:

 name: OWASP Maven Dependency Check
 on:
   schedule:
     - cron: '0 8 * * 0'
   workflow_dispatch:
 
+permissions:
+  contents: read
.github/workflows/post-publish.yml (1)

22-22: Pinned SHAs look good. Consider least-privilege GITHUB_TOKEN.

action-gh-release uses its own token; set default token to read-only.

Add:

 jobs:
   get-version:
     runs-on: ubuntu-latest
+    permissions:
+      contents: read

Also applies to: 29-29

.github/workflows/aur.yml (1)

51-51: SHA pinning LGTM. Consider minimal permissions.

Checkout/push and PR use CRYPTOBOT_PR_TOKEN; default token can be read-only.

Add:

 jobs:
   aur:
     name: Create PR for AUR
     runs-on: ubuntu-latest
     needs: [tarball, get-version]
+    permissions:
+      contents: read

Also applies to: 84-84

.github/workflows/av-whitelist.yml (1)

44-44: All actions pinned: good. Tighten default token permissions per job.

Jobs use external endpoints/secrets; default GITHUB_TOKEN can be read-only.

Add to each job:

 jobs:
   download-file:
     name: Downloads the file into the VM
     runs-on: ubuntu-latest
+    permissions:
+      contents: read
   allowlist-kaspersky:
     name: Anti Virus Allowlisting Kaspersky
     runs-on: ubuntu-latest
     needs: download-file
+    permissions:
+      contents: read
   allowlist-avast:
     name: Anti Virus Allowlisting Avast
     runs-on: ubuntu-latest
     needs: download-file
+    permissions:
+      contents: read

Also applies to: 56-56, 61-61, 76-76, 81-81

.github/workflows/mac-dmg-x64.yml (1)

50-50: Good pin to action SHAs; add small maintainability/security polish

  • Consider appending the source tag/version as a trailing comment to each pinned SHA for readability and easier reviews (e.g., “…@ # vX.Y.Z”).
  • Optionally set explicit GITHUB_TOKEN permissions (least‑privilege), e.g., default permissions: contents: read at workflow level and elevate per job that needs releases upload. This helps when actions are pinned but token scope is broad.

Also applies to: 52-52, 264-264, 285-285, 294-294

.github/workflows/release-check.yml (1)

22-22: SHA pinning looks solid; minor follow-ups

  • Add trailing comments with the corresponding action tag/version for maintainability.
  • Consider explicit permissions: hardening (e.g., contents: read at top, escalate only where needed).

Also applies to: 24-24, 52-52

.github/workflows/debian.yml (1)

47-47: Pinned SHAs: ✅; add tag comments and explicit permissions (optional)

  • Append the original tag (e.g., “# vX.Y.Z”) after each SHA for readability.
  • Optionally define least-privilege permissions: at workflow/job scope.

Also applies to: 62-62, 145-145

.github/workflows/pullrequest.yml (1)

19-19: SHA pins LGTM; minor hardening

  • Add tag/version as inline comments after SHAs.
  • Consider permissions: contents: read at workflow level; most PR CI doesn’t need broader scopes.

Also applies to: 20-20

.github/workflows/build.yml (1)

25-25: Great pinning (especially with pull_request_target present); optional polish

  • Add trailing tag/version comments after each SHA.
  • Consider setting default permissions: contents: read and granting elevated perms only where needed (e.g., release job).

Also applies to: 26-26, 32-32, 52-52

.github/workflows/mac-dmg.yml (1)

48-48: Action SHAs pinned correctly; small optional improvements

  • Append the original tag/version as a comment after each SHA.
  • Add explicit least‑privilege permissions: (contents: read by default; elevate for release publishing).

Also applies to: 50-50, 263-263, 284-284, 293-293

.github/workflows/dl-stats.yml (1)

13-13: SHA pinning looks good; optional follow-ups

  • Consider adding tag/version comments for easier audits.
  • Explicit permissions: (contents: read) helps further tighten scheduled workflows.

Also applies to: 56-56

.github/workflows/appimage.yml (1)

47-55: Pins look correct; add version comments for maintainability.

  • Solid move pinning checkout/setup-java/upload/download-artifact/gh-release/slack to SHAs.
  • Consider adding “# vX.Y.Z” comments after each SHA for future readability.
  • Nice: other external downloads are already checksum-verified.

Also applies to: 178-185, 187-195, 204-208, 215-219, 250-260

.github/workflows/win-exe.yml (1)

58-66: Consistent SHA pinning across Windows workflows.

  • checkout/setup-java/upload/download-artifact/gh-release/slack are pinned; good supply-chain hardening.
  • Suggest adding inline tag comments next to SHAs (e.g., “# actions/upload-artifact v4.x”).
  • Confirm Dependabot is set to bump pinned SHAs for github-actions ecosystem.

Also applies to: 60-67, 274-281, 296-301, 303-307, 310-317, 393-400, 411-414, 416-425, 447-457

.github/workflows/error-db.yml (1)

17-18: SHA-pinning applied correctly; minor maintenance suggestion.

  • Pinning github-script, get-gist-action, and deploy-gist strengthens integrity.
  • Add comments indicating the corresponding action versions to aid future updates.

Also applies to: 45-48, 61-66

.github/workflows/get-version.yml (1)

38-41: Add human-readable version tags and confirm Dependabot coverage

  • Pinning to commit SHAs is correct.
  • Add trailing comments with upstream tags (e.g. “# actions/checkout v4.x”).
  • Verify Dependabot is configured to bump these action SHAs.
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6e0407 and 83d2c39.

📒 Files selected for processing (20)
  • .github/workflows/appimage.yml (6 hunks)
  • .github/workflows/aur.yml (2 hunks)
  • .github/workflows/av-whitelist.yml (3 hunks)
  • .github/workflows/build.yml (2 hunks)
  • .github/workflows/check-jdk-updates.yml (2 hunks)
  • .github/workflows/debian.yml (3 hunks)
  • .github/workflows/dependency-check.yml (1 hunks)
  • .github/workflows/dl-stats.yml (2 hunks)
  • .github/workflows/error-db.yml (3 hunks)
  • .github/workflows/flathub.yml (2 hunks)
  • .github/workflows/get-version.yml (2 hunks)
  • .github/workflows/mac-dmg-x64.yml (4 hunks)
  • .github/workflows/mac-dmg.yml (4 hunks)
  • .github/workflows/no-response.yml (1 hunks)
  • .github/workflows/post-publish.yml (1 hunks)
  • .github/workflows/pullrequest.yml (1 hunks)
  • .github/workflows/release-check.yml (2 hunks)
  • .github/workflows/stale.yml (1 hunks)
  • .github/workflows/win-exe.yml (6 hunks)
  • .github/workflows/winget.yml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Build Debian Package
🔇 Additional comments (3)
.github/workflows/no-response.yml (1)

15-15: SHA pin looks good.

Consistent with stale.yml. Nothing else changed.

.github/workflows/stale.yml (1)

15-15: Approve pinned action SHAs
Verify each 40-char SHA exists in its upstream repo (e.g. via GitHub API) and add an ecosystem: github-actions entry to .github/dependabot.yml.

.github/workflows/check-jdk-updates.yml (1)

29-29: Annotate and verify pinned Action SHAs

  • Add a comment next to each pinned SHA in your workflows indicating the corresponding action version or tag (e.g., # v3.6.1).
  • Manually confirm each SHA points to the intended commit in its repo (for example, gh api repos/OWNER/REPO/commits/SHA --jq .html_url).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file github_actions Pull requests that update GitHub Actions code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant