Re-calculate historical risk score #789
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Related to DependencyTrack/dependency-track#2824 , this issue is to allow the custom weights of risk scores to be re-calculated.
Addressed Issue
Related to DependencyTrack/dependency-track#2824
Front end issue to go along with this is DependencyTrack/hyades-frontend#94
Additional Details
Adds a new endpoint to tell the database to recalculate with
/riskscore/refresh
. If there's a better approach for this, I'm all ears!This PR is draft, I have a few questions / open ended items:
DEPENDENCYMETRICS
table. I have pgadmin set up and connected to the hyades database, but i'm unable to run a query of the sql as it is, or even just the "update" part.weight.history.enabled
is True, don't run this when false. Where would this logic be done?Checklist