Open marcorosa opened 2 years ago
I would like to work on this
sure, thanks
@marcorosa I did some RnD on this issue and my findings are as follows.
This error can occur in multiple cases but the case most severe in our scenario is, if the repo is inserted into the db and the discoveries are not. In that particular case, The get_repo
api will succeed in getting the repos but their discoveries will be 0.
In all other cases as long as the repo is not inserted in the db the get_repo
apis return will fix the UI.
In our scenario, we need to save the state of the repository in the db or we can consider repos with default values for following attributes as failed and update the UI accordingly
{ "FP": 0, "TP": 0, "addressing": 0, "fixed": 0, "not_relevant": 0, "total": 0, }
@marcorosa Just need your go ahead before implementing
If a scan raises an error (either in the scanner, or models, or db), the discoveries are not inserted in the db, but the UI shows the scan as completed with 0 discoveries.
We should not show them as completed but as broken/error (and maybe with color-code red, not green neither yellow)