//! Structured fuzz over docengine's rendering and sanitization chain. //! //! Row 3 of `astra-soak-overview`. The crate's render entry points are called //! from MNW server and multithreaded, goingson, balanced_breakfast, //! mnw-assumptions and bb-core, with one implementation behind all of them. //! //! ## The oracle lives in the crate, not here //! //! Everything asserted is `docengine::oracle::check`. The committed regression //! replay in `tests/regressions.rs` calls the same function on stable, so a crash //! found here becomes a unit test by copying one file, and neither side can drift //! into checking less than the other. //! //! What it asserts: a safety floor on the output of every preset (no script, //! iframe, object, embed, form, svg, math, `javascript:`, `vbscript:` or event //! handler, however the input was shaped), and that `sanitize_html` is //! idempotent. The second is the one worth having and nothing else in the crate //! checks it: a sanitizer that is not idempotent is the mutation-XSS shape, //! where a second parse of the same bytes sees different markup than the first. //! //! Not-panicking is the weakest thing a fuzz target can assert, and a target //! that asserts only that reports clean forever while a preset quietly starts //! emitting an `onerror` attribute. #![no_main] use libfuzzer_sys::fuzz_target; fuzz_target!(|input: &str| { docengine::oracle::check(input); });