Raw hardware identity + disk-usage citation for chain-of-custody, composing operations-host-inventory's raw_components (not its privacy-preserving hashed fingerprint) plus df-based disk usage
| Tier | infrastructure |
| Role | unclassified (baselined) |
| Path | crates/infrastructure/hardware-forensics |
| Edition | 2021 |
| Targets | infrastructure_hardware_forensics |
| Public items | 4 across 0 modules |
| Tests | 5 |
What it is for
Raw hardware identity + disk-usage citation for chain-of-custody, distinct from operations-host-inventory's privacy-preserving fingerprint() (which deliberately HMACs every identifier away for license node-locking). Forensic citation wants the opposite: the actual serial/UUID, cited verbatim, because that's what proves "this is the same physical machine" in a chain-of-custody record.
Composes operations-host-inventory::raw_components (already collects machine_id/product_uuid/board_serial/disk_id/gpu_uuid/cpu_sig, normalized, pre-hash) rather than re-deriving hardware collection — that seam was added specifically for this crate. Disk usage (df) fills the one gap host-inventory didn't already cover: DiskInfo has total size but no used/free space.
df's real columnar output was verified live on this machine before writing the parser: df -B1 --output=source,size,used,avail,pcent,target <path> prints a header line, then one whitespace-separated data line per filesystem, with the use%% column carrying a literal % suffix that must be stripped before parsing as a number.
Capabilities
crate root
Raw hardware identity + disk-usage citation for chain-of-custody, distinct from
| Item |
|---|
fn disk_usage(runner : & dyn CommandRunner) -> Result <Vec <Observation>, DetectError> |
fn hardware_identity(runner : & dyn CommandRunner) -> Vec <Observation> |
DiskUsage
Raw hardware identity + disk-usage citation for chain-of-custody, distinct from
| Item |
|---|
pub struct DiskUsage |
fn parse_df_output(stdout : & str) -> Result <Vec <DiskUsage>, DetectError> |
How to use it
No examples/ target and no doctest in this crate's rustdoc. The tests listed under Verification are the closest executable usage.
Module structure
No public modules: the crate root is its whole surface.
Public surface
`crate root`
| Item | What it is |
|---|---|
pub struct DiskUsage | One filesystem's usage, as reported by df. |
fn parse_df_output(stdout : & str) -> Result <Vec <DiskUsage>, DetectError> | Parse df -B1 --output=source,size,used,avail,pcent,target stdout |
fn disk_usage(runner : & dyn CommandRunner) -> Result <Vec <Observation>, DetectError> | Run df for every mounted filesystem and cite usage as Observations. |
fn hardware_identity(runner : & dyn CommandRunner) -> Vec <Observation> | Cite every present raw hardware-identity component (machine_id, product_uuid, board_serial, disk_id, gpu_uuid, cpu_sig) verbatim — the actual value, not a privacy-preserving digest |
No pub use re-exports: every item above is declared in this crate.
Boundary
Reaches into operations.
Shares tier infrastructure with 82 other crates: infrastructure-acquire, infrastructure-adapters-google-calendar, infrastructure-adapters-google-gmail, infrastructure-adapters-google-places, infrastructure-adapters-google-trends, infrastructure-adapters-shodan, infrastructure-adapters-yelp, infrastructure-agent, … (82 total).
_What this crate deliberately does NOT own is a judgment. No committed registry records one for it, so none is stated here._
Where it sits
| Tier (ontology) | infrastructure |
| Architectural role (taxonomy) | unclassified (baselined) |
| Location | crates/infrastructure/hardware-forensics |
| Vocabulary in force (lexicon) | current |
Tier flow. Which tiers this crate's own edges cross.
flowchart LR n_infrastructure["infrastructure"] --> n_operations["operations"]
Dependencies
Runtime, in this workspace.
| Crate | Tier | Optional | Only on |
|---|---|---|---|
| `infrastructure-host-forensics` | infrastructure | no | always |
| `operations-host-inventory` | operations | no | always |
Development. None.
Build. None.
Depended on by. Nothing in this workspace.
Signal flow — what reaches this crate, and what it reaches.
flowchart LR SELF["infrastructure-hardware-forensics"] SELF -->|runtime| n_infrastructure_host_forensics["infrastructure-host-forensics"] SELF -->|runtime| n_operations_host_inventory["operations-host-inventory"] classDef self fill:#1f883d,stroke:#1f883d,color:#fff; class SELF self;
Feature flags
No Cargo features are defined: every capability is unconditional, so no consumer can receive a half-wired crate.
Targets
| Kind | Name | Source |
|---|---|---|
| lib | infrastructure_hardware_forensics | `src/lib.rs` |
Error model
No public error type was detected: no public item declares a type named *Error, and no public signature returns one.
Operational characteristics
| Property | Evidence |
|---|---|
| async public surface | none detected |
| async runtime | none detected |
| database access | none detected |
| network I/O | none detected |
| unsafe code | none detected |
| environment variables | none detected |
No unsafe block, unsafe fn, unsafe impl or unsafe trait was found by the parser anywhere in this crate's source.
Configuration
No environment variable is read with a literal name anywhere in this crate. A variable whose key is computed at run time cannot be listed here, and is not claimed to be absent.
Related capabilities
No workspace crate depends on this one.
Verification
| Kind | Count |
|---|---|
| Unit tests | 5 |
| Integration tests | 0 |
| Examples | 0 |
| Doctests | 0 |
Evidence by module. How often each public module is named by something executable.
| Module | Tests | Examples | Consumers |
|---|---|---|---|
crate root | 4 | 0 | 0 |
What the tests establish, by name:
disk_usage_wires_command_output_through_the_parser—src/lib.rshardware_identity_cites_present_components_verbatim—src/lib.rsparse_df_output_handles_multiple_filesystems—src/lib.rsparse_df_output_reads_the_real_verified_shape—src/lib.rsparse_df_output_rejects_malformed_lines_not_silently—src/lib.rs
Documentation coverage
| Measure | Documented | Total |
|---|---|---|
| Public items with rustdoc | 4 | 4 |
Public modules with a //! block | 0 | 0 |
pie showData
title Public items with rustdoc
"Documented" : 4
"No rustdoc detected" : 0
Metrics
| Metric | Value |
|---|---|
| Rust source files | 1 |
| Source lines | 191 |
| Code lines | 151 |
| Public API items | 4 |
| Public modules | 0 |
| Tests | 5 |
| Examples | 0 |
| Cargo features | 0 |
| Direct runtime dependencies | 2 |
| Workspace reverse dependencies | 0 |
pie showData
title Public API by kind
"function" : 3
"struct" : 1
pie showData
title Rust source composition
"Code" : 151
"Blank or comment" : 40
Generation
Rendered by tools-corpus corpus readme from repository evidence alone, renderer schema 2, lexicon current. No model, network service or database was consulted. Regenerate with tools-corpus corpus readme --write; verify with --check.