#binary-parser #binary-tree #security #extract #cargo #json #auditable

auditable-info

High-level crate to extract the dependency trees embedded in binaries by cargo auditable

12 unstable releases (4 breaking)

0.9.0 Nov 11, 2024
0.8.0 Jul 30, 2024
0.7.2 May 8, 2024
0.7.0 Apr 27, 2023
0.5.0-alpha.4 Sep 18, 2022

#283 in Encoding

Download history 11778/week @ 2024-08-19 9425/week @ 2024-08-26 9298/week @ 2024-09-02 8950/week @ 2024-09-09 9075/week @ 2024-09-16 9569/week @ 2024-09-23 10251/week @ 2024-09-30 11959/week @ 2024-10-07 12818/week @ 2024-10-14 11271/week @ 2024-10-21 13358/week @ 2024-10-28 12202/week @ 2024-11-04 10815/week @ 2024-11-11 11223/week @ 2024-11-18 11448/week @ 2024-11-25 11475/week @ 2024-12-02

45,768 downloads per month
Used in 3 crates

MIT/Apache

30KB
379 lines

High-level crate to extract the dependency trees embedded in binaries by cargo auditable.

Deserializes them to a JSON string or Rust data structures, at your option.

Features

  • Binary parsing designed from the ground up for resilience to malicious inputs.
  • 100% memory-safe Rust, including all dependencies. (There is some unsafe in serde_json and its dependencies, but only in serialization, which isn't used here).
  • Cross-platform, portable, easy to cross-compile. Runs on any Rust target with std.
  • Parses binaries from any supported platform, not just the platform it's running on.
  • Supports setting size limits for both input and output, to protect against OOMs and zip bombs.

Usage

// Uses the default limits: 1GiB input file size, 8MiB audit data size
let info = audit_info_from_file(&PathBuf::from("path/to/file"), Default::default())?;

Functions to load the data from a Read instance or from &[u8] are also provided, see the documentation.

Alternatives

rust-audit-info is a command-line interface to this crate.

If you need a lower-level interface than the one provided by this crate, use the auditable-extract and auditable-serde crates.

Dependencies

~215–760KB
~16K SLoC