File tree Expand file tree Collapse file tree
dojo/tools/reversinglabs_spectraassure Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -51,13 +51,12 @@ def _one_finding(
5151 cvssv3_score = node .score ,
5252 severity = node .score_severity ,
5353 vuln_id_from_tool = node .vuln_id_from_tool ,
54- unique_id_from_tool = node .unique_id_from_tool , # purl if we have one ?
5554 file_path = node .component_file_path ,
5655 component_name = node .component_name ,
5756 component_version = node .component_version ,
5857 nb_occurences = 1 ,
5958 hash_code = key , # sha256 on title
60- references = None , # future urls
59+ references = None , # future: urls
6160 active = True , # this is the DefectDojo active field, nothing to do with node.active field
6261 test = test ,
6362 static_finding = True ,
@@ -108,7 +107,7 @@ def get_findings(
108107 self ._duplicates [key ] = finding
109108 continue
110109
111- dup = self ._duplicates [key ] # but that may be on a different component file, name, version
110+ dup = self ._duplicates [key ]
112111 if dup :
113112 dup .description += finding .description
114113 dup .nb_occurences += 1
Original file line number Diff line number Diff line change 11import copy
22import datetime
3- import gc
43import json
54import logging
6- import os
75import sys
86from typing import Any
97
@@ -90,18 +88,10 @@ def __init__(
9088
9189 self .data : dict [str , Any ] = json .load (file_handle )
9290 self ._results = {}
93-
94- self .RL_JSON_WITH_CG_COLLECT : bool = False
95- if os .getenv ("RL_JSON_WITH_CG_COLLECT" ):
96- self .RL_JSON_WITH_CG_COLLECT = True
97-
9891 self ._get_info ()
9992 self ._get_meta ()
10093 self ._get_rest ()
10194
102- if self .RL_JSON_WITH_CG_COLLECT is True :
103- gc .collect ()
104-
10595 def _get_info (
10696 self ,
10797 ) -> None :
@@ -407,7 +397,10 @@ def _do_one_cve_component_dependency(
407397 if len (tail ) == 0 :
408398 tail = f"{ dep_name } @{ dep_version } "
409399
410- cin .unique_id_from_tool = f"{ cin .component_file_sha256 } :{ cve } :{ tail } "
400+ # should be constant over multiple re-scans (repeatable)
401+ # see: https://github.com/DefectDojo/django-DefectDojo/pull/12463
402+ # cin.unique_id_from_tool = f"{cin.component_file_sha256}:{cve}:{tail}"
403+ # downvoted as not originally from the tool itself.
411404
412405 logger .debug ("%s" , cin )
413406 return cin
@@ -448,7 +441,8 @@ def _do_one_cve_component_without_dependencies(
448441
449442 # should be constant over multiple re-scans (repeatable)
450443 # see: https://github.com/DefectDojo/django-DefectDojo/pull/12463
451- cin .unique_id_from_tool = f"{ cin .component_file_sha256 } :{ cve } "
444+ # cin.unique_id_from_tool = f"{cin.component_file_sha256}:{cve}"
445+ # downvoted as not originally from the tool itself.
452446
453447 logger .debug ("%s" , cin )
454448
You can’t perform that action at this time.
0 commit comments