Subject
toml_edit 0.25.11 is a format-preserving TOML parser and editor. It parses a TOML document into a rich, mutable tree that records the raw text of every token (keys, values, whitespace, comments) so that round-trip read-modify-write leaves unmodified parts of the file byte-identical. This places it in Cargo's dependency graph: Cargo itself uses toml_edit to read and modify Cargo.toml files. The public API exposes Document<S> (immutable, referencing the original &str) and DocumentMut (owned, editable), along with Serde de/ser support gated behind the serde feature.
Methodology
All source files in contents/src/ were read in full (9933 LOC across 28 files). The following tools were used: openvet 0.6.0, grep, diff, wc. Standard source surveys were run for unsafe blocks, FFI, network, filesystem, process, environment, crypto, RNG, and concurrency; all returned empty. The diff between contents/ and vcs/ showed only expected differences: cargo-normalised Cargo.toml, the absent CHANGELOG.md, a Cargo.lock present in contents, and a tests/ tree present only in VCS. No source file differed between the two trees; no binary files appeared in contents/ that were absent from vcs/. The TOML spec referenced is TOML v1.1.0, per the version suffix +spec-1.1.0.
Results
The diff between contents/ and vcs/ confirms byte-equivalent source code. The only divergences are the cargo-normalised Cargo.toml, a Cargo.lock bundled in the published crate, the excluded CHANGELOG.md, and the excluded tests/ directory (integration tests live in VCS but not in the crate archive per the include manifest field). is-benign: no obfuscated code, no base64 blobs, no telemetry, no suspicious network endpoints or timing-sensitive behaviour was found.
has-binaries=false: no pre-compiled binary assets. has-build-exec=false: no build.rs, no proc-macro. has-install-exec=false.
has-unit-tests=true: 15 #[test] functions are inline in src/ (in error.rs, key.rs, item.rs, value.rs, document.rs, encode.rs). has-integration-tests=true: five integration test binaries are declared in Cargo.toml.orig (testsuite, compliance, decoder_compliance, encoder_compliance, serde); the test source lives in vcs/tests/. has-property-tests=true: two proptest! blocks in src/encode.rs exercise parseable_string and parseable_key round-trip invariants over arbitrary Unicode strings. has-fuzz-tests=false: no fuzz corpus or harness.
uses-unsafe=false: grep over contents/src/ found zero unsafe keywords. The crate delegates all unsafe code to its dependencies (indexmap, toml_parser, winnow). uses-network=false, uses-filesystem=false, uses-environment=false, uses-exec=false, uses-jit=false, uses-interpreter=false, uses-concurrency=false, uses-crypto=false: all confirmed empty by source survey. impl-crypto=false, impl-interpreter=false, impl-jit=false, impl-protocol=false, impl-datastructure=false, impl-algorithm=false, impl-concurrency=false: the crate implements none of these; it implements only a TOML parser and document editor.
impl-parser=true: the parse feature wires a two-stage pipeline. Stage one calls toml_parser::parser::parse_document (audited separately) to produce a token/event stream. Stage two, in src/parser/, traverses that event stream with winnow's TokenSlice and constructs the toml_edit document tree. The recursion guard wraps the event sink with RecursionGuard::new(&mut receiver, LIMIT) where LIMIT = 80 (defined in src/parser/mod.rs:142). The unbounded feature disables this guard; its documentation explicitly warns that callers become responsible for stack overflow. Dotted-key path depth is additionally bounded in src/parser/key.rs:67-70 with its own check against LIMIT. parser-impl-safe=true: the event-driven parser in src/parser/ contains no unsafe blocks, performs no unbounded recursion itself (the recursive descend_path calls are bounded by the key path depth limit and by RecursionGuard), and all index arithmetic goes through safe Rust slice indexing. Error paths call errors.report_error(...) rather than panicking. The only panics present are in RawString::to_str and to_str_with_default, which fire only when a span references a position outside the source string — a condition that cannot be triggered by adversarial input because spans are computed directly from the parser's own event stream over the same source. parser-impl-tested=true: the two proptest blocks cover string and key encoding round-trips; the integration tests include compliance suites against the TOML test data corpus (toml-test-data, toml-test-harness), exercising decoder and encoder conformance.
Conclusion
toml_edit 0.25.11 implements a format-preserving TOML editor over a two-stage parser pipeline. The crate contains zero unsafe blocks; all low-level operations delegate to audited dependencies. The recursion limit of 80 nesting levels is enforced by RecursionGuard from toml_parser and by an explicit key-path depth check in the event consumer, except under the unbounded feature which is opt-in and carries explicit stack-overflow warnings in the Cargo.toml comment. The property-test suite covers encoding round-trips; integration tests run against the TOML compliance corpus. No findings were produced.