CLI-first tool for defender-focused binary patch diffing with LLM-assisted triage.
python3 -m venv .venv. .venv/bin/activatepython -m pip install -e .python -m pytest -q
- This repo does not ship sample
.binfiles. - You can create quick local test binaries by compiling two tiny C programs (before/after):
cat > before.c <<'EOF'
#include <stdio.h>
int main(void) { puts("before"); return 0; }
EOF
cat > after.c <<'EOF'
#include <stdio.h>
int main(void) { puts("after"); return 0; }
EOF
cc -O2 -o before before.c
cc -O2 -o after after.cpatchdiff ingest --a <before> --b <after> --out <job_dir>patchdiff normalize --job <job_dir>patchdiff diff --job <job_dir> --backend diaphorapatchdiff rank --job <job_dir> --top 30patchdiff decompile --job <job_dir> --top 30 --timeout 90patchdiff analyze --job <job_dir> --provider local --model llama3 --max-rounds 2patchdiff validate --job <job_dir>patchdiff report --job <job_dir> --format markdownpatchdiff run --a <before> --b <after> --out <job_dir> --format json
- After install, run via console entrypoint:
patchdiff run --a ./before --b ./after --out ./job_001 --format json- Or run via module path:
python -m patchprobe.cli run --a ./before --b ./after --out ./job_001 --format json- Stage outputs are written under
<job_dir>/artifacts/. - Every stage also writes envelope artifacts with hashes and schema checks.
- Job-level indexes/logs:
<job_dir>/artifact_index.json<job_dir>/audit.jsonl
See Implementation_Doc.md for detailed architecture and contracts.