gorgeous-winter-99296
11/20/2022, 9:42 PMcurved-television-6568
11/20/2022, 11:25 PMgorgeous-winter-99296
11/21/2022, 10:25 AM__repr__
and __str__
to start with.hundreds-father-404
11/21/2022, 4:23 PM<http://logger.info|logger.info>("sensitive data")
linesgorgeous-winter-99296
11/21/2022, 4:25 PMProcess
on the rust side as well though - the rust implementation of it is both Debug
and Serialize
. https://github.com/pantsbuild/pants/blob/main/src/rust/engine/process_execution/src/lib.rs#L479-L481hundreds-father-404
11/21/2022, 4:28 PMargv
. but not env varshundreds-father-404
11/21/2022, 4:29 PM--keep-sandboxes
gorgeous-winter-99296
11/21/2022, 4:31 PMhundreds-father-404
11/21/2022, 4:41 PM-ldebug
, fwit. but that's not very safe because that's sometimes used in CI when debugging. We ask people to use it a lot to help us help them debuggorgeous-winter-99296
11/21/2022, 4:48 PMsecrets
arg for Process and an interpolation-like syntax? ${{ secrets.API_TOKEN }}
maybe.hundreds-father-404
11/21/2022, 4:53 PMgorgeous-winter-99296
11/21/2022, 5:00 PMpassword
input from a Secret
for the python_distribution
publish
action; we should definitely use the TWINE_PASSWORD
env variable to run it. But... if someone else implements a backend for BadlyDesignedTool they shouldn't leak their credentials if we can prevent it.gorgeous-winter-99296
11/21/2022, 5:18 PMhundreds-father-404
11/21/2022, 5:19 PMif someone else implements a backend for BadlyDesignedTool they shouldn't leak their credentials if we can prevent it.Yeah, but that's theoretical at this point, right? So far it hasn't been an issue because all tools have been designed well We try to avoid "premature generalization" -- when this situation happens in the future, if ever, we can tweak Pants to handle this concern. For example, it has been super helpful to dump argv in
-ldebug
. It would be complicated if we now only sometimes did that. That code complexity has a real cost, e.g. harder to understand code and more likely we have bugsgorgeous-winter-99296
11/21/2022, 5:23 PM-ldebug
. Who's to blame for the leaks?gorgeous-winter-99296
11/24/2022, 10:15 PMpants_ext
direcory with code I think would could be reused as pants core code. See my python_distribution_with_secret
target which IMO would be an improvement over today. That's not what drove this from the start; but it was something where I could fix what is a workflow problem for me.
However, merging something like this also opens up unsafety that I'm not sure I like where it'd require more time from regular Pants contributors to fix holes - argv and env we've mentioned above; but there's other situations - what if I put a credential in a file? Can I ensure that file doesn't get cached? Is a blinking warning sign on all docs related to secrets the highest reward-per-effort we can get there?gorgeous-winter-99296
11/24/2022, 10:20 PM