-
Notifications
You must be signed in to change notification settings - Fork 557
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
Hide command line passwords from ps #355
Comments
Looks like you have a great solution to this. Would you be willing to take a stab at it and send a PR? I'll be happy to help in anyway possible. |
Sure! Looking at the code, I see two options for implementing this:
Thoughts? |
That's a good observation. I think solution 1 is good for the short term and file an issue with click for the longer term solution. You're right it'll be useful for others. |
👍 on the feature, I (personally) don't see the need to make it a cli argument. |
Issue #355 Use setproctitle to hide command line passwords
Fix released in 0.20.0. Please upgrade:
|
It's super convenient to be able to run pgcli like this:
However, it enables other users on the same system to see the password by running
ps
,top
, etc.Some other clients (like the regular
mysql
client) have a cunning way to hide this: http://unix.stackexchange.com/questions/88665/how-does-ps-know-to-hide-passwordsAnd there's a Python package that wraps this up to make it easy: https://github.com/dvarrazzo/py-setproctitle
Although neither of these are foolproof (there's a timing attack due to a small window of opportunity between the process being started and the args being modified), it can help reduce the attack vector.
The text was updated successfully, but these errors were encountered: