Skip to content

Commit

Permalink
ignore findings from deleted detectors
Browse files Browse the repository at this point in the history
Signed-off-by: Amardeepsingh Siglani <[email protected]>
  • Loading branch information
amsiglan committed Nov 30, 2023
1 parent 645878d commit 1e0650b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions public/store/CorrelationsStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,12 +273,16 @@ export class CorrelationsStore implements ICorrelationsStore {
);

if (response?.ok) {
const correlatedFindings = response.response.findings.map((f) => {
return {
...allFindings[f.finding],
correlationScore: f.score < 0.01 ? '0.01' : f.score.toFixed(2),
};
const correlatedFindings: CorrelationFinding[] = [];
response.response.findings.forEach((f) => {
if (allFindings[f.finding]) {
correlatedFindings.push({
...allFindings[f.finding],
correlationScore: f.score < 0.01 ? '0.01' : f.score.toFixed(2),
});
}
});

return {
finding: allFindings[finding],
correlatedFindings,
Expand Down

0 comments on commit 1e0650b

Please sign in to comment.