RFC: build-style/cargo: produce auditable binaries#40272
Merged
classabbyamp merged 3 commits intovoid-linux:masterfrom Nov 3, 2022
Merged
RFC: build-style/cargo: produce auditable binaries#40272classabbyamp merged 3 commits intovoid-linux:masterfrom
classabbyamp merged 3 commits intovoid-linux:masterfrom
Conversation
jcgruenhage
commented
Nov 1, 2022
Member
|
I like this, once the bootstrapping issue is solved and a cargo-world rebuild is tried (I can do this), I'd be happy to merge |
ef7c450 to
7ae095e
Compare
Contributor
Author
|
After some discussion on IRC, I've decided on a second bootstrap package. I've built a few things locally and it does work as expected for me, but I don't have the resources to do a world rebuild right now |
classabbyamp
reviewed
Nov 1, 2022
Member
classabbyamp
left a comment
There was a problem hiding this comment.
i think the cargo-auditable{,-bootstrap} changes should be their own commits
cb47dfc to
f4ae30d
Compare
Contributor
Author
|
To make sure this isn't lost to the IRC backlock: I've rebuilt all 173 packages that use the cargo build style, and except for |
classabbyamp
reviewed
Nov 1, 2022
f4ae30d to
f51f89d
Compare
f51f89d to
454b3b9
Compare
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Testing the changes
In contrast to other distros like f.ex. Fedora, we don't ship each crate in the
dependency tree of a rust project as its own (source) package, which means that
xbps isn't aware of those dependencies. Recovering what versions of specific
libraries are used on a system is made very hard by this, which leaves people
clueless what to do in a situation when a library has a CVE for example.
This change embeds a table of dependencies that went into this binary into the
binary itself, which means recovering what binaries contain which libraries
becomes fairly trivial. Go does this by default, and the long-term goal is to
do the same with Rust, but we aren't there yet.
An example for how usage could look like:
This shows me that the only auditable rust binary depending on tokio on my
system right now is
sq, and with different jq filters I can get out any infoI might need.