Re:I'm Switching to Python and Actually Liking It
by shakna on Wednesday July 16, 2025 @05:09PM
(#44586800)
You don't generally want API keys accidentally recorded into someone's bash history.
[ Parent
| on HN ]
Re:I'm Switching to Python and Actually Liking It
by zahlman on Wednesday July 16, 2025 @08:47PM
(#44588521)
What exactly is your threat model, where the attacker can read ~/.bash_history but can't execute (or capture output from) /usr/bin/env?
Re:I'm Switching to Python and Actually Liking It
by dapperdrake on Wednesday July 16, 2025 @11:36PM
(#44589458)
Threat model: shell scripts
Re:I'm Switching to Python and Actually Liking It
by pastage on Wednesday July 16, 2025 @10:09PM
(#44589007)
You do NOT save passwords in shell history, it is insanely insecure. Lets begin with the passwords being readable by everything that can list tasks.
You can protect passwords in a password manager. You do not need to keep the passwords in env and I do not.
Re:I'm Switching to Python and Actually Liking It
by zahlman on Wednesday July 16, 2025 @10:12PM
(#44589025)
> Lets begin with the passwords being readable by everything that can list tasks.
Why are processes running that can do this, that I don't already fully trust?
> You can protect passwords in a password manager.
What's your plan for supplying the password to the program, given that people will want to automate use of the program?
Re:I'm Switching to Python and Actually Liking It
by ftigis on Thursday July 17, 2025 @12:58AM
(#44589830)
How about not accidentally showing tokens and credentials when live screen sharing?
Re:I'm Switching to Python and Actually Liking It
by shakna on Thursday July 17, 2025 @03:07AM
(#44590575)
CI and other build systems. Where tokens have been stolen in the past, by users not caring, and a VM not being properly cleaned.
Re:I'm Switching to Python and Actually Liking It
by fc417fc802 on Friday July 18, 2025 @01:02AM
(#44601370)
The threat model is that history is persistent while the environment isn't. That said, whenever possible you should handle secrets using file descriptors as opposed to environment variables.