Skip to content

docs(cli): document ARP findings output is unbounded in --arp help [PC-015]#310

Merged
Zious11 merged 2 commits into
developfrom
fix/arp-findings-unbounded-help
Jun 24, 2026
Merged

docs(cli): document ARP findings output is unbounded in --arp help [PC-015]#310
Zious11 merged 2 commits into
developfrom
fix/arp-findings-unbounded-help

Conversation

@Zious11

@Zious11 Zious11 commented Jun 24, 2026

Copy link
Copy Markdown
Owner

Summary

Closes open item PC-015 from fix bundle fix-pc-013-014-015.

The --arp flag in wirerust analyze --help previously contained only a one-line short description that made no mention of the unbounded findings behavior. This left operators unaware that analyzing adversarial or large captures with ARP could produce Vec growth proportional to triggering frames, with no platform-imposed cap.

What changed

  • src/cli.rs — Added long_help to the --arp clap argument documenting:

    • ARP findings output is UNBOUNDED (no MAX_FINDINGS cap, unlike HTTP/TLS/Modbus/DNP3 which cap at 10,000 via the TCP reassembly layer)
    • ARP operates at the Ethernet link layer and bypasses the reassembly cap entirely
    • The ARP binding table (MAX_ARP_BINDINGS = 65,536) and storm-counter table (MAX_STORM_COUNTERS = 4,096) are internal state bounds only — they do not cap findings output
    • Operator awareness guidance for adversarial/large captures
  • src/analyzer/arp.rs — Added mod bc_2_16_016 characterization test verifying that process_arp returns >10,000 findings when processing 10,001 distinct IP rebinds (spoof_threshold=1), confirming no MAX_FINDINGS cap exists on the ARP path. Serves as a regression guard.

  • tests/bc_2_16_016_arp_tests.rs — New integration test (Red Gate): asserts the word "unbounded" appears in the --arp flag's help entry in wirerust analyze --help. This test was the original Red Gate for PC-015 — it FAILED before this fix and PASSES after long_help is added.

BC Traceability

Layer Reference
Behavioral Contract BC-2.16.016 v1.0 — "ARP Findings Output is Unbounded"
Supporting contract BC-2.16.010 v1.8 — ARP analyzer state/output behavior
Story STORY-113, AC-022
Fix cycle fix-pc-013-014-015, open item PC-015

Traceability chain:
BC-2.16.016 PC4 (CLI help must document unbounded behavior) → AC-022 (STORY-113) → src/cli.rs --arp long_help → tests/bc_2_16_016_arp_tests.rs Red Gate

F1 Finding Correction

The original F1 (PC-015) incorrectly flagged the ARP analyzer as having a hidden findings cap. The corrected finding: ARP has no findings cap at all — this is correct behavior (ARP operates at L2, bypassing TCP reassembly limits), but the absence of a cap was undocumented. This PR closes the documentation gap.

Test Evidence

All local gates pass on fix/arp-findings-unbounded-help:

cargo test --all-targets       ✓ PASS
cargo clippy --all-targets -- -D warnings   ✓ PASS (0 warnings)
cargo fmt --check              ✓ PASS

Specific tests added/passing:

  • src/analyzer/arp.rs::bc_2_16_016::test_BC_2_16_016_arp_findings_vec_has_no_cap — characterization, all_findings.len() == 10,001 (>10,000), no cap applied
  • tests/bc_2_16_016_arp_tests.rs::bc_2_16_016::test_BC_2_16_016_cli_help_documents_arp_findings_unbounded — Red Gate integration test, asserts "unbounded" in --arp help text

Risk Assessment

Blast radius: Documentation-only change to CLI help text + new tests. Zero behavior change. No production code paths altered beyond the long_help string in src/cli.rs.

Risk level: Low. No logic changes; clap long_help is rendered only when user passes --help.

Fix Bundle Context

This is item 3 of 3 in the fix-pc-013-014-015 bundle:

  • PC-013: ARP table bounds (MAX_ARP_BINDINGS) — already merged
  • PC-014: Storm counter bounds (MAX_STORM_COUNTERS) — already merged
  • PC-015: Document unbounded findings output — THIS PR

Pre-Merge Checklist

  • Semantic PR title (docs scope, CI-compliant)
  • BC traceability complete (BC-2.16.016 → AC-022 → test → code)
  • All local gates pass (test, clippy, fmt)
  • Red Gate test added (bc_2_16_016_arp_tests.rs)
  • Characterization regression guard added (arp.rs mod bc_2_16_016)
  • No .factory/STATE.md changes
  • No behavior changes (doc + test only)

Zious11 added 2 commits June 23, 2026 22:51
…p [PC-015, BC-2.16.016]

Adds long_help to the --arp clap arg in src/cli.rs documenting that ARP
findings output is UNBOUNDED — no MAX_FINDINGS cap applies to the ARP
analyzer path (contrast: HTTP/TLS/Modbus/DNP3 cap at 10,000 via TCP
reassembly layer). Also clarifies that the ARP binding table cap
(MAX_ARP_BINDINGS=65,536) and storm-counter table cap
(MAX_STORM_COUNTERS=4,096) are memory bounds on internal state only and
do not cap findings output.

Documentation-surface fix only: no ARP analyzer behavior changed.

Passes: test_BC_2_16_016_cli_help_documents_arp_findings_unbounded (Red Gate)
Stays green: test_BC_2_16_016_arp_findings_vec_has_no_cap (characterization)
… [PC-015]

- src/analyzer/arp.rs: mod bc_2_16_016 characterization test verifies
  ARP findings Vec has no MAX_FINDINGS cap (>10,000 findings with N=10,001
  distinct IPs, spoof_threshold=1)
- tests/bc_2_16_016_arp_tests.rs: integration Red Gate test asserts the
  word "unbounded" appears in wirerust analyze --help output for --arp flag

Part of fix bundle fix-pc-013-014-015 / STORY-113 AC-022 / BC-2.16.016 v1.0.
@Zious11 Zious11 merged commit 2645139 into develop Jun 24, 2026
10 checks passed
@Zious11 Zious11 deleted the fix/arp-findings-unbounded-help branch June 24, 2026 04:02
Zious11 added a commit that referenced this pull request Jun 24, 2026
PC-015 DELIVERED & MERGED. PR #310 "docs(cli): document ARP findings
output is unbounded in --arp help [PC-015]" merged to develop at commit
2645139 (2026-06-24). All 10 CI checks green; clean code + security review.
Anchored BC-2.16.016 v1.0 / BC-2.16.010 v1.8 → STORY-113 AC-022. Tests:
test_BC_2_16_016_cli_help_documents_arp_findings_unbounded (Red Gate) +
test_BC_2_16_016_arp_findings_vec_has_no_cap (characterization), passing.

STATE.md changes (single-commit burst protocol):
- phase: FIX-CYCLE-SPEC-DONE → FIX-CYCLE
- phase_status: updated to reflect PC-015 DONE, PC-013/014 SPEC-DONE
- develop_head: 0115d0e2645139
- factory_artifacts_head: a69d757eade774
- current_wave: updated (1 of 3 fixes delivered; PC-013 next)
- Open Items: PC-015 → DONE (PR #310, develop 2645139)
- Status: updated develop_head + PC-015 delivery note + test citations
- Phase Progress: fix-pc-013-014-015 row → IN-PROGRESS (1/3 delivered)
- GROUND-TRUTH HEADs: verified at D-222
- RESUME PROCEDURE: develop ref updated to 2645139
- Decisions Log: D-222 added
- Resolved items: PC-015 added to resolved list

No BC or story files touched (state-only burst).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant