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

CKV_DOCKER_3: Additionally check if user is created by gosu #2294

Closed
wants to merge 6 commits into from
Closed

CKV_DOCKER_3: Additionally check if user is created by gosu #2294

wants to merge 6 commits into from

Conversation

adberger
Copy link
Contributor

@adberger adberger commented Jan 27, 2022

solves: #2218

Either USER instruction or CMD/ENTRYPOINT instruction has to be set in order for the check to pass.
CMD/ENTRYPOINT instruction additionally needs gosu as an argument and 2 more to retain the minimal usage of gosu:
Usage: ./gosu user-spec command [args]

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

checkov/version.py Outdated Show resolved Hide resolved
tests/dockerfile/checks/test_UserExists.py Outdated Show resolved Hide resolved
return CheckResult.FAILED, None
for instruction in conf:
value = instruction['value']
if instruction['instruction'] in self.supported_instructions:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm surprised you need to check here, that the instruction is one of the supported ones, but maybe my memories are blurry 😄

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied this from another test case (UpdateNotAlone.py)

@adberger
Copy link
Contributor Author

@gruebel why was this closed?

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants