You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
viewer: phase list, load events, element tree and the parameter cache grow with the file uncapped #1887
Batch 5's audit of the viewer (main at e57db42): four workers read all of viewer/src/main.ts, the workers and index.html for DOM injection and for anything that could send file data off the machine. No injection and no network path for file data was found. Every file-chosen string is written with textContent or a text-only attribute; the only innerHTML writes assign an empty string; the two fetch calls run on build-time assets before a file is opened. Each finding below was confirmed by a second reader; all are memory or DOM growth a large or crafted file controls.
One <option> per phase id, with no cap (main.ts:1160-1170, from rvt-wasm/src/lib.rs:306 and native_phases.rs:444-456).
loadEvents grows by one object per decoder progress report, with no cap or throttle, and is serialised into a DOM attribute on every push (main.ts:690, :708, :1363).
The element tree builds every row and child subtree up front, with no cap (main.ts:1938-1947, :2290-2298).
The saved-parameter cache is capped at 64 entries but not in bytes (main.ts:2781-2788), and the cap itself comes from the page's query string with no upper bound (main.ts:2711-2714, wholeBytesParam at :1097-1102).
Fix direction: a byte budget for the cache, a cap or virtualisation for the tree and the phase list, and a ring buffer for loadEvents. No export moves.
Activity
ci(viewer): tree-rows.spec.ts is in the second leg of the viewer tests (
fix(viewer): the page bounds what a large or crafted file can make it…