easybuild-framework
easybuild-framework copied to clipboard
censor values of filtered/sensitive environment variables rather than removing them from test report
trafficstars
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...