Description
Currently, when using the run function to execute commands that require sensitive input (like passwords), there's no secure way to provide this input without exposing it in command arguments.
For example, when using the zip command with password protection, we'd ideally use the -e option which prompts for a password rather than passing it directly in the command line (which would expose it in process listings and logs):
# Insecure - password visible in process list
zip -P mypassword archive.zip files/
# Secure - password prompted interactively
zip -e archive.zip files/
Example Usage
// Secure password handling for zip encryption
run(
['zip', '-e', 'archive.zip', 'files/'],
input: "mypassword\nmypassword\n" // Many commands ask for password twice
);
This would leverage Symfony Process's setInput() method internally.
Description
Currently, when using the
runfunction to execute commands that require sensitive input (like passwords), there's no secure way to provide this input without exposing it in command arguments.For example, when using the
zipcommand with password protection, we'd ideally use the-eoption which prompts for a password rather than passing it directly in the command line (which would expose it in process listings and logs):Example Usage
This would leverage Symfony Process's
setInput()method internally.