Add shell options

This commit is contained in:
Morley, Jonathan 2016-09-30 15:18:14 -04:00
parent bf623e6a7d
commit efc7eba050
4 changed files with 16 additions and 1 deletions

View file

@ -210,6 +210,9 @@ inspec exec test.rb -t docker://container_id
# run with sudo
inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...] [--sudo_command ...]
# run in a subshell
inspec exec test.rb --shell [--shell-options ...] [--shell-command ...]
```
### detect

View file

@ -32,6 +32,12 @@ module Inspec
desc: 'Additional sudo options for a remote scan.'
option :sudo_command, type: :string,
desc: 'Alternate command for sudo.'
option :shell, type: :boolean,
desc: 'Run scans in a subshell. Only activates on Unix.'
option :shell_options, type: :string,
desc: 'Additional shell options.'
option :shell_command, type: :string,
desc: 'Specify a particular shell to use.'
option :ssl, type: :boolean,
desc: 'Use SSL for transport layer encryption (WinRM).'
option :self_signed, type: :boolean,

View file

@ -14,11 +14,14 @@ Options:
[--sudo-password=SUDO_PASSWORD] # Specify a sudo password, if it is required.
[--sudo-options=SUDO_OPTIONS] # Additional sudo options for a remote scan.
[--sudo-command=SUDO_COMMAND] # Alternate command for sudo.
[--shell], [--no-shell] # Run scans in a subshell. Only activates on Unix.
[--shell-options=SHELL_OPTIONS] # Additional shell options.
[--shell-command=SHELL_COMMAND] # Specify a particular shell to use.
[--ssl], [--no-ssl] # Use SSL for transport layer encryption (WinRM).
[--self-signed], [--no-self-signed] # Allow remote scans with self-signed certificates (WinRM).
[--json-config=JSON_CONFIG] # Read configuration from JSON file (`-` reads from stdin).
l, [--log-level=LOG_LEVEL] # Set the log level: info (default), debug, warn, error
[--format=FORMAT]
[--format=FORMAT]
l, [--log-level=LOG_LEVEL] # Set the log level: info (default), debug, warn, error
[--log-location=LOG_LOCATION] # Location to send diagnostic log messages to. (default: STDOUT or STDERR)
[--diagnose], [--no-diagnose] # Show diagnostics (versions, configurations)

View file

@ -14,6 +14,9 @@ Options:
[--sudo-password=SUDO_PASSWORD] # Specify a sudo password, if it is required.
[--sudo-options=SUDO_OPTIONS] # Additional sudo options for a remote scan.
[--sudo-command=SUDO_COMMAND] # Alternate command for sudo.
[--shell], [--no-shell] # Run scans in a subshell. Only activates on Unix.
[--shell-options=SHELL_OPTIONS] # Additional shell options.
[--shell-command=SHELL_COMMAND] # Specify a particular shell to use.
[--ssl], [--no-ssl] # Use SSL for transport layer encryption (WinRM).
[--self-signed], [--no-self-signed] # Allow remote scans with self-signed certificates (WinRM).
[--json-config=JSON_CONFIG] # Read configuration from JSON file (`-` reads from stdin).