Updated docs

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
This commit is contained in:
Vasu1105 2022-06-23 14:54:03 +05:30
parent ad6c7f2c8f
commit b744da071b
3 changed files with 11 additions and 1 deletions

View file

@ -259,6 +259,9 @@ inspec exec test.rb -t winrm://Administrator@windowshost --password 'your-passwo
# run test on docker container # run test on docker container
inspec exec test.rb -t docker://container_id inspec exec test.rb -t docker://container_id
# run test on podman container
inspec exec test.rb -t podman://container_id --podman-url "unix:///run/user/1000/podman/podman.sock"
# run with sudo # run with sudo
inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...] [--sudo_command ...] inspec exec test.rb --sudo [--sudo-password ...] [--sudo-options ...] [--sudo_command ...]

View file

@ -137,6 +137,8 @@ This subcommand has the following additional options:
Login path to use when connecting to the target (WinRM). Login path to use when connecting to the target (WinRM).
* `-p`, `--port=N` * `-p`, `--port=N`
Specify the login port for a remote scan. Specify the login port for a remote scan.
* `--podman-url`
Provides path to Podman API endpoint. Defaults to unix:///run/user/$UID/podman/podman.sock for rootless container, unix:///run/podman/podman.sock for rootful container.
* `--proxy-command=PROXY_COMMAND` * `--proxy-command=PROXY_COMMAND`
Specifies the command to use to connect to the server. Specifies the command to use to connect to the server.
* `--self-signed`, `--no-self-signed` * `--self-signed`, `--no-self-signed`
@ -343,6 +345,8 @@ This subcommand has the following additional options:
Login path to use when connecting to the target (WinRM). Login path to use when connecting to the target (WinRM).
* `-p`, `--port=N` * `-p`, `--port=N`
Specify the login port for a remote scan. Specify the login port for a remote scan.
* `--podman-url`
Provides path to Podman API endpoint. Defaults to unix:///run/user/$UID/podman/podman.sock for rootless container, unix:///run/podman/podman.sock for rootful container.
* `--profiles-path=PROFILES_PATH` * `--profiles-path=PROFILES_PATH`
Folder which contains referenced profiles. Folder which contains referenced profiles.
* `--proxy-command=PROXY_COMMAND` * `--proxy-command=PROXY_COMMAND`
@ -559,6 +563,8 @@ This subcommand has the following additional options:
Login path to use when connecting to the target (WinRM). Login path to use when connecting to the target (WinRM).
* `-p`, `--port=N` * `-p`, `--port=N`
Specify the login port for a remote scan. Specify the login port for a remote scan.
* `--podman-url`
Provides path to Podman API endpoint. Defaults to unix:///run/user/$UID/podman/podman.sock for rootless container, unix:///run/podman/podman.sock for rootful container.
* `--proxy-command=PROXY_COMMAND` * `--proxy-command=PROXY_COMMAND`
Specifies the command to use to connect to the server. Specifies the command to use to connect to the server.
* `--reporter=one two:/output/file/path` * `--reporter=one two:/output/file/path`

View file

@ -36,7 +36,7 @@ inspec help shell # This will describe inspec shell usage
If you wish to connect to a remote machine (called a target within If you wish to connect to a remote machine (called a target within
InSpec), you can use the `-t` flag. We support connecting using SSH, InSpec), you can use the `-t` flag. We support connecting using SSH,
WinRM and docker. If no target is provided, we implicitly support the WinRM ,docker and podman. If no target is provided, we implicitly support the
"local" target - i.e. tests running on the current machine running "local" target - i.e. tests running on the current machine running
InSpec. For an SSH connection, use `-i` for specifying SSH key files, InSpec. For an SSH connection, use `-i` for specifying SSH key files,
and the `--sudo*` commands for requesting a privilege escalation after and the `--sudo*` commands for requesting a privilege escalation after
@ -49,6 +49,7 @@ inspec shell -t ssh://user@hostname:1234 -i /path/to/user_key # Login to hostna
inspec shell -t winrm://UserName:Password@windowsmachine:1234 # Login to windowsmachine over WinRM as UserName. inspec shell -t winrm://UserName:Password@windowsmachine:1234 # Login to windowsmachine over WinRM as UserName.
inspec shell -t winrm://windowsmachine --user 'UserName@domain' --password 'Secret123!' # Login to windowsmachine as UserName@domain.org. inspec shell -t winrm://windowsmachine --user 'UserName@domain' --password 'Secret123!' # Login to windowsmachine as UserName@domain.org.
inspec shell -t docker://container_id # Login to a Docker container. inspec shell -t docker://container_id # Login to a Docker container.
inspec shell -t podman://container_id --podman-url "unix:///run/user/$UID/podman/podman.sock" #Login to Podman rootless container.
``` ```
## Resource Packs ## Resource Packs