Repository navigation
Potential fix for code scanning alert no. 265: Environment variable built from user-controlled sources - #47600
Closed
tarekziade wants to merge 1 commit into
Closed
tarekziade wants to merge 1 commit into
tarekziade wants to merge 1 commit into
Conversation
…uilt from user-controlled sources Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
Contributor
CI recapDashboard: View test results in Grafana |
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
Collaborator
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.
Potential fix for https://github.com/huggingface/transformers/security/code-scanning/265
Use GitHub Actions’ multiline env-file format with a unique delimiter instead of
KEY=VALUEwhen assigning a value derived from runtime data. This prevents newline/env-injection because the value is bounded by explicit delimiter markers, not parsed as extraKEY=VALUElines.Best minimal fix (no functionality change):
.github/workflows/check_failed_tests.yml, update theGet \END_SHA` from previous CI runs of the same workflowstep (run:` block around lines 203–204).uuidgen), and append:END_SHA<<$DELIM$DELIMto
$GITHUB_ENV.No new imports/dependencies are required; this is shell-only.
Suggested fixes powered by Copilot Autofix. Review carefully before merging.