CrowdStrike / container-image-scan

Code to scan a container with CrowdStrike and return response codes indicating pass/fail status.
MIT License
35 stars 23 forks source link

removed default for the required parameters #20

Closed mccbryan3 closed 3 years ago

mccbryan3 commented 3 years ago

Environment variables for the values cloud and tag do not overwrite the default value defined in def parse_args()

This can be verified by printing the contents of the variables in main when using environment variables.

This can be remedied by either commenting the line 267, removing the required from the parameter or removing the default value. Since this value should probably be defined almost always I decided to remove the default value.

isimluk commented 3 years ago

Good catch @mccbryan3!

Do we need to keep defaults somehow, @redhatrises, or do we want to drop the defaults and force people to be explicit?

shawndwells commented 3 years ago

Added @mccbryan3 to the @CrowdStrike/solution-architects group

redhatrises commented 3 years ago

Thanks for finding this. We should keep the defaults rather than forcing being explicit for every option. The approach in this PR however isn't solving the issue/bug... the problem lies in https://github.com/CrowdStrike/container-image-scan/blob/main/cs_scanimage.py#L265