Move release and tag version into env vars to prevent template injection#2049
Merged
adamtheturtle merged 4 commits intomainfrom Mar 17, 2026
Merged
Move release and tag version into env vars to prevent template injection#2049adamtheturtle merged 4 commits intomainfrom
adamtheturtle merged 4 commits intomainfrom
Conversation
| run: echo "vws-cli==${{ needs.build.outputs.new_tag }}" > requirements.txt | ||
| env: | ||
| NEW_TAG: ${{ needs.build.outputs.new_tag }} | ||
| run: echo "vws-cli==$NEW_TAG" > requirements.txt |
There was a problem hiding this comment.
Windows steps use Bash env syntax
High Severity
In build-windows, run blocks reference NEW_TAG as $NEW_TAG, but default Windows shell is PowerShell. That syntax reads an undefined PowerShell variable, not the env var from env:. This makes requirements.txt version empty and causes gh release upload to run with an empty tag.
Additional Locations (1)
Made-with: Cursor
Made-with: Cursor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 2 total unresolved issues (including 1 from previous review).
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Moves
steps.calver.outputs.releaseandsteps.tag_version.outputs.new_taginto environment variables in run/command blocks to prevent template injection, following GitHub's recommended security pattern.See: https://docs.github.com/en/actions/concepts/security/script-injections
Note
Medium Risk
Touches the release pipeline commands used for tagging, packaging, and publishing; while changes are mostly quoting/variable plumbing, mistakes could break releases across multiple targets.
Overview
Hardens the release GitHub Actions workflow by moving dynamic values (e.g., computed
releaseandnew_tag, plusmodifiedFilescounts) into stepenvvars and then referencing them insiderun/retrycommandblocks with shell quoting to reduce template/script injection risk.This update is applied across changelog/version updates, tag checkouts, PyPI install checks, Homebrew formula generation, PyInstaller binary builds, Docker image tagging/build args, and release asset uploads.
Removes the
template-injectionrule override fromzizmor.yml(no longer disabled).Written by Cursor Bugbot for commit 8245c36. This will update automatically on new commits. Configure here.