Skip to content

feat: add binary diff, distro targets, and JSON/Markdown/SARIF formats - #1

Merged
alexander-src merged 1 commit into
mainfrom
feat/diff-formats-distro-v0.1.0
Nov 23, 2026
Merged

alexander-src merged 1 commit into
mainfrom
feat/diff-formats-distro-v0.1.0

Conversation

@alexander-src

Copy link
Copy Markdown
Owner

Adds binary regression diffing, built-in Linux distro baselines, and structured CI output formats ahead of v0.1.0:

  • src/distro.rs: built-in compatibility baselines for rhel-8, ubuntu-20.04, debian-11, rhel-9, ubuntu-22.04, debian-12, ubuntu-24.04, and debian-13 (plus aliases like rocky-8, manylinux_2_28, jammy, bookworm, noble). Appends a Distro Compatibility matrix to bincompat scan and wires --target <distro> into bincompat check (enforcing GLIBC, GLIBCXX, and GLIBC_ABI_DT_RELR for distros below glibc 2.36).
  • src/diff.rs: bincompat diff <baseline> <candidate> compares two ELF64 binaries and exits 1 on new DT_NEEDED libraries, raised symbol version floors (with offending symbol attribution), new linker ABI tags, added DT_RPATH/DT_RUNPATH entries, or weakened PIE/RELRO/NX/stack-canary controls, while reporting improvements separately.
  • src/report.rs & src/main.rs: adds --format text|json|markdown|sarif across scan, check, and diff with hand-rolled RFC-8259 JSON escaping and SARIF 2.1.0 rule IDs (BC001..BC007, BC101..BC105), keeping zero external crate dependencies and #![forbid(unsafe_code)].
  • tests/diff_and_formats.rs: synthetic ELF64 tests, strict RFC-8259 JSON validator, SARIF 2.1.0 verification, and a live gcc hardened-vs-unhardened diff test on Linux.
  • Updated README.md and assets/demo.png with live CLI output.

Verified locally with cargo fmt --all -- --check, cargo clippy --all-targets -- -D warnings, and cargo test --all-targets (21/21 passing).

@alexander-src
alexander-src merged commit dee4c37 into main Nov 23, 2026
3 checks passed
@alexander-src
alexander-src deleted the feat/diff-formats-distro-v0.1.0 branch November 23, 2026 11:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant