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.
I saw a recent blog post by Joren Vrancken about a command injection vulnerability in the GH Pages build pipeline. A small code snippet from this repo was shared, which showed how the input path provided to this action was not being escaped. This action could be triggered by an HTTP endpoint used when changing Jekyll themes, which is ultimately what led to the vulnerability.
The vulnerability has since been resolved by disabling the Jekyll theme picker in the UI (and the associated HTTP endpoint), but the underlying bug in this action still exists: paths are still interpolated directly in a shell script instead of being quoted or escaped properly. Practically speaking, this means that this action doesn't allow input paths with spaces or quotes.
This PR fixes that bug by passing the input paths as an env var, rather than interpolating the string in the shell script directly. I even set up some test repositories to exercise this, so now even repo layouts with weird path names work, including spaces and double quotes.