-
-
Notifications
You must be signed in to change notification settings - Fork 9
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
install-core issues #73
Comments
Hello git-sgmoore, your code review is greatly appreciated.
|
For Question 1, I agree the wget commands shouldn't have the URLs directly in the command. The URLs should be variables at the top of the script. @git-sgmoore does that address your concern here? If not, how do you suggest Bails would handle a change in the bitcoincore [dot] org directory structure? |
@epiccurious you've seemed to have satisfied 1 and 3. Is 5 invalid? In my bash scripts This solves 6 by only closing the calling terminal PARENT_PID=$(ps -o ppid= -p $$)
echo "Parent PID: $PARENT_PID"
sleep 2
kill -9 $PARENT_PID End of We should have this important issue closed early this week! |
Part 6 resolved by 69d5039. |
Part 5
This is where we should be making our temporary files. That way other processes on the machine cannot read our files. Done in f006701 |
@epiccurious: has a branch that resolved this. PR it again at your leisure.
I have assigned myself to this. He is right that I trust the download source to get the GPG keys and my only verification is the user and key server searching the fingerprints are correct. The key server could be faked and 99% of users will not verify fingerprints from another source. Instead we should download the keys from github.com/bitcoin/bitcoin since we're already trusting GitHub in the install instructions, and use those keys plus some I hardcore into this project repo. Verify by default with a few of these. Then change the option to "Additional Verification" where the user can trust and untrust the current signatures in the file until they reach the threshold of 2.
@epiccurious handled this as well in his branch, at least where it mattered.
This is currently irrelevant, bitcoincore dot org doesn't seem to have intentions of fixing their onion service any time soon. So we start with https clearnet.
The $TMP_DIR was changed to $XDG_RUNTIME_DIR which is restricted only to the current user, preventing other users from reading the data. Although nothing sensitive was stored in install-core.
This was changed to query the actual PID of the executing terminal and kill only that terminal and only after a 30 second delay. We no longer kill every terminal. @epiccurious: we can close this issue now when you PR your 1 & 3. Good to see our first security review addressed completely. |
Hardcoded URLs and file paths: The script uses hardcoded URLs for downloading Bitcoin Core and its checksums. If the URLs change or the files are moved, the script will break. Similarly, the script assumes a certain directory structure. If this structure changes, the script could behave unpredictably.
No verification of the GPG keys: Although the script checks the GPG signatures of the downloaded files, it doesn't check the authenticity of the GPG keys used to sign the files. An attacker who can intercept the download could replace the files and the GPG keys with their own, and the script wouldn't be able to tell the difference.
No error handling: The script doesn't handle errors in many places. If a command fails, the script may continue running with potentially inconsistent or incorrect data.
Use of HTTP instead of HTTPS: The script tries to download files over HTTP before falling back to HTTPS. Downloading files over HTTP is insecure because the data is not encrypted in transit.
Unsecured temporary files: The script creates temporary files without using any measures to secure them. This could potentially expose sensitive data.
Kill command: At the end of the script, it uses a
pkill
command to kill the terminal, which can be seen as a risky command.The text was updated successfully, but these errors were encountered: