-
Notifications
You must be signed in to change notification settings - Fork 253
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
[Feature Request] Ability to hide string of command using execute #429
Comments
Hi @NorseGaud thanks for the issue report. The first place I can imagine looking is at a custom logger where we could do the redaction. SSHKit and Capistrano use the same This would enable you to make a special case for when the logger gets a How we handle that in regards of telling the logger what to redact is another problem, but at least I think the experimentation starts there. |
I looked up where the code is - apparently it lives here - https://github.com/capistrano/sshkit/blob/master/lib/sshkit/formatters/pretty.rb#L18-L40 |
I'll play around a bit in a fork of sshkit and see if I can accomplish this easily. I'll submit a pull request for your review after that. Thanks Lee! |
Ok, ready for your review: #430 I'm going to bed. Been up too long 👍 |
Howdy!
I'm working on the capistrano-postgresql gem and we've switched to using execute instead of test for better user experience when they run
cap setup
.The problem: We're seeing the password in the capistrano.log and also the STDOUT.
Request: I'd love a way to wrap the
'#{fetch(:pg_password)}'
inexecute :psql, "-d #{database}", '-c', %Q{"CREATE USER \\"#{fetch(:pg_username)}\\" PASSWORD '#{fetch(:pg_password)}';"}
with something to prevent STDOUT and the log from showing it. Maybe replace it with [HIDDEN] or something.The text was updated successfully, but these errors were encountered: