Handling secrets (somewhat) securely in shells

16 points by polywolf


z3bra

The article advocates for using variables as a mean to "hide" secrets leaking, but it doesn't.

Both versions will leak user/password from /proc :

curl -u "alice:Hunter2" https://domain.tld

curl -u "$USER:$(cat pass.txt)" https://domain.tld

The only "reliable" way to hide a secret from other users on your machine is to have your credentials read from a file with hardened permissions.