Repository navigation
ci: pass the release version to scripts only through env (SECOPS-1274) - #575
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
jrusso1020
left a comment
There was a problem hiding this comment.
APPROVE. Reviewed at 368a09cce4b1e7fa0bdb442a0608fd25bb7de40d.
Every workflow input and step output now reaches shell only through env:, and each value is checked before use: the version is validated in a step whose output everything downstream reads, and the cleanup and draft scripts validate tag, commit and run ID before they go into API paths, jq filters and refspecs.
Checked:
- No
${{ }}expression is left in anyrun:block in any workflow at the stack head (a YAML walk over.github/workflows/*.ymlprinted nothing). The remaining expressions sit inenv:,with:andoutputs:, where they are not shell. - The dev tag pattern
-dev\.[0-9]{12}matches whatdev-release.ymlproduces (date -u +%Y%m%d%H%M) and the existing tags (for examplev0.6.1-dev.202608120628). cleanupruns only whentag_push_attempted == 'true', which comes after the version step, sooutputs.tagis never empty there.- Turning off
setup-go's cache on both release workflows closes a poisoned-cache path from othermainruns. The cost is build time, which is fine for a release.
Nit (non-blocking): the version regex allows leading zeros, so v0.11.00 passes as a new version even though it is v0.11.0 again. Details and a suggested regex are in the #576 review, since the CDN check is where it shows.
Need: yes, release inputs reached shell unquoted · Size: ok · Reuse: nothing to reuse (same env-only pattern the commit input already used) · Simpler: already minimal · Structure: fine (checked the existing COMMIT env pattern in the same file; no split)
Risk: medium — release pipeline for a public installer; behavior change is input handling only.
— Rames
Co-Authored-By: Claude Opus 5.5 <[email protected]>
jrusso1020
left a comment
There was a problem hiding this comment.
APPROVE (re-review). Reviewed at 06db8dc0ea5dcc56e2334d0817f84b45d845b742. The delta since 368a09cc is the one commit 06db8dc, which changes only the regex.
The leading-zero nit is fixed. The version-validation step, cleanup-failed-release.sh and find-run-draft.sh now use ^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*) (with the optional -dev\.[0-9]{12} suffix in the two scripts).
Dev tags still pass. I ran the new script pattern over all 141 tags in the repo:
- 138 match.
- The 3 rejections are the April-era
v0.0.1-dev.20260407.<sha>tags. The round-1 pattern already rejected them, anddev-release.ymlno longer produces that shape. Itsawk printf "%d.%d.%d"can't emit leading zeros, and the 12-digit timestamp still matches.
Spot checks:
- Accepted:
v0.6.1-dev.202608120628,v0.0.0,v10.20.30 - Rejected:
v0.11.00,v0.011.0,v00.1.0,v0.6.01-dev.…,v1.2.3-rc.1
Need: yes · Size: ok · Reuse: nothing to reuse · Simpler: already minimal · Structure: fine (checked the round-1 patterns in the same three sites; no split)
Risk: medium — release pipeline; this delta only narrows accepted input.
— Rames
Scope
Surfaces: CI (release workflows) | Module: Release
Summary
Hardens how the release workflows handle the
versioninput. Live on merge, with no change to a normal release.How it works
Details are in the linked SecOps issue.
Testing
actionlint(with shellcheck) passes on both workflows, and shellcheck passes on the scripts.🤖 Generated with Claude Code