-
Notifications
You must be signed in to change notification settings - Fork 14
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
Read from STDIN #1
Comments
So there are a couple problems with this. First, Second, reading the script from
|
Yap @ellotheth good points about not accepting interactive input since after encountering EOF from the script read, os.Stdin is closed. A bad hack could re-open os.Stdin but we probably wouldn't want that. If you see a way out of this, I have a PR for you implementing reading from stdin ;) |
Fixes ellotheth#1. This PR starts the ability to read from stdin. The main problem though is that os.Stdin is consumed for the script body's read and EOF encountered. This means that we won't have interactive input.
@odeke-em Thanks for the PR! I've had reading from I was contemplating having some kind of client-side config file that contains trusted PGP fingerprints, and allowing a non-interactive install if the author fingerprint matches one in the trusted list. That'd be a colossal extra hassle for most users, but most users would probably be fine with the non- Security-wise, users would be in the same boat as before: improved over a straight content hash verification, but still vulnerable to social engineering (hi i'm fakegemma and this is my new fingerprint please update your trusted file). On the other hand, I don't see a huge difference between that and adding somebody's public key to your |
It could also output to stdout, so |
@kapouer Yes, that'd be lovely! If there's a good solution for non-interactive processing, |
Fixes ellotheth#1. This PR starts the ability to read from stdin. The main problem though is that os.Stdin is consumed for the script body's read and EOF encountered. This means that we won't have interactive input.
Edit: Piping to bash disable the |
Operating on the assumption that the primary use case for this is automated scripts:
I could disable the The flow would be something like
Properly, "trust" is only signified when Alice signs Bob's key and publishes the signature, not when she adds Bob's key to her keyring. In practice, I import people's keys and use them to verify signatures (without signing them myself) all the time. |
IMHO it's great. But I have a doubt in the local keyring part. In the first case (I suppose it's the "correct" way) |
@TheZ3ro The user would be responsible for adding the author key to their keyring, so your "zeroth" step is correct. |
Fixes #1: Read shell scripts from STDIN
Because
curl |pipethis
would be nifty.The text was updated successfully, but these errors were encountered: