Skip to content

[FE] Generic Report Schema: Render 'value' type (string, int, boolean) 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, boolean, diff, markdown (GFM), code, commit, file-location, and module-location.

This issue is specific to the 'value' types (string, int, boolean)

Designs

component design
text image

Sample Data

text (combined details example)

"details": {
  "file_diff": {
    "name": "fred.rb",
    "type": "commit",
    "value": "1234567"
  },
  "website": {
    "name": "Website",
    "type": "url",
    "href": "http://mysite.com"
  },
  "comments": {
    "name": "Comments",
    "type": "named-list",
    "items": {
      "comment_1": {
        "name": "Fred:",
        "type": "text",
        "value": "Hi Wilma"
      },
      "comment_2": {
        "name": "Wilma:",
        "type": "markdown",
        "value": "Hi Fred. Checkout [GitLab](http://gitlab.com)"
      },
      "resources": {
        "name": "resources",
        "type": "list",
        "items": [
          {
            "type": "value",
            "value": "42"
          }
        ]
      }
    }
  }
}

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 text component which receives a property value and renders it. If it receives a boolean we should probably print true or false.
  • Add specs
Edited by Savas Vedova