-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
Support building auditable executables #192
Comments
I failed to find an actionable manual in the linked repository, but if this means what I think it means, this is possible on trunk with If this were less strictly-denominational (as it stands it doesn't look like you can call it directly, and I don't obviously see why not) you could say The ergonomics of speccing -r every time are questionable, but this could be resolved with the dreaded global config file, if this is a reasonable solution. |
FWIW the format probably isn't going to change in backwards-incompatible ways. I've experimented with it a fair bit and I think this is its final form. We may still add fields, but the core of it should be stable. I really should update the README with that information. Regarding the library version, I don't think that's feasible because the Right now you can achieve the same effect as running
I was not aware of use cases that would require direct invocation without any parameters, and wanted to play it safe with the rustc wrapper binary - if it's passed incorrect arguments, it would just error out instead of setting an environment variable and terminating without actually injecting any audit data. |
What questions did you have that were not answered by the existing documentation? I'd be happy to improve docs based on feedback! |
If Well, as for questions, I didn't have any because I read the code, but I didn't see anything resembling a normal manual, or indeed so much as a usage string, so the fact that cargo-auditable even checks its arguments beyond if(argv[1] == "auditable"sv) ++optind; and explodes if argv[1] isn't "auditable" or "rustc" was surprising. |
Could you point me to what "a normal manual" looks like? I don't think you mean a unix manpage. There is no usage string ( The exploding when called directly instead of via Perhaps the |
I do mean a UNIX manual, something like .Dd
.Dt CARGO-AUDITABLE 1
.Os
.
.Sh NAME
.Nm cargo-auditable
.Nd inject dependency tree into built executables
.
.Sh SYNOPSIS
.Nm cargo Cm auditable Ar argument Ns …
.Nm cargo Cm rustc Ar argument Ns …
.
.Nm Cm auditable Ar argument Ns …
.Nm Cm rustc Ar argument Ns …
.
.Sh DESCRIPTION
If the first argument is
.Cm auditable ,
executes
.Nm cargo Ar argument Ns s
with
.Ev RUSTC_WORKSPACE_WRAPPER
set to &c., which affects, &c. you get the picture. Nah, I'm already surprised we field-split In this case, and if #!/bin/sh
exec cargo auditable "$@" |
Ah! Good point. Yes, that works. I'll go ahead and explain it in the README. Thanks for the feedback! |
How about passing that to the native system shell? I assume that would still work on win32. |
No clue how that'd affect anything (besides making it more annoying to properly escape the arguments) |
The new
cargo-auditable
, that the Rust Secure WG & @Shnatsel built, is a tool that builds executables with Cargo and embeds a manifest of all of their exact dependencies and versions that can be easily extracted and analysed after the fact to check for security advisories and bugs (for example from RustSec advisory list). A Software Bill of Materials.While the tool and format is early, I believe it would fit very well into
cargo install-update
as something to run automatically to embed this information, one builds withcargo auditable build xx
instead ofcargo build xx
, though for integration purposes it could be cleaner to have a library version ofcargo-auditable
that one could use here instead of depending on another binary.This would be complementary to #190, as that would verify at upgrade/build-time that an upgraded executable doesn't have any advisories on it (which is great), while the support described in this issue would allow other tools to check after the install that there aren't any new advisories that an installed executable is vulnerable for - or do other types of analysis on the dependency information.
The text was updated successfully, but these errors were encountered: