Severity
Medium — untrusted-shape data persisted and consumed downstream without validation.
Location
electron/ipc.ts:173 (updateAnalysis handler) validates only input.sessionId; it forwards title / intent / steps unchecked.
electron/describer/describer.ts:142 (edit) persists the edited analysis.
Mechanism
The renderer-supplied steps (and title/intent) are written to the persisted analysis with no schema validation of the array/step shape. Malformed or partial structures reach bundle/builder consumers that assume a well-formed Analysis.
Impact
A malformed edit can corrupt the persisted analysis and cause downstream builder failures or bad output — and, because it's persisted, the corruption survives restarts.
Suggested fix
Validate the payload against the Analysis/step schema (types, required fields, step shape) in the handler or in describer.edit before persisting; reject with a clear error otherwise.
Regression test to add (npm test)
Unit test updateAnalysis/edit with a malformed payload (missing/typo'd step fields); assert it's rejected and nothing is persisted. Deterministic; the evals/ suites score model output, not this IPC validation.
Severity
Medium — untrusted-shape data persisted and consumed downstream without validation.
Location
electron/ipc.ts:173(updateAnalysishandler) validates onlyinput.sessionId; it forwardstitle/intent/stepsunchecked.electron/describer/describer.ts:142(edit) persists the edited analysis.Mechanism
The renderer-supplied
steps(and title/intent) are written to the persisted analysis with no schema validation of the array/step shape. Malformed or partial structures reachbundle/builder consumers that assume a well-formedAnalysis.Impact
A malformed edit can corrupt the persisted analysis and cause downstream builder failures or bad output — and, because it's persisted, the corruption survives restarts.
Suggested fix
Validate the payload against the
Analysis/step schema (types, required fields, step shape) in the handler or indescriber.editbefore persisting; reject with a clear error otherwise.Regression test to add (
npm test)Unit test
updateAnalysis/editwith a malformed payload (missing/typo'd step fields); assert it's rejected and nothing is persisted. Deterministic; theevals/suites score model output, not this IPC validation.