Repository navigation
fix: pass inputs to run scripts through env - #8
Merged
Merged
Conversation
Move ${{ inputs.* }} and ${{ steps.ip.outputs.ipv4 }} out of the run:
scripts into step-level env: variables, replacing each expression with
the matching ${VAR} at the same position and with the same quoting, so
behaviour is unchanged. Avoids script injection through action inputs
(CodeQL actions/code-injection).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Passes action inputs to the
run:scripts throughenv:instead of expanding${{ inputs.* }}/${{ steps.ip.outputs.ipv4 }}directly inside the scripts. This is GitHub's recommended pattern against script injection, and it resolves the CodeQLactions/code-injectionalerts foraction.yml.What changes
run:step that used an expression now gets anenv:block with the same expressions (SSH_KEY,SERVER_HOST,APP_NAME,APP_FILE,AWS_SG,RUNNER_IP, …).${{ … }}is replaced by the matching${VAR}at the same position, with the same quoting, so word splitting and the deploy arguments behave exactly as before.action-deploy-jsreport.Effect on callers
None until a new release: callers pin this action to the
v1.1.0commit. After merge, tag a new release (e.g.v1.1.1) and let Dependabot bump the pins, or bump them by hand.🤖 Generated with Claude Code