Skip to content

chore: Pin actions using hashes - #1458

Merged
Czaki merged 1 commit into
developfrom
pin_actions
Sep 8, 2026
Merged

Czaki merged 1 commit into
developfrom
pin_actions

Conversation

@Czaki

@Czaki Czaki commented Sep 8, 2026

Copy link
Copy Markdown
Collaborator

Summary by Sourcery

Pin all GitHub Actions workflow dependencies to specific commits to make automation runs reproducible and reduce supply-chain risk.

Enhancements:

  • Pin GitHub Actions dependencies to immutable commit hashes across testing, security scanning, release, publishing, reporting, and dependency-update workflows while retaining version comments for traceability.

CI:

  • Improve CI supply-chain reproducibility and security by replacing mutable action tags and branches with verified commit references.

Summary by CodeRabbit

  • Chores
    • Pinned automated workflow actions to immutable version references for more predictable and reproducible builds.
    • Updated several workflow action versions, including artifact handling, code analysis, testing, release publishing, and pull request automation.
    • Workflow behavior, job logic, and test execution remain unchanged.

@sourcery-ai

sourcery-ai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Reviewer's Guide

All third-party GitHub Actions referenced by the affected workflows are changed from mutable version tags to immutable commit hashes, with comments documenting the corresponding action versions; workflow behavior and action configuration remain otherwise unchanged.

File-Level Changes

Change Details Files
Pin GitHub Actions dependencies to immutable commit hashes while retaining human-readable release annotations.
  • Pinned artifact upload/download actions across test workflows.
  • Pinned CodeQL, Codecov, environment/setup, GUI, issue-reporting, and pull-request actions.
  • Pinned release and PyPI publishing actions used by the release workflow.
.github/workflows/base_test_workflow.yml
.github/workflows/codeql-analysis.yml
.github/workflows/make_release.yml
.github/workflows/test_napari_repo.yml
.github/workflows/test_prereleases.yml
.github/workflows/tests.yml
.github/workflows/upgrade-dependencies.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@sonarqubecloud

sonarqubecloud Bot commented Sep 8, 2026

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. These changes determine the exact third-party code executed by CI, including workflows with GITHUB_TOKEN, CodeQL, issue-creation, and PyPI publishing credentials. If a hash is incorrect or points to compromised code, a workflow run could expose credentials or publish an unintended release; reverting stops future runs but cannot undo credentials already exposed or artifacts already published.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@coderabbitai

coderabbitai Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Advanced

Run ID: f086fe2c-2705-4fc0-a0a5-8fa9560ea4eb

📥 Commits

Reviewing files that changed from the base of the PR and between 567d9d1 and 015d3c4.

📒 Files selected for processing (7)
  • .github/workflows/base_test_workflow.yml
  • .github/workflows/codeql-analysis.yml
  • .github/workflows/make_release.yml
  • .github/workflows/test_napari_repo.yml
  • .github/workflows/test_prereleases.yml
  • .github/workflows/tests.yml
  • .github/workflows/upgrade-dependencies.yml

Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The workflows now pin third-party GitHub Actions to immutable commit SHAs. Version annotations identify the referenced releases. Workflow logic and action inputs remain unchanged, except for the setup-qt-libs upgrade from v1 to v1.8.

Changes

GitHub Actions pinning

Layer / File(s) Summary
Pin workflow actions
.github/workflows/base_test_workflow.yml, .github/workflows/codeql-analysis.yml, .github/workflows/make_release.yml, .github/workflows/test_napari_repo.yml, .github/workflows/test_prereleases.yml, .github/workflows/tests.yml, .github/workflows/upgrade-dependencies.yml
CI, CodeQL, release, failure-reporting, and dependency-update workflows replace mutable action tags with immutable commit SHAs and version annotations. The tlambert03/setup-qt-libs action also changes from v1 to v1.8.

Priority: ⬇️ Low — Defer this workflow-hardening change because it only replaces mutable GitHub Actions tags with pinned commits without changing product behavior.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 015d3

The workflows retain their existing behavior while using immutable action references, with no identified merge-blocking risk.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: pinning GitHub Actions to immutable commit hashes.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch pin_actions

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.

@Czaki Czaki changed the title chore:Pin actions using hashes chore: Pin actions using hashes Sep 8, 2026
@Czaki Czaki added this to the 0.17.1 milestone Sep 8, 2026
@codecov

codecov Bot commented Sep 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.61%. Comparing base (567d9d1) to head (015d3c4).

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1458      +/-   ##
===========================================
+ Coverage    92.59%   92.61%   +0.01%     
===========================================
  Files          211      211              
  Lines        33248    33248              
===========================================
+ Hits         30787    30792       +5     
+ Misses        2461     2456       -5     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Czaki
Czaki merged commit 25695e6 into develop Sep 8, 2026
70 of 72 checks passed
@Czaki
Czaki deleted the pin_actions branch September 8, 2026 14:01
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.

1 participant