@@ -171,6 +171,13 @@ def get_detection_rules(
171171    def  get_scan_detections_path (self , scan_type : str ) ->  str :
172172        return  f'{ self .scan_config .get_detections_prefix ()} { self .get_detections_service_controller_path (scan_type )}  
173173
174+     def  get_scan_detections_list_path (self , scan_type : str ) ->  str :
175+         suffix  =  '' 
176+         if  scan_type  ==  consts .SCA_SCAN_TYPE :
177+             suffix  =  '/detections' 
178+ 
179+         return  f'{ self .get_scan_detections_path (scan_type )} { suffix }  
180+ 
174181    def  get_scan_detections (self , scan_type : str , scan_id : str ) ->  List [dict ]:
175182        params  =  {'scan_id' : scan_id }
176183
@@ -184,9 +191,8 @@ def get_scan_detections(self, scan_type: str, scan_id: str) -> List[dict]:
184191            params ['page_size' ] =  page_size 
185192            params ['page_number' ] =  page_number 
186193
187-             path  =  f'{ self .get_scan_detections_path (scan_type )}  
188194            response  =  self .scan_cycode_client .get (
189-                 url_path = path ,
195+                 url_path = self . get_scan_detections_list_path ( scan_type ) ,
190196                params = params ,
191197                hide_response_content_log = self ._hide_response_log ,
192198            ).json ()
@@ -197,12 +203,12 @@ def get_scan_detections(self, scan_type: str, scan_id: str) -> List[dict]:
197203
198204        return  detections 
199205
200-     def  get_get_scan_detections_count_path (self , scan_type : str ) ->  str :
206+     def  get_scan_detections_count_path (self , scan_type : str ) ->  str :
201207        return  f'{ self .get_scan_detections_path (scan_type )}  
202208
203209    def  get_scan_detections_count (self , scan_type : str , scan_id : str ) ->  int :
204210        response  =  self .scan_cycode_client .get (
205-             url_path = self .get_get_scan_detections_count_path (scan_type ), params = {'scan_id' : scan_id }
211+             url_path = self .get_scan_detections_count_path (scan_type ), params = {'scan_id' : scan_id }
206212        )
207213        return  response .json ().get ('count' , 0 )
208214
0 commit comments