Add files via upload#1298
Conversation
Upgraded
|
Let me know your review |
ruvnet
left a comment
There was a problem hiding this comment.
Verdict
Request changes. Do not merge PR 1298 in its current form.
1. Critical: remotely supplied MAC values enable DOM injection
The UDP gateway accepts arbitrary JSON on 0.0.0.0:5555. The supplied mac reaches innerHTML without escaping, both as text and inside data-mac. An attacker on the reachable network can inject markup or script into the operator's browser.
Affected locations: 06-cyber-hud.html line 776 and line 906.
Fix: validate MAC addresses against a strict canonical pattern, then construct roster and log elements with textContent, never innerHTML.
2. Critical: Jacobi eigensolver fails when diagonal elements are equal
At aoa_music.rs line 329:
let t = theta.signum() / (...)When theta == 0, signum() returns zero, producing no rotation. The included matrix [[2,1],[1,2]] has exactly this condition, so test_jacobi_known_2x2 should fail. This also undermines MUSIC eigenvectors and multilateration geometry rank checks.
Fix:
let t = if theta >= 0.0 {
1.0 / (theta + (theta * theta + 1.0).sqrt())
} else {
1.0 / (theta - (theta * theta + 1.0).sqrt())
};3. High: gateway has unbounded unauthenticated state
Every unique MAC and node identifier creates persistent dictionary entries at serve-demo.py line 137. Arbitrary strings, nonfinite RSSI values, and unlimited identities are accepted. A UDP flood can cause memory growth and invalid WebSocket JSON.
Fix: enforce MAC and node schemas, finite RSSI limits, datagram rate limits, maximum targets, and maximum nodes per target.
4. High: one slow client can freeze every broadcast
sendall() runs while holding the global clients lock at serve-demo.py line 215, with no write timeout. One stalled connection can block telemetry and client registration indefinitely.
Fix: copy the client set under lock, release it before writes, and impose short socket timeouts or per-client queues.
5. Medium: multilateration can report a false zero residual
With max_iterations == 0, the solver returns the initialized position with rms_residual_m == 0. For normal iteration counts, residual is calculated before applying the final update, so it does not necessarily describe the returned position.
Fix: validate configuration and recompute residual after the final position update.
The three Actions runs currently show action_required, not successful verification. The PR itself also admits the Rust code was never compiled by the contributor.
Acceptance test: run the Rust workspace tests, inject a hostile MAC such as `"><img src=x onerror=alert(1)>', and connect a WebSocket client that stops reading. All three scenarios must complete safely before approval.
Generated by Claude Code
|
Expanding on the review with concrete implementation guidance for each point. 1. MAC injection → DOM XSS (
|
🚀 Feat: Dynamic Multi-Target Tracking Matrix, UDP Network Gateway, and Live Spatial Calibration UI
📝 Summary
This pull request upgrades the core positioning engine from a legacy single-target simulation framework into a robust, concurrent, multi-target real-world tracking cockpit. It implements a native multi-threaded network ingestion pipeline, introduces standard RF physics signal calibration directly to the client UI, and expands the visual layer to track an arbitrary number of hardware targets simultaneously.
🛠️ Core Upgrades & Feature Breakdown
1. Concurrency & Network Ingestion Layer (
serve-demo.py)0.0.0.0:5555over UDP alongside a clean from-scratch RFC 6455 compliant WebSocket server running on port:8770 (/pose).--gatewayor environment variableRUVIEW_UDP_GATEWAY=1) to prevent regressions or breaking default legacy behaviors.2. Frontend Multi-Target Data Structures (
06-cyber-hud.html)activeTargets: Map<mac, track>.dropTrack(mac, 'timeout')workflow if a unique hardware signature falls silent for more than 10 seconds.3. Live Physical Environment Calibration
4. UI/UX Tactical Cockpit Enhancements
📦 Topology Verification
All newly introduced code blocks, variables, and physical configuration hooks successfully map directly over the existing open-source template architecture:
examples/three.js/demos/06-cyber-hud.htmlexamples/three.js/server/serve-demo.py(Note: The corresponding mathematical mirrors for the Rust core modules have been cleanly prepared in
v2/under thewifi-densepose-signalandwifi-densepose-sensing-servercrates for downstream compilation checking.)🧪 How to Verify & Test This PR
Maintainers can evaluate the complete end-to-end framework locally via these steps: