Skip to content

Commit 8e08dc7

Browse files
authored
CM-32048 - Fix secret scan via detector service (#210)
1 parent 292a719 commit 8e08dc7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

cycode/cyclient/scan_client.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,14 @@ def __init__(
3030

3131
self._hide_response_log = hide_response_log
3232

33-
def get_scan_controller_path(self, scan_type: str) -> str:
33+
def get_scan_controller_path(self, scan_type: str, should_use_scan_service: bool = False) -> str:
3434
if scan_type == consts.INFRA_CONFIGURATION_SCAN_TYPE:
3535
# we don't use async flow for IaC scan yet
3636
return self._SCAN_SERVICE_CONTROLLER_PATH
37+
if not should_use_scan_service and scan_type == consts.SECRET_SCAN_TYPE:
38+
# if a secret scan goes to detector directly, we should not use CLI controller.
39+
# CLI controller belongs to the scan service only
40+
return self._SCAN_SERVICE_CONTROLLER_PATH
3741

3842
return self._SCAN_SERVICE_CLI_CONTROLLER_PATH
3943

0 commit comments

Comments
 (0)