Skip to content

[v15] Replace UnixShellQuote with shsprintf.EscapeDefaultContext from github.com/google/safetext#40060

Merged
jentfoo merged 1 commit intobranch/v15from
jent/UnixShellQuote-replacement-v15
Apr 1, 2024
Merged

[v15] Replace UnixShellQuote with shsprintf.EscapeDefaultContext from github.com/google/safetext#40060
jentfoo merged 1 commit intobranch/v15from
jent/UnixShellQuote-replacement-v15

Conversation

@jentfoo
Copy link
Copy Markdown
Contributor

@jentfoo jentfoo commented Mar 29, 2024

v15 backport of #40046

…hub.com/google/safetext (#40046)

This change is a change in how we are handling the untrusted input.  Instead of adopting a strategy of quoting (which was incomplete), this instead escapes any special characters.

Although github.com/google/safetext is new, and without any current tags for us to reference, I believe it would be better to reference their implementation than to update the UnixShellQuote to handle the newly identified cases.
@jentfoo jentfoo self-assigned this Mar 29, 2024
@github-actions
Copy link
Copy Markdown
Contributor

The PR changelog entry failed validation: Changelog entry not found in the PR body. Please add a "no-changelog" label to the PR, or changelog lines starting with changelog: followed by the changelog entries for the PR.

@jentfoo jentfoo added the no-changelog Indicates that a PR does not require a changelog entry label Mar 29, 2024
@zmb3
Copy link
Copy Markdown
Collaborator

zmb3 commented Mar 29, 2024

Have we tested setting up an AWS OIDC integration against a real AWS account with these changes just to make sure everything still works?

@public-teleport-github-review-bot public-teleport-github-review-bot Bot removed the request for review from zmb3 March 29, 2024 23:41
@jentfoo
Copy link
Copy Markdown
Contributor Author

jentfoo commented Apr 1, 2024

Join testing was only local. I used the original test cases to confirm that this produces shell compatible parameters (escaped). I also used a variety of command injection techniques to confirm that this seems to be sufficient in all our currently known cases.

@jentfoo jentfoo added this pull request to the merge queue Apr 1, 2024
Merged via the queue into branch/v15 with commit bf1ea20 Apr 1, 2024
@jentfoo jentfoo deleted the jent/UnixShellQuote-replacement-v15 branch April 1, 2024 19:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport no-changelog Indicates that a PR does not require a changelog entry size/sm

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants