Validate the release tag before it reaches the shell #23
Loading…
Reference in a new issue
No description provided.
Delete branch "b/workflow-tag-injection"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
🤖 Claude AI Code Review
Summary
Fixes a shell-injection risk by passing the release tag via env var and validating its format before use.
Code Quality ⭐⭐⭐⭐⭐
Correctly treats the tag as a trust boundary using env vars plus a strict regex, avoiding direct interpolation.
Issues
🟢 The second
env:REF_NAMEusage (in thevpk uploadstep) relies onREF_NAMEbeing set in that step'senv:block too — the diff only shows one step. Confirm the second step also definesenv: REF_NAMEand performs the same validation, otherwise the fix is incomplete for that step.Well-scoped security fix. Just verify the
vpk uploadstep (which appears to be a separate step) also hasREF_NAMEin itsenv:and the same validation guard.📊 Tokens: 1411 input + 298 output | 💰 Cost: ~$0.0145
Generated by Claude Opus 4.8 via Gitea Actions