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

Providing score trend on plugins #493

Open
alecharp opened this issue Mar 19, 2024 · 11 comments · May be fixed by #495
Open

Providing score trend on plugins #493

alecharp opened this issue Mar 19, 2024 · 11 comments · May be fixed by #495
Labels
enhancement New feature or request

Comments

@alecharp
Copy link
Collaborator

Knowing the current score of a plugin great, but knowing if it improves and is getting worse would be a nice addition to the data we have on each plugin.

In addition, knowing when that previous score was computed would help understand if the plugin is change frequently or not.

@alecharp alecharp added the enhancement New feature or request label Mar 19, 2024
@AayushSaini101 AayushSaini101 linked a pull request Mar 22, 2024 that will close this issue
@AayushSaini101
Copy link
Contributor

We already keep the last at max 5 scores in the scores table, We can return a list of the score to UI, then UI can decide if its shows the value or if it shows a sign for the trend
image

@AayushSaini101
Copy link
Contributor

We just need to create a api to return a list of score with timestamp of generation, It would help the UI to analyse the trend easily

@alecharp
Copy link
Collaborator Author

No you don't.
Plugins Site is using one API endpoint and shouldn't have to multiply the calls.

In the current /api/scores output, we should add a new entry, for each plugin, to hold the previously known score.

@AayushSaini101
Copy link
Contributor

No you don't. Plugins Site is using one API endpoint and shouldn't have to multiply the calls.

In the current /api/scores output, we should add a new entry, for each plugin, to hold the previously known score.

Thanks @alecharp so the endpoint will be /api/scores/{pluginName} this will return all the score result

@alecharp
Copy link
Collaborator Author

No, that would still be a new endpoint. We want the trend to be accessible in the current /api/scores output.

@AayushSaini101
Copy link
Contributor

No, that would still be a new endpoint. We want the trend to be accessible in the current /api/scores

@alecharp Thanks, in this case, we can create and pass another parameter in the score card, return bodyBuilder.body(new ScoreReport(plugins, scoreService.getScoresStatistics())); that contains all the information of past score of a plugin

@alecharp
Copy link
Collaborator Author

alecharp commented Mar 26, 2024

No. We want the elements of plugins to have a previousScore for example.

@AayushSaini101
Copy link
Contributor

No. We want the elements of plugins to have a previousScore for example.

@alecharp Example, in single DB call ?
"plugins": {
"aws-java-sdk-sns": {
"value": 24,
"date": "2024-01-24T07:56:49.118963Z",
"previousScore": 98, 34, 23
"details": {
"security": {
"value": 100,
"weight": 1,
"components": [
{
"value": 100,
"weight": 1,
"reasons": [
"Plugin does not seem to have on-going security advisory."
],
"resolutions": null
}
]
},

@alecharp
Copy link
Collaborator Author

Either you provide an array of previous score, or only one value. Last value is enough.

@AayushSaini101
Copy link
Contributor

Either you provide an array of previous score, or only one value. Last value is enough.

Thank you so much @alecharp I guess it is good to provide all previous score to better analysis

@alecharp
Copy link
Collaborator Author

No, only last score is better. It's easier to interpret.

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

Successfully merging a pull request may close this issue.

2 participants