Closed mccbryan3 closed 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?
Added @mccbryan3 to the @CrowdStrike/solution-architects group
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
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.