Skip to content

ci: pin remaining GitHub Actions to commit SHAs#3639

Open
Ankitsinghsisodya wants to merge 1 commit intoknative:mainfrom
Ankitsinghsisodya:ci/pin-github-actions-shas
Open

ci: pin remaining GitHub Actions to commit SHAs#3639
Ankitsinghsisodya wants to merge 1 commit intoknative:mainfrom
Ankitsinghsisodya:ci/pin-github-actions-shas

Conversation

@Ankitsinghsisodya
Copy link
Copy Markdown
Contributor

@Ankitsinghsisodya Ankitsinghsisodya commented Apr 23, 2026

Changes

  • 🧹 Pin every uses: in .github/workflows/ to a full 40-character commit SHA, with a short comment (e.g. # v4, # knative@abc1234) for the previous tag or main ref.
  • Covers actions/*, codecov/*, docker/*, imjasonh/setup-ko, peter-evans/create-pull-request, endersonmenezes/free-disk-space, actions-rust-lang/setup-rust-toolchain, and all knative/actions setup-go and reusable workflow references that previously used @main or semver tags.

/kind cleanup

Fixes #3638

References

…ability

- Updated actions/checkout to a specific commit for version control.
- Updated knative/actions/setup-go to a specific commit for stability.
- Updated various actions (setup-python, setup-node, setup-java, setup-rust, codecov-action, upload-artifact) to specific commits to ensure reproducibility.
- Adjusted reusable workflows in knative-go-build, knative-go-test, knative-security, knative-stale, knative-style, and knative-verify to point to specific versions.

This change enhances the reliability of CI/CD processes by avoiding unexpected behavior from upstream changes.
Copilot AI review requested due to automatic review settings April 23, 2026 00:29
@knative-prow knative-prow Bot added the kind/cleanup Cleanup label Apr 23, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Apr 23, 2026

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: Ankitsinghsisodya
Once this PR has been reviewed and has the lgtm label, please assign matzew for approval. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow Bot requested review from dsimansk and jrangelramos April 23, 2026 00:29
@knative-prow knative-prow Bot added size/L 🤖 PR changes 100-499 lines, ignoring generated files. needs-ok-to-test 🤖 Needs an org member to approve testing labels Apr 23, 2026
@knative-prow
Copy link
Copy Markdown

knative-prow Bot commented Apr 23, 2026

Hi @Ankitsinghsisodya. Thanks for your PR.

I'm waiting for a knative member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work.

Tip

We noticed you've done this a few times! Consider joining the org to skip this step and gain /lgtm and other bot rights. We recommend asking approvers on your previous PRs to sponsor you.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Pins GitHub Actions uses: references in this repository’s workflows to immutable 40-character commit SHAs to improve CI supply-chain security and align with the goal in #3638.

Changes:

  • Replaced semver tags (e.g. @v4, @v5) and @main workflow/action references with full commit SHAs across .github/workflows/.
  • Added trailing comments to indicate the prior ref/version for each pinned action/workflow.

Reviewed changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
.github/workflows/update-springboot-platform.yaml Pin action refs (checkout/setup-go/setup-node/setup-java) to SHAs.
.github/workflows/update-quarkus-platform.yaml Pin action refs (checkout/setup-go/setup-node/setup-java) to SHAs.
.github/workflows/update-python-platform.yaml Pin action refs (checkout/setup-go/setup-python/create-pull-request) to SHAs.
.github/workflows/update-ca-bundle.yaml Pin checkout and setup-node to SHAs.
.github/workflows/update-builder.yaml Pin checkout/setup-go and docker/setup-qemu-action to SHAs.
.github/workflows/test-podman-next.yaml Pin free-disk-space/checkout/setup-go/upload-artifact to SHAs.
.github/workflows/knative-verify.yaml Pin reusable workflow reference to a SHA.
.github/workflows/knative-style.yaml Pin reusable workflow reference to a SHA.
.github/workflows/knative-stale.yaml Pin reusable workflow reference to a SHA.
.github/workflows/knative-security.yaml Pin reusable workflow reference to a SHA.
.github/workflows/knative-go-test.yaml Pin reusable workflow reference to a SHA.
.github/workflows/knative-go-build.yaml Pin reusable workflow reference to a SHA.
.github/workflows/functions.yaml Pin many action refs (checkout/setup-* /codecov/upload-artifact/docker/*/attest/provenance/setup-ko/etc.) to SHAs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


style:
uses: knative/actions/.github/workflows/reusable-style.yaml@main
uses: knative/actions/.github/workflows/reusable-style.yaml@070cec11bae3af991b75abdd1fc7e0944dee70c3 # knative@070cec1
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This workflow file is labeled as being auto-synced by knobots. If that sync is still active, this pinned SHA change will be overwritten and the supply-chain hardening won’t stick. Please apply the pin in the upstream knobots/.github source (or update the sync process) as well.

Copilot uses AI. Check for mistakes.

stale:
uses: knative/actions/.github/workflows/reusable-stale.yaml@main
uses: knative/actions/.github/workflows/reusable-stale.yaml@070cec11bae3af991b75abdd1fc7e0944dee70c3 # knative@070cec1
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This file indicates it is auto-synced from knobots. If the sync runs, local edits (including this pinned SHA) will be overwritten. Please ensure the pin is made in the upstream source workflow/template (or adjust the sync) so it remains effective.

Copilot uses AI. Check for mistakes.
jobs:
analyze:
uses: knative/actions/.github/workflows/reusable-security.yaml@main
uses: knative/actions/.github/workflows/reusable-security.yaml@070cec11bae3af991b75abdd1fc7e0944dee70c3 # knative@070cec1
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This workflow is marked as knobots-synced. If the sync process is still enabled, this pinned uses: ref will be overwritten on the next sync. Please update the upstream knobots/.github source (or the sync configuration) so the pin persists.

Suggested change
uses: knative/actions/.github/workflows/reusable-security.yaml@070cec11bae3af991b75abdd1fc7e0944dee70c3 # knative@070cec1
uses: knative/actions/.github/workflows/reusable-security.yaml@main

Copilot uses AI. Check for mistakes.
jobs:
test:
uses: knative/actions/.github/workflows/reusable-go-test.yaml@main
uses: knative/actions/.github/workflows/reusable-go-test.yaml@070cec11bae3af991b75abdd1fc7e0944dee70c3 # knative@070cec1
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This workflow file is flagged as auto-synced by knobots. If the sync runs, this pinned SHA update may be reverted, undermining the goal of pinning all uses: refs. Please make the corresponding pin change in the upstream source templates (or update/disable the sync).

Copilot uses AI. Check for mistakes.
jobs:
build:
uses: knative/actions/.github/workflows/reusable-go-build.yaml@main
uses: knative/actions/.github/workflows/reusable-go-build.yaml@070cec11bae3af991b75abdd1fc7e0944dee70c3 # knative@070cec1
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This workflow is labeled as being synced in by knobots. If that automation is active, this pin change can be overwritten. Please update the upstream workflow/template that knobots syncs from (or adjust the sync process) to make the pin durable.

Copilot uses AI. Check for mistakes.
jobs:
verify:
uses: knative/actions/.github/workflows/reusable-verify-codegen.yaml@main
uses: knative/actions/.github/workflows/reusable-verify-codegen.yaml@070cec11bae3af991b75abdd1fc7e0944dee70c3 # knative@070cec1
Copy link

Copilot AI Apr 23, 2026

Choose a reason for hiding this comment

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

This workflow is marked as auto-synced by knobots and “will be overwritten”. Updating the pinned uses: ref here may be reverted by the next sync, leaving the repo still effectively unpinned. Please make the same pin change in the upstream source repo/templates (or adjust/disable the sync) so it persists.

Copilot uses AI. Check for mistakes.
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 58.35%. Comparing base (07bdeaf) to head (6201a06).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3639      +/-   ##
==========================================
+ Coverage   56.26%   58.35%   +2.09%     
==========================================
  Files         180      179       -1     
  Lines       20522    20565      +43     
==========================================
+ Hits        11546    12000     +454     
+ Misses       7774     7358     -416     
- Partials     1202     1207       +5     
Flag Coverage Δ
e2e 39.64% <ø> (+3.44%) ⬆️
e2e go 32.36% <ø> (-0.49%) ⬇️
e2e node 28.11% <ø> (-0.48%) ⬇️
e2e python 32.72% <ø> (-0.50%) ⬇️
e2e quarkus 28.27% <ø> (-0.47%) ⬇️
e2e rust 27.65% <ø> (-0.51%) ⬇️
e2e springboot 26.15% <ø> (-0.47%) ⬇️
e2e typescript 28.23% <ø> (-0.47%) ⬇️
e2e-config-ci 17.55% <ø> (-0.53%) ⬇️
integration 17.07% <ø> (-0.40%) ⬇️
unit macos-14 42.69% <ø> (-0.62%) ⬇️
unit macos-latest 42.69% <ø> (-0.62%) ⬇️
unit ubuntu-24.04-arm 43.51% <ø> (+0.01%) ⬆️
unit ubuntu-latest 43.51% <ø> (-0.67%) ⬇️
unit windows-latest ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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

Labels

kind/cleanup Cleanup needs-ok-to-test 🤖 Needs an org member to approve testing size/L 🤖 PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: pin remaining GitHub Actions to commit SHAs

2 participants