Skip to content

feat(ci): add weekly OSV-Scanner version bump workflow#90

Open
Kartikeya-trivedi wants to merge 2 commits into
kubeflow:mainfrom
Kartikeya-trivedi:feat/osv-scanner-auto-bump
Open

feat(ci): add weekly OSV-Scanner version bump workflow#90
Kartikeya-trivedi wants to merge 2 commits into
kubeflow:mainfrom
Kartikeya-trivedi:feat/osv-scanner-auto-bump

Conversation

@Kartikeya-trivedi

Copy link
Copy Markdown
Contributor

Description

Follow-up from the checksum-drift review thread on #30: the pinned OSV_VERSION + EXPECTED_SHA is the right supply-chain pattern for a contents: write workflow, but bumping it was a manual monthly chore and nothing alerted when the pin went stale.

This adds a weekly workflow (Mondays 03:00 UTC + workflow_dispatch) that:

  • checks the latest google/osv-scanner release, and exits quietly if we're already on it
  • extracts the linux_amd64 checksum from the release's official osv-scanner_SHA256SUMS
  • cross-verifies that checksum against the actually-downloaded binary before trusting it
  • rewrites the OSV_VERSION / EXPECTED_SHA lines in osv-scanner.yaml and opens a PR for human review

The pin + checksum guard stays exactly as it is — this only removes the manual chore. A human still reviews every bump PR before it merges.

Validated the plumbing end-to-end against real releases: the extraction reproduces the v2.3.8 checksum we originally pinned byte-for-byte, and correctly detected the 2.3.8 -> 2.4.0 bump (which #30 then picked up manually). Since #30 merged with 2.4.0 pinned, this workflow's first runs will no-op until the next osv-scanner release.

Note: the bump PRs this creates need the same two admin settings as the auto-fix PRs from #30 (area/security label + Actions "allow create PRs").

Planning to mirror this to kubeflow/sdk as well, since it has the same manual-bump chore.

Type of Change

  • feat: New feature
  • fix: Bug fix
  • revert: Revert a change
  • chore: Maintenance / tooling

Checklist

  • Tests pass locally (make test-python)
  • Linting passes (make verify)
  • Documentation updated (if applicable)
  • Commit messages follow conventional format

Related Issues

Follow-up to #30 (checksum-drift review thread)

Checks the latest google/osv-scanner release weekly; when newer than the pinned version, extracts the linux_amd64 checksum from the release's official SHA256SUMS, cross-verifies it against the downloaded binary, rewrites OSV_VERSION and EXPECTED_SHA, and opens a PR for review. Preserves the pin + checksum supply-chain guard while removing the manual monthly bump.

Signed-off-by: Kartikeya Trivedi <kartikeyatrivedi4oct2004@gmail.com>
Copilot AI review requested due to automatic review settings July 18, 2026 19:51
@google-oss-prow

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please assign andreyvelich for approval. For more information see the Kubernetes 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

@github-actions

Copy link
Copy Markdown

🎉 Welcome to the Kubeflow MCP Server! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

  • If you haven't already, please check out our Contributing Guide for repo-specific guidelines and the Kubeflow Contributor Guide for general community standards
  • Our team will review your PR soon! cc @kubeflow/kubeflow-sdk-team

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

Copilot AI 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.

Pull request overview

Adds weekly automation to discover new OSV-Scanner releases, verify checksums, update the pinned scanner workflow, and open a review PR.

Changes:

  • Checks weekly for new releases.
  • Verifies the downloaded binary against release checksums.
  • Updates the scanner pin and creates a security-labeled PR.

Comment thread .github/workflows/osv-scanner-bump.yaml Outdated
Comment thread .github/workflows/osv-scanner-bump.yaml
Comment thread .github/workflows/osv-scanner-bump.yaml Outdated
Comment thread .github/workflows/osv-scanner-bump.yaml Outdated
Comment thread .github/workflows/osv-scanner-bump.yaml
Comment thread .github/workflows/osv-scanner-bump.yaml Outdated
Validate upstream version strings as strict X.Y.Z before they reach shell interpolation; reuse compare_versions.py so rollbacks/downgrades no-op instead of opening a downgrade PR; move the pin rewrite into update_scanner_pin.py which requires exactly one replacement of each line and fails rather than opening a half-updated PR (with tests); pin create-pull-request to its immutable v8 commit; document that pushing workflow-file changes needs a WORKFLOW_BUMP_TOKEN with workflow scope since GITHUB_TOKEN cannot be granted it.

Signed-off-by: Kartikeya Trivedi <kartikeyatrivedi4oct2004@gmail.com>
@google-oss-prow google-oss-prow Bot added size/L and removed size/M labels Jul 18, 2026
@Kartikeya-trivedi

Copy link
Copy Markdown
Contributor Author

@abhijeet-dhumal this is the follow-up I promised on the checksum-drift thread in #30, the weekly auto-bump for the OSV-Scanner pin, so the version + checksum never go stale silently again. Same trust model as before: checksum comes from the release's official SHA256SUMS, gets cross-verified against the downloaded binary, and a human still reviews every bump PR before merge.

Copilot's review already caught some good stuff (token scope, input validation, downgrade guard), all addressed in 07f4d0d, with the rewrite logic extracted into a tested helper per the repo convention we set up in #30.

Would appreciate a review when you get a chance 🙏

@abhijeet-dhumal

Copy link
Copy Markdown
Member

/ok-to-test

@google-oss-prow google-oss-prow Bot added the ok-to-test Approve CI for external contributors label Jul 19, 2026

@Krishna-kg732 Krishna-kg732 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.

Hey @Kartikeya-trivedi thanks for picking this up, can you please take a look at how the sdk handles the version bumps using osv scanner

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

rename the file to be consistent with the sdk repo's workflow for the same , ie; osv-scanner.yaml

@@ -0,0 +1,112 @@
name: OSV-Scanner Version Bump

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks @Krishna-kg732 for pointing this out..
@Kartikeya-trivedi can we follow the similar analogy if possible?

@Krishna-kg732 Krishna-kg732 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.

Hey @abhijeet-dhumal , do we want this workflow similar to how we have it in SDK? wdyt

@Kartikeya-trivedi

Copy link
Copy Markdown
Contributor Author

Hi @abhijeet-dhumal , @Krishna-kg732

sdk's file still says "Dependabot cannot bump curl-installed binaries — update version + checksum manually" , the exact manual chore this PR eliminates.
sdk is still pinned to 2.3.8, which is now stale (2.4.0 shipped weeks ago) that is the living proof of the drift problem PR #90 solves. sdk doesn't have the answer; it has the disease.
Their workflow list has no bump workflow at all. And the requested rename is impossible anyway: osv-scanner.yaml already exists in the repo
Bonus: sdk's own repo splits OSV concerns into separate files (osv-scanner.yaml + cleanup-overrides.yaml) so separate-file-per-concern literally is the sdk pattern. osv-scanner-bump.yaml follows it

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

Labels

ok-to-test Approve CI for external contributors size/L

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants