Formal & Empirical Assurance

Security Architecture & Trust Guarantees

Defense-in-depth verification combining #![forbid(unsafe_code)], Miri Tree Borrows, structure-aware fuzzing, and configurable DoS budgets.

Frontmatter parsers frequently sit at the trust boundary of content management systems, documentation portals, and static site pipelines where Markdown files arrive from external contributors or untrusted repositories. Frontmatter Gen enforces five layers of verification to ensure untrusted inputs cannot trigger memory unsafety, resource exhaustion, or HTML injection.

0 Unsafe
#![forbid(unsafe_code)]
100%
Unit Test Coverage
4 Targets
LibFuzzer Harnesses
01

Memory Safety & Miri Tree Borrows Verification

Both src/lib.rs and src/main.rs declare #![forbid(unsafe_code)], and the YAML 1.2 dependency noyalib is likewise 100% safe Rust. Every pull request runs the test suite under Miri with strict provenance and Tree Borrows aliasing checks:

bash — miri tree borrows verification
# Run Miri across minimal and default feature sets with Tree Borrows
$MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-tree-borrows -Zmiri-symbolic-alignment-check" cargo +nightly miri test --lib --no-default-features --locked
$MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-tree-borrows -Zmiri-symbolic-alignment-check" cargo +nightly miri test --lib --locked
02

DoS Budget Guardrails & Fuzzing Harnesses

Untrusted YAML, TOML, or JSON headers can attempt denial-of-service via deeply nested structures or thousands of keys. parser::parse_with_options enforces deterministic budgets before returning a Frontmatter value, backed by four structure-aware cargo-fuzz targets:

Verification Control Target / API Security Guarantee
Nesting Depth Budget ParseOptions::max_depth Rejects YAML, TOML, or JSON trees nested deeper than max_depth levels.
Key Count Budget ParseOptions::max_keys Rejects frontmatter payloads containing more than max_keys total keys across all maps.
HTML Entity Escaping meta::generate_metatags Escapes &, <, >, ", and ' in all generated <meta> attributes.
LibFuzzer Harnesses fuzz/fuzz_targets/*.rs Continuous fuzzing across extract_frontmatter, parse_yaml, parse_toml, and parse_json.
Supply-Chain Audits cargo-deny, cargo-vet, cargo-audit Verifies license policies, RustSec advisories, and third-party crate audits on every CI run.
03

Vulnerability Disclosure Policy (RFC 9116)

If you discover a security vulnerability in frontmatter-gen, please report it privately via GitHub Security Advisories or email sebastien.rousseau@gmail.com. See our machine-readable /.well-known/security.txt for RFC 9116 disclosure metadata.

Formal verification, Miri Tree Borrows, and supply-chain security for frontmatter-gen
Defense-in-depth assurance: #![forbid(unsafe_code)], Miri Tree Borrows, 100% unit test coverage, and REUSE 3.3 licensing compliance.