Expand description
Inventory scan over agent config / dependency manifests / secrets dotfile. Covers the L1 × V3 cell (cf. crate root §Threat surface × vector).
§Pipeline
run composes the three sub-modules in order:
inventory::collect— walk every registered probe’s target roots plus the universal supply-chain list, hash each file with SHA-256, and (when the owning probe opts in viacrate::platform::PlatformProbe::decompose_file) split noisy configs into virtual JSON-block fragments so unrelated background writes do not show as modifications.snapshot::save— persist the report as<home>/snapshots/<UTC-ts>.json(cf. crate root §Runtime data root).diff::compute— if a previous snapshot exists, classify the new report into added / modified / removed.
The function is idempotent under no-change: re-running run when no
tracked file has changed produces a new snapshot file but an empty
diff::DiffReport.
§Read-only invariant
No path under inventory::collect’s target roots is ever mutated.
Writes are scoped to <home>/snapshots/. Symlinks are not followed.
Modules§
- diff
- Set-difference between two
ScanReports, keyed onPathEntry::path. - inventory
- Inventory enumeration: turn the fixed target-root list into hashed
PathEntryrows. - snapshot
- Snapshot persistence: serialize a
ScanReportto<home>/snapshots/<UTC-ts>.jsonand load the newest snapshot back. - unknown
- BlackList check: classify installed MCP server names against a
crate::registry::Registryof known-good entries.
Structs§
- Scan
Outcome - Full output of one
runcall: the inventory, the path of the persisted snapshot, and (if a previous snapshot existed) the diff against it. - Scan
Report - One scan’s worth of inventory data, before any diffing.
Functions§
- diff_
against_ latest - Compute the diff between the current inventory and the latest snapshot without persisting a new snapshot.
- run
- Run a full scan: enumerate inventory, persist a snapshot, and (if a previous snapshot exists) compute a diff against it.