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

prevent sudo on localhost targets #179

Merged
merged 1 commit into from
May 30, 2017
Merged

prevent sudo on localhost targets #179

merged 1 commit into from
May 30, 2017

Conversation

arlimus
Copy link
Contributor

@arlimus arlimus commented May 30, 2017

See the original PR here: inspec/inspec#1741

See the original PR here: inspec/inspec#1741

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
arlimus added a commit to inspec/inspec that referenced this pull request May 30, 2017
When running `inspec exec` without the `target` option but against remote endpoints OR when executing it with the `localhost://` target AND having `--sudo` active it would abort the execution. `--target` is a helper to set the Train parameters for `backend`, `host`, `user`, `port`, and potentially `password`. The detection would fail on providing any of these separately without specifying `--target`. The same holds true for the `localhost` train backend or just `localhost://` target.

This type of detection has since moved to Train. The driving reason was to have this very useful check for localhost vs sudo run for any type of inspec (or for that matter: train) execution.

This PR depends on inspec/train#179 and the next release of train.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Copy link
Contributor

@chris-rock chris-rock left a comment

Choose a reason for hiding this comment

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

Thank you @arlimus for this improvement

@chris-rock
Copy link
Contributor

There is a travis outage, but I tested it locally:
screen shot 2017-05-30 at 5 43 31 pm
screen shot 2017-05-30 at 5 57 09 pm

@chris-rock chris-rock merged commit 4d441d1 into master May 30, 2017
@chris-rock chris-rock deleted the dr/loca-sudo branch May 30, 2017 22:57
chris-rock pushed a commit to inspec/inspec that referenced this pull request May 30, 2017
When running `inspec exec` without the `target` option but against remote endpoints OR when executing it with the `localhost://` target AND having `--sudo` active it would abort the execution. `--target` is a helper to set the Train parameters for `backend`, `host`, `user`, `port`, and potentially `password`. The detection would fail on providing any of these separately without specifying `--target`. The same holds true for the `localhost` train backend or just `localhost://` target.

This type of detection has since moved to Train. The driving reason was to have this very useful check for localhost vs sudo run for any type of inspec (or for that matter: train) execution.

This PR depends on inspec/train#179 and the next release of train.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
aaronlippold pushed a commit to aaronlippold/inspec that referenced this pull request Jun 8, 2017
When running `inspec exec` without the `target` option but against remote endpoints OR when executing it with the `localhost://` target AND having `--sudo` active it would abort the execution. `--target` is a helper to set the Train parameters for `backend`, `host`, `user`, `port`, and potentially `password`. The detection would fail on providing any of these separately without specifying `--target`. The same holds true for the `localhost` train backend or just `localhost://` target.

This type of detection has since moved to Train. The driving reason was to have this very useful check for localhost vs sudo run for any type of inspec (or for that matter: train) execution.

This PR depends on inspec/train#179 and the next release of train.

Signed-off-by: Dominik Richter <dominik.richter@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants