credential-digger icon indicating copy to clipboard operation
credential-digger copied to clipboard

broken scans shown as completed in the UI

Open marcorosa opened this issue 3 years ago • 4 comments

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)

marcorosa avatar Apr 12 '22 13:04 marcorosa

I would like to work on this

wassafshahzad avatar Oct 14 '24 15:10 wassafshahzad

sure, thanks

marcorosa avatar Oct 15 '24 07:10 marcorosa

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

wassafshahzad avatar Oct 20 '24 00:10 wassafshahzad

@marcorosa Just need your go ahead before implementing

wassafshahzad avatar Oct 22 '24 15:10 wassafshahzad