plugin-health-scoring icon indicating copy to clipboard operation
plugin-health-scoring copied to clipboard

Providing score trend on plugins

Open alecharp opened this issue 1 year ago • 11 comments
trafficstars

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 avatar Mar 19 '24 14:03 alecharp

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 avatar Mar 25 '24 10:03 AayushSaini101

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

AayushSaini101 avatar Mar 25 '24 10:03 AayushSaini101

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.

alecharp avatar Mar 25 '24 13:03 alecharp

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

AayushSaini101 avatar Mar 26 '24 08:03 AayushSaini101

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

alecharp avatar Mar 26 '24 08:03 alecharp

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

AayushSaini101 avatar Mar 26 '24 11:03 AayushSaini101

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

alecharp avatar Mar 26 '24 11:03 alecharp

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 } ] },

AayushSaini101 avatar Mar 26 '24 11:03 AayushSaini101

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

alecharp avatar Mar 26 '24 11:03 alecharp

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

AayushSaini101 avatar Mar 26 '24 12:03 AayushSaini101

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

alecharp avatar Mar 27 '24 09:03 alecharp