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

Censor suspicious environment variables #268

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hilariocoelho
Copy link

This pull request intends to censor suspicious found environment variables.

Previously any suspicious environment variable found was being leaked during CIS-DI-0010 checkpoint assessment as seen below:

FATAL   - CIS-DI-0010: Do not store credential in environment variables/files
        * Suspicious ENV key found : GITLAB_TOKEN on /bin/sh -c #(nop)  ENV GITLAB_TOKEN=y5V1xiW5eTwq34jasRqFBD (You can suppress it with --accept-key)

With this PR the same finding would be:

FATAL   - CIS-DI-0010: Do not store credential in environment variables/files
        * Suspicious ENV key found : GITLAB_TOKEN on /bin/sh -c #(nop)  ENV GITLAB_TOKEN=******* (You can suppress it with --accept-key)

Notice that the environment variable now isn't leaked on the output to stdout. This also applies to any other export format.

This is important since Dockle might inadvertently leak production (or other environment) credentials on a CI/CD pipeline

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.

1 participant