-
Notifications
You must be signed in to change notification settings - Fork 38.7k
tests: add a test-security target and run it in CI #18434
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
Conversation
ba89275 to
210bbfd
Compare
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ConflictsReviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first. |
|
Concept ACK: enforcement via automation is good |
|
The same is already run via gitian, right? |
|
🐙 This pull request conflicts with the target branch and needs rebase. |
8334ee3 scripts: add MACHO LAZY_BINDINGS test to test-security-check.py (fanquake) 7b99c74 scripts: add MACHO Canary check to security-check.py (fanquake) Pull request description: 7b99c74 uses `otool -Iv` to check for `___stack_chk_fail` in the macOS binaries. Similar to the [ELF check](https://github.com/bitcoin/bitcoin/blob/master/contrib/devtools/security-check.py#L105). Note that looking for a triple underscore prefixed function (as opposed to two for ELF) is correct for the macOS binaries. i.e: ```bash otool -Iv bitcoind | grep chk 0x00000001006715b8 509 ___memcpy_chk 0x00000001006715be 510 ___snprintf_chk 0x00000001006715c4 511 ___sprintf_chk 0x00000001006715ca 512 ___stack_chk_fail 0x00000001006715d6 517 ___vsnprintf_chk 0x0000000100787898 513 ___stack_chk_guard ``` 8334ee3 is a follow up to #18295 and adds test cases to `test-security-check.py` that for some reason I didn't add at the time. I'll sort out #18434 so that we can run these tests in the CI. ACKs for top commit: practicalswift: ACK 8334ee3: Mitigations are important. Important things are worth asserting :) jonasschnelli: utACK 8334ee3. Tree-SHA512: 1aa5ded34bbd187eddb112b27278deb328bfc21ac82316b20fab6ad894f223b239a76b53dab0ac1770d194c1760fcc40d4da91ec09959ba4fc8eadedb173936a
|
Concept ACK |
210bbfd to
fa07027
Compare
fa07027 to
8a05476
Compare
|
Have rebased and should have fixed up all the issues here.
We run the symbol and security checks in gitian, but not the security-check test. |
|
Concept ACK (have not reviewed the code beside a cursory glance on the ci config files) |
|
🐙 This pull request conflicts with the target branch and needs rebase. |
8a05476 to
11e09a4
Compare
11e09a4 to
cb3be57
Compare
|
Concept ACK Also looked at the code and it looks good to me, but I don't feel qualified enough in this area to give a full ACK at the moment. |
|
ACK cb3be57a83aa2065061e6cb77cec16167f133d3c -- patch looks correct and Travis is happy |
Makefile.am
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe test-security-check target instead of test-security? I mean, it's a test for the binary security check. It doesn't check the security of the actual binaries.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure. I've updated the target to test-security-check.
cb3be57 to
9fe71a5
Compare
|
ACK 9fe71a5 |
Wladimir asked about running the
test-security-check.pyscript in our CI. This PR adds a target for that:make test-securityand adds it to a few CI jobs.