Closed nnickie23 closed 1 year ago
Describe the bug controls/container_images.rb uses docker history to inspect commands, and the command looks like this:
controls/container_images.rb
docker history
command("docker --no-trunc history #{id}| grep -e 'update'")
Expected behavior The output without error is expected. This can be achieved by placing the flag ---no-trunc at the end of command string:
---no-trunc
command("docker history #{id} --no-trunc | grep -e 'update'")
Actual behavior The stdout of running this command is empty because the command has an error:
unknown flag: --no-trunc ...
Example code
command(docker --no-trunc history #{id}| grep -e 'update')
OS / Environment
NAME="Ubuntu" VERSION="20.04 LTS (Focal Fossa)"
Inspec Version
4.46.13
Baseline Version
1.12.0
Thanks for reporting this! Do you want to create a PR to fix it?
@rndmh3ro yes
How could I do this?
Take a look at the docs here: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request
Describe the bug
controls/container_images.rb
usesdocker history
to inspect commands, and the command looks like this:Expected behavior The output without error is expected. This can be achieved by placing the flag
---no-trunc
at the end of command string:Actual behavior The stdout of running this command is empty because the command has an error:
Example code
OS / Environment
NAME="Ubuntu" VERSION="20.04 LTS (Focal Fossa)"
Inspec Version
Baseline Version