infrastructure tier

infrastructure-hardware-forensics

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

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

Tierinfrastructure
Roleunclassified (baselined)
Pathcrates/infrastructure/hardware-forensics
Edition2021
Targetsinfrastructure_hardware_forensics
Public items4 across 0 modules
Tests5

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`

ItemWhat it is
pub struct DiskUsageOne 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)
Locationcrates/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.

CrateTierOptionalOnly on
`infrastructure-host-forensics`infrastructurenoalways
`operations-host-inventory`operationsnoalways

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

KindNameSource
libinfrastructure_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

PropertyEvidence
async public surfacenone detected
async runtimenone detected
database accessnone detected
network I/Onone detected
unsafe codenone detected
environment variablesnone 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.

No workspace crate depends on this one.

Verification

KindCount
Unit tests5
Integration tests0
Examples0
Doctests0

Evidence by module. How often each public module is named by something executable.

ModuleTestsExamplesConsumers
crate root400

What the tests establish, by name:

Documentation coverage

MeasureDocumentedTotal
Public items with rustdoc44
Public modules with a //! block00
pie showData
    title Public items with rustdoc
    "Documented" : 4
    "No rustdoc detected" : 0

Metrics

MetricValue
Rust source files1
Source lines191
Code lines151
Public API items4
Public modules0
Tests5
Examples0
Cargo features0
Direct runtime dependencies2
Workspace reverse dependencies0
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.

All infrastructure · Manual