The frontend defines:
interface BackendFinding {
file: string;
line: number;
tool: string;
}
However, the backend returns findings using the Finding model:
{
id,
category,
severity,
title,
description,
location,
metadata,
reachability,
features
}
The response contains:
location.path
location.start_line
instead of:
file
line
tool
There are no top-level file, line, or tool fields returned by the API.
Steps to Reproduce
Execute /scan.
Inspect API response.
Render findings in frontend components expecting:
finding.file
finding.line
finding.tool
Observe undefined values or rendering failures.
Expected Behavior
Frontend typings should accurately represent backend responses.
Actual Behavior
Type definitions and runtime payloads are inconsistent.
Impact
High. Findings may fail to render correctly, sorting/filtering may break, and runtime errors can occur.
Suggested Fix
Either:
Update frontend types to use:
location?.path
location?.start_line
metadata?.engine
or
Transform backend responses into the shape expected by the frontend.
The frontend defines:
interface BackendFinding {
file: string;
line: number;
tool: string;
}
However, the backend returns findings using the Finding model:
{
id,
category,
severity,
title,
description,
location,
metadata,
reachability,
features
}
The response contains:
location.path
location.start_line
instead of:
file
line
tool
There are no top-level file, line, or tool fields returned by the API.
Steps to Reproduce
Execute /scan.
Inspect API response.
Render findings in frontend components expecting:
finding.file
finding.line
finding.tool
Observe undefined values or rendering failures.
Expected Behavior
Frontend typings should accurately represent backend responses.
Actual Behavior
Type definitions and runtime payloads are inconsistent.
Impact
High. Findings may fail to render correctly, sorting/filtering may break, and runtime errors can occur.
Suggested Fix
Either:
Update frontend types to use:
location?.path
location?.start_line
metadata?.engine
or
Transform backend responses into the shape expected by the frontend.