Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

avoid passing passphrase using shell, because it is non-optimal #781

Open
joshrabinowitz opened this issue Feb 22, 2022 · 4 comments
Open

Comments

@joshrabinowitz
Copy link
Collaborator

joshrabinowitz commented Feb 22, 2022

in src/_utils/_git_secret_tools.sh we pass the passphrase to gnupg using 'echo', which means it could be visible to other users using ps. Can we improve this situation?
See https://github.com/sobolevn/git-secret/blob/master/src/_utils/_git_secret_tools.sh#L815

EDIT: this has been fixed to use a more secure method

@joshrabinowitz
Copy link
Collaborator Author

joshrabinowitz commented Feb 22, 2022

Ditto for passing passphrase on command line to 'reveal' and 'cat', can we provide/document another way?
See
https://github.com/sobolevn/git-secret/blob/master/src/commands/git_secret_reveal.sh#L25
and
https://github.com/sobolevn/git-secret/blob/master/src/commands/git_secret_cat.sh#L14
(Edit: fixed links)

@joshrabinowitz
Copy link
Collaborator Author

joshrabinowitz commented Feb 25, 2022

@sobolevn
Copy link
Owner

This looks like a more secure approach, 100%

@joshrabinowitz
Copy link
Collaborator Author

ok, we now use a file descriptor to pass the passphrase from git-secret to gnupg.

I think all that remains of this ticket is to discourage people from using the -p PASSPHRASE option of reveal and cat where possible, and document the alternatives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants