-
Notifications
You must be signed in to change notification settings - Fork 22
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels