fix: harden snapshot loading and pre-collector registry semantics - #4
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Before the first real Windows Collector, the draft Snapshot reader had no file-size ceiling, constructed the current Snapshot type before explicit document routing, and only checked that
captured_atwas non-empty. Registry startup evidence also needed stable view labels and correct structured RunOnce prefix semantics.Scope
MAX + 1readsystemdiff.snapshotv1 bydocument_typeandschema_versionbefore constructing the full Snapshotcaptured_atwith standards-based RFC 3339 parsing and require known UTC (Zor+00:00)RegistryViewsemantics!/*behavior without stripping the full value nameImportant design decisions
captured_atremains the original wire string. Readers accept known UTC and reject RFC 3339-00:00; future SystemDiff writers will emit canonicalZ.Registry32andRegistry64require explicit WOW64 selectors.Nativeis reserved for a sole view where no WOW alternate logical view exists.undocumented;Foo,!Foo, and*Fooretain distinct identities.time0.3.55 is added with default features disabled and only RFC 3339 parsing support enabled (Apache-2.0 OR MIT).Authoritative Windows references
Validation
cargo fmt --all --checkcargo clippy --locked --workspace --all-targets -- -D warningscargo test --locked --workspace --all-targets— 39 passed, 0 failedgit diff --checkExplicit non-goals
This PR does not implement a real Registry/Services/Scheduled Task Collector,
systemdiff snapshot, Windows Registry API calls, Scheduled Task raw XML redesign, streaming JSON, machine/SID identity, risk integration, MSRV policy, GUI/Tauri, or release tooling.Closes #3