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

Ability to change default values of severities in risk score calculation #2824

Open
2 tasks done
nvcastelli opened this issue Jun 15, 2023 · 10 comments
Open
2 tasks done
Assignees
Labels
enhancement New feature or request size/M Medium effort

Comments

@nvcastelli
Copy link

Current Behavior

Right now the risk scores are calculated as follow:
((critical * 10) + (high * 5) + (medium * 3) + (low * 1) + (unassigned * 5))

I believe this is the formula used across all risk scored in DT.

Proposed Behavior

If we could have the ability to change these weights based on how users rate each risk types it would allow us a more personal view on risk scores after the calculation has been done. This could could be achieved via uploading a file with new rates or, more involved, creating UI elements to select weights for critical, high, etc.

This may be opened up later to change the calculation but right now being able to change the severity weights would be a good starting point.

Checklist

@nvcastelli nvcastelli added the enhancement New feature or request label Jun 15, 2023
@mrutkows
Copy link

mrutkows commented Jun 19, 2023

@nscuro Hi Niklas, please know we discussed this (along with similar customization goals) with Steve and Mark during the last DT call and they said you may be returning soon and would love to chat with you and our Nicholas to recount the discussion points.

@leec94
Copy link
Contributor

leec94 commented Sep 18, 2023

hi @nscuro I made a mock up of how customizing the risk score could look like. this was a quick mock up, i think in practice if the "default risk score" checkbox is enabled, it would grey out the boxes. what do you think?
image

@leec94
Copy link
Contributor

leec94 commented Apr 23, 2024

it's been a while, but i'm looking into picking up this issue again. hi @VinodAnandan , i was told that this issue may be already implemented in Hyades, is this true? otherwise, are there any update for me on this issue before i get started? thanks!

@VinodAnandan
Copy link
Contributor

Yes, it can be implemented using "Vulnerability Policies" / CEL (Common Expression Language) in Hyades.

@leec94
Copy link
Contributor

leec94 commented Apr 24, 2024

do you have an example of how to do this? i'm on the vulnerability policies page but don't see where i can add a policy with CEL

image

@leec94
Copy link
Contributor

leec94 commented May 15, 2024

I remember the expression language being demoed in a previous community call, so i found the screenshot, selecting "Expression" as the condition. I don't see this condition available to select in my docker instance of hyades however? @VinodAnandan do you know where I can test this feature?

It also seems like this language describes conditions that would trigger a policy, rather than change the risk score itself, unless I'm missing something?

Adding relevant links below for reference.

expression language docs link: https://dependencytrack.github.io/hyades/latest/usage/policy-compliance/expressions/

link to demo: https://youtu.be/nRTHbgOHHDA?t=2555

screenshot of "expression" condition being used:
image

@VinodAnandan
Copy link
Contributor

@leec94 I apologise for missing your reply.

I now realise that the "Vulnerability Policy" lacks significant documentation ( DependencyTrack/hyades#997 ). This is an area where we will need help. The "Vulnerability Policy" works based on the policy bundle. I recommend watching this video before trying out the feature: https://www.youtube.com/watch?v=hD06WaqW_2w&t=1121s

The following are the steps to create a test bundle in your local Hyades DT. @nscuro shared these steps three months ago. I believe we need to convert some of this information into a standard document and another part into automated code within docker-compose to bootstrap an example bundle.

"https://github.com/DependencyTrack/hyades/tree/vuln-policy-demo

@nscuro
Copy link
Member

nscuro commented May 16, 2024

The best documentation for vulnerability policies we have ATM is the original design document: DependencyTrack/hyades#930. DependencyTrack/hyades#997 is already assigned to me, and I started working on improving our docs before my vacation - I'll pick it up again once I am back.

The idea of vulnerability policies is to allow users to override risk ratings (CVSSv2, CVSSv3, OWASP RR) for findings matching the policy's conditions. But this is different from the ask in this issue, which is about customizing the risk scoring algorithm.

@leec94
Copy link
Contributor

leec94 commented May 17, 2024

thanks both, would it make sense if this feature was then incorporated into the vulnerability policy as another score/rating that can be overridden?

@leec94
Copy link
Contributor

leec94 commented Jun 4, 2024

hi @nscuro do you have suggestions on which way to complete this issue? im happy to work on this but am unsure of the way to go about it. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size/M Medium effort
Projects
None yet
Development

No branches or pull requests

5 participants