Skip to content

censor values of filtered/sensitive environment variables rather than removing them from test report #4889

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

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

boegel
Copy link
Member

@boegel boegel commented May 21, 2025

follow-up to #4877 by @Crivella

tests will need some work, so marked as WIP

This results in filtered/censored environment variables to still be mentioned in the test report, but without their value:

$ export JWT_TOKEN_TEST='eyJAAA'
$ export export MY_SECRET=foo
$ eb example.eb --dump-test-report
$ egrep 'SECRET|TOKEN' test_report.md
JWT_TOKEN_TEST = ... # value censored since this is potentially a sensitive environment variable
MY_SECRET = ... # value censored since this is potentially a sensitive environment variable

Whether or not an environment variable was set could be useful information, even without knowing its value, hence this change.

We can potentially keep the current behavior for environment variables listed in --test-report-env-filter (i.e. actually removed them from the test report), and only use the censoring approach for "sensitive" environment variables...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant