Implementation:0sec labs 0 Inspect Bundle
| Knowledge Sources | |
|---|---|
| Domains | Firmware_Scout, Offline_Inspection, Evidence_Validation |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete tool for fail-closed offline bundle validation, firmware inspection, and scout evidence replay, provided by the 0verse scout CLI and acquisition bundle modules.
Description
The load_acquisition_bundle function validates a bundle's manifest and every artifact (path, size, SHA-256) — fail-closed, no hardware or live transport opened. The inspect_bundle function produces FirmwareInspectionReport objects with entropy analysis, string observations, padding runs, repeated regions, container candidates, load address inferences, architectures, and vector tables. The scout_taxonomy function projects verified bundle data into an Observed/Inferences/Unknowns taxonomy without promoting candidate evidence to fact. replay_scout_bundle replays the sealed scout events.
Usage
Import these when you need to inspect a sealed acquisition bundle offline. They are Step 2 of the firmware scout evidence capture workflow.
Code Reference
Source Location
- Repository: 0security
- File: 0verse/src/zeroverse/scout_cli.py:L187-220 (run_scout inspect), 0verse/src/zeroverse/acquisition_bundle.py:L94+ (AcquisitionBundle), 0verse/src/zeroverse/firmware_inspection.py (inspect_bundle)
Signature
def load_acquisition_bundle(path: str | Path) -> AcquisitionBundle:
"""Validate path/size/SHA-256 of every artifact; fail-closed."""
def inspect_bundle(bundle: AcquisitionBundle) -> list[FirmwareInspectionReport]:
"""Produce firmware inspection reports with entropy, strings, regions."""
def scout_taxonomy(
bundle: AcquisitionBundle,
replay: ScoutReplayResult,
) -> dict[str, object]:
"""Project verified bundle data: observed, inferences, unknowns."""
def replay_scout_bundle(
bundle: AcquisitionBundle,
observer, # observer with .observe(event) method
) -> ScoutReplayResult:
"""Replay sealed scout events."""
Import
from zeroverse.acquisition_bundle import load_acquisition_bundle
from zeroverse.firmware_inspection import inspect_bundle
from zeroverse.scout_cli import scout_taxonomy
from zeroverse.scout_evidence import replay_scout_bundle
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| path | Path | Yes (load) /// Bundle directory path | |
| bundle | AcquisitionBundle | Yes (inspect/taxonomy) /// Loaded bundle | |
| replay | ScoutReplayResult | Yes (taxonomy) /// Replayed scout events |
Outputs
| Name | Type | Description |
|---|---|---|
| load return | AcquisitionBundle /// Validated bundle | |
| inspect return | list[FirmwareInspectionReport] /// Entropy, strings, regions, containers | |
| taxonomy return | dict /// Observed/Inferences/Unknowns JSON taxonomy |
Usage Examples
Via CLI
# Inspect a bundle
0verse scout inspect ./acquisition_bundle/
# Prints JSON taxonomy to stdout
# The taxonomy has three sections:
# - observed: acquisition metadata, replay, inspection observations
# - inferences: load address, containers, architectures, vector tables, regions
# - unknowns: unsupported questions stay unknown
Programmatic
from zeroverse.acquisition_bundle import load_acquisition_bundle
from zeroverse.firmware_inspection import inspect_bundle
from zeroverse.scout_cli import scout_taxonomy
from zeroverse.scout_evidence import replay_scout_bundle
bundle = load_acquisition_bundle("./acquisition_bundle/")
replay = replay_scout_bundle(bundle, _Discarder())
taxonomy = scout_taxonomy(bundle, replay)
print(taxonomy["inferences"]["inspections"][0]["load_address"])