-
Notifications
You must be signed in to change notification settings - Fork 542
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
[RFE] Extend sos clean
to have an option for environment variables
#3523
Comments
Hi @TurboTurtle, I discussed this with @arif-ali and @dnegreira already, and I wanted your opinion, if that makes sense. I see you did the contributions to add |
I agree this would be a nice addition, I'm of two minds on implementation. The first is that we create a new parser and mapping for env vars - it would largely be a copy of The other choice is to still hook this up to |
Hi @TurboTurtle, thanks for the feedback. To simplify it for me (a beginner :D) can I propose to do a copy-and-paste-and-change of |
You're welcome to take on contributing a new pbfuscator for env vars, definitely. You'd need to do the parser and mapping, which could be largely copied from |
On certain environments, such as CI pipelines, we may pass secrets via environment variables. In case of a failure, these secrets may be captured in logs by accident. Specifically in the CI case, Github and Co. will go to great lengths to avoid that, but they will not check if our output is the sosreport tarball.
My proposal is to extend the
sos clean
command to consider environment variables.We'd call it as follows:
Then, if a given env variable (say,
key1
) is found, then we search for its value (e.g.value1
). If no variables are passed, then we consider all the env. variables available as secrets.Checking for env. variables would avoid the case of one person writing the actual code and another managing pipelines and accidentally leaking the content.
The reason to not use the
keyword
in this case is b/c I may not be willing to write those secrets to a file and I do not necessarily want to enforce the user to remember each secret it wants to hide.The text was updated successfully, but these errors were encountered: