[FE] Generic Report Schema: Render 'file-location' type on vulnerability details page
Why are we doing this work
Allows scan results to add new labels and values to a vulnerability, where the label is any string they want and the value is one of the following types: named-list
, list
, table
, url
, int
, text
, diff
, markdown
(GFM), code
, commit
, file-location
, and module-location
.
This issue is specific to the file-location
type
Designs
component | design |
---|---|
file-location |
Sample Data
file-location
(based on https://gitlab.com/gitlab-org/security-products/security-report-schemas/-/blob/master/src/vulnerability-details-format.json#L246)
{
"type": "file_location",
"file_name": "index.js",
"line_start": "1",
"line_end: "2" // optional
}
Relevant links
Information that the developer might need to refer to when implementing the issue.
Non-functional requirements
-
Documentation: -
Feature flag: -
Performance: -
Testing:
Implementation plan
-
frontend Add file-location
component-
Construct link - example in POC: !41783 (diffs) -
Construct the rendered text: - if the data contains a
line_end
:${file_name}:${line_start}-${line_end}
- else
${file_name}:${line_start}
- if the data contains a
-
-
Add specs
Edited by David Pisek