Skip to content

[Bug] Frontend BackendFinding Type Does Not Match ScanResponse Schema #50

Description

@Krishnx21

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.

Metadata

Metadata

Labels

SSoC26backendBackend issuesbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions