P2 promised these two targets and never added them. `fuzz_http_mcp_request` feeds a method, a path, headers (token present, absent, wrong, raw) and a JSON-RPC body drawn from the real method and tool names into the in-process router. Whatever arrives, the door answers: no token live for the book is refused 4xx, never run (INVARIANT 8), and a live token never makes the door fail (no 5xx on the MCP route). Whether a token is live is asked of the door itself (`FuzzDoor::carries_a_token`), so a token smuggled in an extra header is judged by the real rule rather than by the target's guess. `fuzz_upload_put` declares a size and a hash and sends bytes: taken only when both are exactly what was declared, from the token the grant names, and only once (INVARIANT 9); a 200 for anything else is the bug. Both join the weekly matrix in scheduled.yml; fuzz/Cargo.lock gains ledger-mcp's dependency closure because the targets drive its router.
126 lines
2.1 KiB
TOML
126 lines
2.1 KiB
TOML
[package]
|
|
name = "ledger-core-fuzz"
|
|
version = "0.0.0"
|
|
publish = false
|
|
edition = "2024"
|
|
|
|
[package.metadata]
|
|
cargo-fuzz = true
|
|
|
|
[dependencies]
|
|
libfuzzer-sys = "0.4"
|
|
arbitrary = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
serde = "1"
|
|
rust_decimal = "1"
|
|
chrono = "0.4"
|
|
|
|
[dependencies.ledger-core]
|
|
path = "../crates/ledger-core"
|
|
|
|
[dependencies.ledger-store]
|
|
path = "../crates/ledger-store"
|
|
|
|
[dependencies.ledger-import]
|
|
path = "../crates/ledger-import"
|
|
|
|
[dependencies.ledger-mcp]
|
|
path = "../crates/ledger-mcp"
|
|
features = ["fuzzing"]
|
|
|
|
[dependencies.ledger-config]
|
|
path = "../crates/ledger-config"
|
|
|
|
[[bin]]
|
|
name = "fuzz_journal_line"
|
|
path = "fuzz_targets/fuzz_journal_line.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_entry_validate"
|
|
path = "fuzz_targets/fuzz_entry_validate.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_op_sequence"
|
|
path = "fuzz_targets/fuzz_op_sequence.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[workspace]
|
|
|
|
[[bin]]
|
|
name = "fuzz_core_serde"
|
|
path = "fuzz_targets/fuzz_core_serde.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_store_open"
|
|
path = "fuzz_targets/fuzz_store_open.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_store_replay"
|
|
path = "fuzz_targets/fuzz_store_replay.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_import_csv"
|
|
path = "fuzz_targets/fuzz_import_csv.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_extract_pdf"
|
|
path = "fuzz_targets/fuzz_extract_pdf.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_extract_xlsx"
|
|
path = "fuzz_targets/fuzz_extract_xlsx.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_config_parse"
|
|
path = "fuzz_targets/fuzz_config_parse.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_settings_replay"
|
|
path = "fuzz_targets/fuzz_settings_replay.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_http_mcp_request"
|
|
path = "fuzz_targets/fuzz_http_mcp_request.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|
|
|
|
[[bin]]
|
|
name = "fuzz_upload_put"
|
|
path = "fuzz_targets/fuzz_upload_put.rs"
|
|
test = false
|
|
doc = false
|
|
bench = false
|