Skip to content

feat: [SDK-3679] Add rust-eol-versions action and sdk-rust-versions workflow - #131

Merged
keelerm84 merged 1 commit into
mainfrom
mk/SDK-3679/rust-versions
Nov 18, 2026
Merged

keelerm84 merged 1 commit into
mainfrom
mk/SDK-3679/rust-versions

Conversation

@keelerm84

@keelerm84 keelerm84 commented Nov 17, 2026 •

Copy link
Copy Markdown
Member

Summary

The Rust repositories each carry a check-rust-versions.yml that pastes fromJSON(env.fetchApiData)[2].cycle from endoflife.date into a run: script with ${{ }}. The result then goes into sed in a job with contents: write and pull-requests: write. A change to the endoflife.date feed could run commands with that token. Cursor's security review flagged the copy in hello-rust#32. rust-server-sdk, rust-sdk-transport and rust-eventsource-client have the same code.

This adds the Rust equivalent of go-eol-versions and sdk-go-versions.yml:

  • actions/rust-eol-versions reads the feed with jq, takes the cycle at offset releases back from the newest (default 2, the third newest, which is the current policy), and fails unless it matches ^[0-9]+\.[0-9]+$. offset must be a non-negative integer.
  • .github/workflows/sdk-rust-versions.yml reads target= from .github/variables/rust-versions.env. When the target changes, it rewrites that line and rust-version in each cargo_tomls file, then opens a <pr_title_prefix>: Bump MSRV from <old> to <new> PR. Values reach the shell only through environment variables. The update step checks the version format again before it runs sed. The checkout does not persist credentials.
  • .github/workflows/test-rust-eol-versions.yml runs the action against the live feed, and against local payloads with command substitution, a closing quote, a missing entry, or a bad offset. Each of those must fail with no output.

release-please tracks the action from 0.1.0. After this merges, I'll switch the three Rust SDK repos and hello-rust to the shared workflow.

Opened from termag


Note

Overview
Introduces rust-eol-versions, a composite action that picks a Rust release from endoflife.date (default: third newest) and only exposes a target cycle string after offset and version regex validation, so downstream shell steps are not driven by raw third-party JSON.

Adds the reusable sdk-rust-versions workflow to compare that target with target= in a versions env file, update listed Cargo.toml rust-version fields when needed, and open MSRV bump PRs with credential persistence disabled and a second format check before sed.

Adds test-rust-eol-versions CI (live feed plus malicious/malformed payload matrix) and wires release-please / README docs for the new action and workflow.

Reviewed by Cursor Bugbot for commit f4a14c2. Bugbot is set up for automated code reviews on this repo. Configure here.


Related Jira issue: SDK-3679: Share and harden the Rust MSRV check workflow in gh-actions

@launchdarkly-upra launchdarkly-upra Bot changed the title feat: Add rust-eol-versions action and sdk-rust-versions workflow feat: [SDK-3679] Add rust-eol-versions action and sdk-rust-versions workflow Nov 17, 2026
@keelerm84
keelerm84 marked this pull request as ready for review November 18, 2026 14:28
@keelerm84
keelerm84 requested a review from a team as a code owner November 18, 2026 14:28
@keelerm84
keelerm84 merged commit 1b43836 into main Nov 18, 2026
9 checks passed
@keelerm84
keelerm84 deleted the mk/SDK-3679/rust-versions branch November 18, 2026 15:59
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.

2 participants