Add some debug output around version selection#40
Draft
namespacebrian wants to merge 3 commits intomainfrom
Draft
Add some debug output around version selection#40namespacebrian wants to merge 3 commits intomainfrom
namespacebrian wants to merge 3 commits intomainfrom
Conversation
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
| - name: Install Terminus | ||
| shell: bash | ||
| run: | | ||
| FINAL_VERSION="${{ inputs.terminus-version || env.TERMINUS_RELEASE }}" |
Check warning
Code scanning / CodeQL
Code injection Medium
Show autofix suggestion
Hide autofix suggestion
Copilot Autofix
AI 9 months ago
To fix the issue, we will:
- Assign the untrusted input (
inputs.terminus-version || env.TERMINUS_RELEASE) to an intermediate environment variable. - Use the shell's native syntax (
$VARIABLE) to reference the environment variable in the script, instead of directly interpolating it with${{ ... }}. - Ensure that the input is sanitized or validated before use, if necessary.
This approach prevents direct interpolation of untrusted input into the shell script, mitigating the risk of code injection.
Suggested changeset
1
action.yml
| @@ -54,3 +54,3 @@ | ||
| run: | | ||
| FINAL_VERSION="${{ inputs.terminus-version || env.TERMINUS_RELEASE }}" | ||
| FINAL_VERSION="$TERMINUS_VERSION" | ||
|
|
||
| @@ -91,3 +91,3 @@ | ||
| env: | ||
| TERMINUS_RELEASE: ${{ inputs.terminus-version || env.TERMINUS_RELEASE }} | ||
| TERMINUS_VERSION: ${{ inputs.terminus-version || env.TERMINUS_RELEASE }} | ||
| DEBUG: ${{ inputs.debug }} |
Copilot is powered by AI and may make mistakes. Always verify output.
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.
When I tested this, it didn't seem to print the additional information and I'm not sure why.