Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VCIO: Improve API for vulnerability scores #1565

Open
pombredanne opened this issue Aug 22, 2024 · 2 comments
Open

VCIO: Improve API for vulnerability scores #1565

pombredanne opened this issue Aug 22, 2024 · 2 comments

Comments

@pombredanne
Copy link
Member

The API for a vulnerability returns score like this:

{
                    "reference_url": "https://github.com/log4js-node/streamroller/pull/87",
                    "reference_id": "",
                    "reference_type": "",
                    "scores": [
                        {
                            "value": "5.5",
                            "scoring_system": "cvssv3.1",
                            "scoring_elements": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:N"
                        },
                        {
                            "value": "MODERATE",
                            "scoring_system": "generic_textual",
                            "scoring_elements": ""
                        }
                    ],
                    "url": "https://github.com/log4js-node/streamroller/pull/87"
                },

This is poorly usable by consumer and requires a lot of post processing.

We should expose the data in an improved way TBD.

  1. we could provide the severity score range like in the UI, see
    "severity_score_range": get_severity_range(severity_values),
    but this would need to be structure such that this can be used for sorting
  2. we could also invert the data above and provide a list of scores firt and references as attributes
@tdruez
Copy link
Contributor

tdruez commented Aug 23, 2024

@TG1999 In the very short term, could you add a severity_score_range field to the VulnerabilitySerializer that would return the values computed from get_severity_range()?
This would go a long way to avoid any duplication on the data consumer side.

@Sanskriti0805
Copy link

hello ! if this is still available can i work upon this ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants