File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,11 @@ def _enrich_scan_result_with_data_from_detection_rules(
122122                # we want to make sure that BE returned it. better to not map data instead of failed scan 
123123                continue 
124124
125-             # TODO(MarshalX): here we can also map severity without migrating secrets to async flow 
125+             if  detection_rule .classification_data :
126+                 # it's fine to take the first one, because: 
127+                 # - for "secrets" and "iac" there is only one classification rule per detection rule 
128+                 # - for "sca" and "sast" we get severity from detection service 
129+                 detection .severity  =  detection_rule .classification_data [0 ].severity 
126130
127131            # detection_details never was typed properly. so not a problem for now 
128132            detection .detection_details ['custom_remediation_guidelines' ] =  detection_rule .custom_remediation_guidelines 
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments