forensic-vfs
The read-only forensic virtual-filesystem contracts — the KNOWLEDGE leaf
every disk/container/filesystem reader in the fleet implements. It defines the
layered model and nothing else: no format parsing, no I/O beyond the thin
[adapters] that wrap an OS file, no reader dependencies.
The layered model
PathSpec (recursive locator)
│ resolves (a per-node transform graph, in the engine)
▼
ImageSource ── the universal edge: read-only positioned bytes ──────────┐
├── ContainerOpen : E01/VMDK/VHDX/… → ImageSource │ any of these
├── VolumeSystem : MBR/GPT/VSS/… → ImageSource │ transforms may
├── EncryptionLayer : BitLocker/LUKS/… → ImageSource │ apply, in any
└── FileSystem : NTFS/ext4/APFS/… → FsNode tree ┘ order, per node
Load-bearing decisions
- [
ImageSource] is a positioned-read&selfbyte source with no write method. Parallel-safe by construction (workers share oneArc<dyn ImageSource>), and read-only in the type system — a write is uncompilable. - [
FileSystem] reads are&selfover interior mutability, so one mounted handle serves N workers; bulk enumerations are ownedSendstreams. - [
PathSpec] identity is the structured enum, with a lossless canonical URI ([uri]) for reports and a lossy humanDisplay. - True leaf. Base deps are
thiserror(+ optionalserde); theforensicnomiconfindings bridge and the history bridge are non-default features, so a bare reader inherits neither.
Panic-free (Paranoid Gatekeeper): unsafe_code = forbid, no
unwrap/expect/panic! in production, bounded readers over every
attacker-controllable length/offset.