Skip to content

Conversation

petertodd
Copy link
Contributor

Tried to use it for another project and ran into some issues getting it to work on Debian 8

@maflcko
Copy link
Member

maflcko commented Mar 18, 2016

utACK 6d1016f

@laanwj
Copy link
Member

laanwj commented Mar 18, 2016

utACK


DIR=$(dirname "$0")

echo "Please verify all commits in the following list are not evil:"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you intend to remove this message?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's the third commit.

@laanwj
Copy link
Member

laanwj commented Mar 18, 2016

Ping @TheBlueMatt

@TheBlueMatt
Copy link
Contributor

Which features are bash-specific (I'm pretty sure we went through this when it was merged, and there were none left)? We should just remove the bash-specific ones, not revert to forcing bash.

@TheBlueMatt
Copy link
Contributor

Also, I do prefer to not remove the commits list message...its not there to prevent someone who has malicious access to the repo, its there to encourage people to audit the commits that were merged. If you prefer, just replace with it a notice to tell people to run git log on contrib/verify-commits manually.

@petertodd
Copy link
Contributor Author

@petertodd
Copy link
Contributor Author

@TheBlueMatt Again, if you want to encourage people, do it in a README file or similar which doesn't give the wrong impression about what's the right way to do it.

Anyway, the necessity to audit the codebase in general should be something every security conscious developer should be aware of; calling out this program specifically may in itself give people the wrong impression.

@sipa
Copy link
Member

sipa commented May 20, 2016

utACK 6d1016f543837fe3c7b0a48573771f4b17e35ff5

@petertodd petertodd force-pushed the 2016-03-fix-verify-commits branch from 6d1016f to e2764cb Compare May 20, 2016 07:58
@petertodd
Copy link
Contributor Author

@sipa Sorry, just rebased and added one more commit.

@gmaxwell
Copy link
Contributor

ACK e2764cb23826908bde171067fc5d0b0659b18952

@maflcko
Copy link
Member

maflcko commented May 20, 2016

utACK e2764cb

@TheBlueMatt
Copy link
Contributor

NACK. Please fix the two bash-isms instead of requiring bash, and avoid adding more OS-specificisms with GNU-isms (which aren't even in some BSDs). Feel free to move the warnings to a README file of somesort, though.

@petertodd
Copy link
Contributor Author

@TheBlueMatt I don't know enough about bash to know what needs to be fixed or how; if you'd like to suggest some changes please do. But if it's not going to get fixed I'd rather the failure be clear - "bash is needed and isn't installed" - than unclear.

@TheBlueMatt
Copy link
Contributor

The three commits at https://github.com/TheBlueMatt/bitcoin/commits/2016-20-7713-fixes should replace your top three just fine.

TheBlueMatt and others added 4 commits May 21, 2016 11:26
Any attacker who managed to make an evil commit that changed something in the
contrib/verify-commits/ directory could just as easily remove the warning
and/or modify it to not display the evil commits; telling the user to check
those commits specifically misleads them into checking just those commits
rather than the script itself.
Also updated trusted git root to be right after gmaxwell's last merge.
@petertodd petertodd force-pushed the 2016-03-fix-verify-commits branch from e2764cb to 11164ec Compare May 21, 2016 09:29
@petertodd
Copy link
Contributor Author

Incorporated @TheBlueMatt's /bin/sh fixes, so no longer depending on bash again.

@gmaxwell
Copy link
Contributor

gmaxwell commented May 21, 2016

reACK 11164ec (is it me, or is it obviously slower now?)

@TheBlueMatt
Copy link
Contributor

Please do leave the warning telling people to check git log in... making people see it every time until it's removed definitely has value. If not it should be added to a README somewhere.

On May 21, 2016 3:27:17 AM PDT, Gregory Maxwell notifications@github.com wrote:

reACK 11164ec


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7713 (comment)

@petertodd
Copy link
Contributor Author

@TheBlueMatt Git has had vulnerabilities before (example) where even just checking out source is sufficient to pwn your system; if you can run git log on the verify-commits directory it may be too late. If we're going to be giving advice on how to use verify-commits we should do it properly; for now removing that advice is very appropriate given that it's misleading at best.

@TheBlueMatt
Copy link
Contributor

I find it rather unlikely that git log would have a vulnerability that cant also be triggered by some other checkout/pull/etc flow. I dont think telling people to run git log is bad advice here.
I agree the existing auto-run-git log isnt ideal, but I dont see why telling people to do so is bad, let alone why removing it entirely is better.

@laanwj
Copy link
Member

laanwj commented May 30, 2016

Please add the warning back in. Seems otherwise we don't get agreement here to merge this. Its removal can be discussed separately.

@petertodd petertodd force-pushed the 2016-03-fix-verify-commits branch from cf5c842 to 60a6b13 Compare June 9, 2016 17:56
@petertodd
Copy link
Contributor Author

Added README explaining how to use verify-commits.sh safely; this should answer @TheBlueMatt's objection to removing the warning.

@petertodd petertodd force-pushed the 2016-03-fix-verify-commits branch from 60a6b13 to 966151e Compare June 9, 2016 17:58
@sipa
Copy link
Member

sipa commented Jun 11, 2016

Tested ACK (checked out this branch in one worktree, master in another, verified master using the code from this branch).

@maflcko
Copy link
Member

maflcko commented Jun 16, 2016

Anything left to do here?

@petertodd
Copy link
Contributor Author

@MarcoFalke IMO it's ready for merging.

@TheBlueMatt
Copy link
Contributor

"This is an incomplete work in progress,"

It is? I'd say it works pretty well for its goals?

On June 16, 2016 3:53:32 AM PDT, Peter Todd notifications@github.com wrote:

@MarcoFalke IMO it's ready for merging.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7713 (comment)

@TheBlueMatt
Copy link
Contributor

Also you might want to note that you can run git log with paths to get a list of changes to that path in the README, just because it's useful for these scripts and not really an obvious feature that everyone is aware of.

On June 16, 2016 3:53:32 AM PDT, Peter Todd notifications@github.com wrote:

@MarcoFalke IMO it's ready for merging.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7713 (comment)

@laanwj
Copy link
Member

laanwj commented Jun 17, 2016

Can we please finish this?
This is pretty much a trivial change, but every time there comes up a new load of nits, which of those things is critical and can't be fixed later?

@maflcko
Copy link
Member

maflcko commented Jun 17, 2016

@laanwj I think we can improve the wording of the doc later.

@TheBlueMatt
Copy link
Contributor

I mean I think the README is just wrong right now? We could have also taken the easy solution of splitting out the contentious change.

On June 17, 2016 4:01:23 AM PDT, MarcoFalke notifications@github.com wrote:

@laanwj I think we can improve the wording of the doc later.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub:
#7713 (comment)

@@ -1,8 +1,5 @@
71A3B16735405025D447E8F274810B012346C9A6
1F4410F6A89268CE3197A84C57896D2FF8F0B657
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: I think you can remove this line and clear allow-revsig-commits.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, which line specifically?

Good point re: allow-revsig

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gpg --list-key --fingerprint 1F4410F6A89268CE3197A84C57896D2FF8F0B657 returns revoked key by @sipa. Once the commits signed by this key are buried under the trusted root, you could get rid of those lines in allow-revsig-commits.

@petertodd
Copy link
Contributor Author

@TheBlueMatt Sorry, but I'm kinda mystified why you think the README is wrong; I don't see it as controversial at all to describe this functionality as incomplete, given that we definitely need a convenient way for users to verify commits safely, prior to accidentally checking out repos and possibly running malicious code. I think it's good to point that out in the hope that others continue this starting point - and it's work that many other projects need as well (I personally use verify-commits in python-bitcoinlib, as well as some internal-use-only repos).

Now that the trusted root is past all commits signed by that key we don't need
it in the trusted-keys list, nor do we need to whitelist those commits in
allow-revsig-commits
@petertodd
Copy link
Contributor Author

@MarcoFalke Fixed your nit re: sipa's old key.

@gmaxwell
Copy link
Contributor

ACK 1e9aab0

Readme seems fine to me.

@maflcko
Copy link
Member

maflcko commented Jun 19, 2016 via email

@laanwj laanwj merged commit 1e9aab0 into bitcoin:master Jun 20, 2016
laanwj added a commit that referenced this pull request Jun 20, 2016
1e9aab0 Remove sipa's old revoked key from verify-commits (Peter Todd)
966151e Add README for verify-commits (Peter Todd)
11164ec Remove keys that are no longer used for merging (Peter Todd)
22421fa Remove pointless warning (Peter Todd)
9523e8a Make verify-commits path-independent (Matt Corallo)
f7d4a25 Make verify-commits POSIX-compliant (Matt Corallo)
codablock pushed a commit to codablock/dash that referenced this pull request Dec 28, 2017
1e9aab0 Remove sipa's old revoked key from verify-commits (Peter Todd)
966151e Add README for verify-commits (Peter Todd)
11164ec Remove keys that are no longer used for merging (Peter Todd)
22421fa Remove pointless warning (Peter Todd)
9523e8a Make verify-commits path-independent (Matt Corallo)
f7d4a25 Make verify-commits POSIX-compliant (Matt Corallo)
andvgal pushed a commit to energicryptocurrency/gen2-energi that referenced this pull request Jan 6, 2019
1e9aab0 Remove sipa's old revoked key from verify-commits (Peter Todd)
966151e Add README for verify-commits (Peter Todd)
11164ec Remove keys that are no longer used for merging (Peter Todd)
22421fa Remove pointless warning (Peter Todd)
9523e8a Make verify-commits path-independent (Matt Corallo)
f7d4a25 Make verify-commits POSIX-compliant (Matt Corallo)
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants