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

CIS-DI-0010 reported even when environment variable is empty #180

Closed
SIPR-octo opened this issue May 18, 2022 · 1 comment · Fixed by #194
Closed

CIS-DI-0010 reported even when environment variable is empty #180

SIPR-octo opened this issue May 18, 2022 · 1 comment · Fixed by #194
Labels
bug Something isn't working

Comments

@SIPR-octo
Copy link

Description

The checkpoint CIS-DI-0010 is raising a FATAL error even when the detected environment variable is empty.

It is actually a common practice to have empty environment variable, in order to "document" them.

Example: ENV POSTGRES_PASSWORD=

If dockle can read the environment variable value, it would be great if it would not report in case the variable is empty.

How to reproduce

My Dockerfile:

FROM alpine:latest

ENV APPLE_SAUCE_SECRET=

The result:

FATAL	- CIS-DI-0010: Do not store credential in environment variables/files
	* Suspicious ENV key found : APPLE_SAUCE_SECRET (You can suppress it with --accept-key)

I can indeed suppress the error but I think this should not be reported as a non-compliance.

@SIPR-octo SIPR-octo added the bug Something isn't working label May 18, 2022
@tomoyamachi tomoyamachi linked a pull request Jul 23, 2022 that will close this issue
@tomoyamachi
Copy link
Collaborator

@SIPR-octo I've fixed it on v0.4.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants