mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
add sudo_command option
This commit is contained in:
parent
7c9706bbd7
commit
9795879628
3 changed files with 6 additions and 1 deletions
|
@ -190,7 +190,7 @@ inspec exec test.rb -t winrm://Administrator@windowshost --password 'your-passwo
|
|||
inspec exec test.rb -t docker://container_id
|
||||
|
||||
# run with sudo
|
||||
inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...]
|
||||
inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...] [--sudo_command ...]
|
||||
```
|
||||
|
||||
### detect
|
||||
|
|
|
@ -41,6 +41,9 @@ The following options may be used with any of the InSpec CLI subcommands:
|
|||
``--sudo_password``
|
||||
The sudo password, if required.
|
||||
|
||||
``--sudo_command``
|
||||
Altnerate sudo command, if required.
|
||||
|
||||
``-t``, ``--target``
|
||||
The URI for the target of a remote scan, preceded by the target's backend. For example: ``backend://user:pass@host:port``, where ``backend`` is one of ``docker``, ``local``, ``ssh``, or ``winrm``.
|
||||
|
||||
|
|
|
@ -29,6 +29,8 @@ module Inspec
|
|||
desc: 'Specify a sudo password, if it is required.'
|
||||
option :sudo_options, type: :string,
|
||||
desc: 'Additional sudo options for a remote scan.'
|
||||
option :sudo_command, type: :string,
|
||||
desc: 'Altnerate command for sudo.'
|
||||
option :ssl, type: :boolean,
|
||||
desc: 'Use SSL for transport layer encryption (WinRM).'
|
||||
option :self_signed, type: :boolean,
|
||||
|
|
Loading…
Reference in a new issue