Skip to content

How does cargo-auditable construct the information that it includes in the binary? #126

Description

@mulkieran

Hi!

Your README makes the following claim:

"""
Know the exact crate versions used to build your Rust executable. Audit binaries for known bugs or security vulnerabilities in production, at scale, with zero bookkeeping.
"""

So, this should include all dependencies used (as opposed to only those statically linked, which would be a subset of those used). An example would be a procedural macro, which only generates code, but is not linked into an executable.

My question is, does this actually include this information, and if so, how does it gather the information?

Also, given the answer to the first question, how probable is it that a particular package that was used would be omitted from the cargo-auditable generated information in the executable?

Activity

  1. bjorn3 commented on Oct 4, 2023

    @bjorn3

    It uses cargo metadata:

    fn get_metadata(args: &RustcArgs, target_triple: &str) -> Metadata {
    cargo metadata has an issue where it sometimes returns more dependencies than actually get compiled in when you use the v2 resolver (I believe it is hard coded to the v1 resolver), but afaik it will never omit any dependencies.

  2. locked and limited conversation to collaborators on Oct 4, 2023
  3. converted this issue into a discussion #127 on Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions