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

Fixed exclude flag issue with functions_lib.sh #392

Merged
merged 1 commit into from Sep 2, 2019

Conversation

@jammasterj89
Copy link
Contributor

commented Sep 2, 2019

Hi,

There is a bug when using the -e flag, this is because of the way the functions_lib.sh is called within docker-bench-security.sh when it is set. This is because of line 141 "grep 'check_[0-9]'". It is not checking for functions that are all text, two that are used are: check_product_license and check_running_containers. This means if the -e flag is set these functions are not ran. This causes the "out of range" errors because the variables set within these functions "enterprise_license" and "running_containers" respectively are not set when checked.

However, "running_containers" is set within the main docker-bench-security.sh so no "out of range" errors are shown because it is never blank (check_running_containers is still useful though because it informs the user that no containers are running).

I have fixed both issues with the following PR. As you can it simply includes these missing check functions when the -e flag is set.

Fixed exclude flag issue with functions_lib.sh
Include the all text named functions within functions_lib.sh call if the -e flag is set.

Signed-off-by: Niall T <jammasterj89@gmail.com>

@konstruktoid konstruktoid merged commit 6d73492 into docker:master Sep 2, 2019

1 check passed

dco-signed All commits are signed
@konstruktoid

This comment has been minimized.

Copy link
Member

commented Sep 2, 2019

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.