* test(core,cli): pin DoS-resistance of CSI deserialisers (ADR-127 security review)
Beyond-SOTA security review of wifi-densepose-core + wifi-densepose-cli.
Load-bearing-question verdict: the NaN-state-poisoning bug class does NOT
originate in core — core exposes no stateful accumulator (no Welford,
von-Mises, IIR, voxel grid, running mean); each downstream crate rolls its
own, so each fix is correctly local. Both crates confirmed clean on every
reviewed dimension (panic-on-adversarial-input, NaN handling, unbounded
memory, path traversal, secrets) — no production code changed.
Adds 4 regression pins locking in two existing-but-untested DoS guards:
- core: from_canonical_bytes shape guard (Vec::with_capacity bound) — proven
to fail with `capacity overflow` when the saturating-mul guard is removed.
- core: canonical decoder never panics on arbitrary/truncated bytes.
- cli: parse_csi_packet rejects an oversized n_antennas*n_subcarriers claim
before Array2 allocation (33 MB claim in a 2 KB datagram -> None).
- cli: parse_csi_packet never panics on arbitrary UDP bytes.
core: 35 -> 37 lib tests; cli: 24 -> 26 tests; 0 failed. Python proof
unchanged (f8e76f21…46f7a — off the signal path).
Co-Authored-By: claude-flow <ruv@ruv.net>
* docs(adr): ADR-172 — wifi-densepose-cli + core CSI-deserialiser security review
Records the clean-with-evidence verdict + 4 DoS-resistance regression pins
(test-only, committed in
|
||
|---|---|---|
| .. | ||
| src | ||
| Cargo.toml | ||
| README.md | ||
README.md
wifi-densepose-cli
Command-line interface for WiFi-DensePose, including the Mass Casualty Assessment Tool (MAT) for disaster response operations.
Overview
wifi-densepose-cli ships the wifi-densepose binary -- a single entry point for operating the
WiFi-DensePose system from the terminal. The primary command group is mat, which drives the
disaster survivor detection and triage workflow powered by the wifi-densepose-mat crate.
Built with clap for argument parsing, tabled + colored for rich terminal output, and indicatif for progress bars during scans.
Features
- Survivor scanning -- Start continuous or one-shot scans across disaster zones with configurable sensitivity, depth, and disaster type.
- Triage management -- List detected survivors sorted by triage priority (Immediate / Delayed / Minor / Deceased / Unknown) with filtering and output format options.
- Alert handling -- View, acknowledge, resolve, and escalate alerts generated by the detection pipeline.
- Zone management -- Add, remove, pause, and resume rectangular or circular scan zones.
- Data export -- Export scan results to JSON or CSV for integration with external USAR systems.
- Simulation mode -- Run demo scans with synthetic detections (
--simulate) for testing and training without hardware. - Multiple output formats -- Table, JSON, and compact single-line output for scripting.
Feature flags
| Flag | Default | Description |
|---|---|---|
mat |
yes | Enable MAT disaster detection commands |
Quick Start
# Install
cargo install wifi-densepose-cli
# Run a simulated disaster scan
wifi-densepose mat scan --disaster-type earthquake --sensitivity 0.8 --simulate
# Check system status
wifi-densepose mat status
# List detected survivors (sorted by triage priority)
wifi-densepose mat survivors --sort-by triage
# View pending alerts
wifi-densepose mat alerts --pending
# Manage scan zones
wifi-densepose mat zones add --name "Building A" --bounds 0,0,100,80
wifi-densepose mat zones list --active
# Export results to JSON
wifi-densepose mat export --output results.json --format json
# Show version
wifi-densepose version
Command Reference
wifi-densepose
mat
scan Start scanning for survivors
status Show current scan status
zones Manage scan zones (list, add, remove, pause, resume)
survivors List detected survivors with triage status
alerts View and manage alerts (list, ack, resolve, escalate)
export Export scan data to JSON or CSV
version Display version information
Related Crates
| Crate | Role |
|---|---|
wifi-densepose-mat |
MAT disaster detection engine |
wifi-densepose-core |
Shared types and traits |
wifi-densepose-signal |
CSI signal processing |
wifi-densepose-hardware |
ESP32 hardware interfaces |
wifi-densepose-wasm |
Browser-based MAT dashboard |
License
MIT OR Apache-2.0