Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh: shell-escape the command that is printed to stdout #279

Merged
merged 5 commits into from
Apr 27, 2023

Conversation

petersutter
Copy link
Member

What this PR does / why we need it:

  • This PR refactors the code responsible for constructing the SSH command arguments
  • Deduplicated code: Now, there is a single implementation for building the ssh command arguments, which is used for both printing to stdout and passing to exec.CommandContext
  • The ssh command that is printed to stdout is now shell-escaped

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

Release note:

`ssh`: the command that is printed to stdout is now shell-escaped

@petersutter petersutter requested a review from a team as a code owner April 26, 2023 15:46
@gardener-robot gardener-robot added needs/review Needs review size/l Size of pull request is large (see gardener-robot robot/bots/size.py) needs/second-opinion Needs second review by someone else labels Apr 26, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) and removed reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) labels Apr 26, 2023
Copy link
Member

@holgerkoser holgerkoser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/review Needs review needs/second-opinion Needs second review by someone else labels Apr 27, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 27, 2023
@petersutter petersutter force-pushed the enh/ssh-command-args branch from 5edee7d to 873540d Compare April 27, 2023 12:41
@gardener-robot gardener-robot added needs/second-opinion Needs second review by someone else and removed reviewed/lgtm Has approval for merging labels Apr 27, 2023
@gardener-robot-ci-2 gardener-robot-ci-2 removed the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 27, 2023
Copy link
Contributor

@grolu grolu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@gardener-robot gardener-robot added reviewed/lgtm Has approval for merging and removed needs/second-opinion Needs second review by someone else labels Apr 27, 2023
@gardener-robot-ci-1 gardener-robot-ci-1 added the reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) label Apr 27, 2023
@petersutter petersutter merged commit 235950d into master Apr 27, 2023
@petersutter petersutter deleted the enh/ssh-command-args branch April 27, 2023 13:20
@gardener-robot gardener-robot added the status/closed Issue is closed (either delivered or triaged) label Apr 27, 2023
@petersutter petersutter added the area/ipcei IPCEI (Important Project of Common European Interest) label Apr 27, 2023
@petersutter petersutter changed the title Refactor ssh command builder ssh: shell-escape the command that is printed to stdout May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ipcei IPCEI (Important Project of Common European Interest) needs/ok-to-test Needs approval for testing (check PR in detail before setting this label because PR is run on CI/CD) reviewed/lgtm Has approval for merging reviewed/ok-to-test Has approval for testing (check PR in detail before setting this label because PR is run on CI/CD) size/l Size of pull request is large (see gardener-robot robot/bots/size.py) status/closed Issue is closed (either delivered or triaged)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants