-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CM-24180 support zip scan for repository #128
Conversation
add support for secret scanning using the ScanService
add support for secret scanning using the ScanService
make the if shorter
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great Job! Please see my comments.
# get the full path by combining file_path and file_name | ||
return f"{detection['detection_details']['file_path']}{detection['detection_details']['file_name']}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Extract to method - get_secret_detection_full_path and in the comment maybe add an example instead of explain the code below for better readibility.
@@ -7,6 +7,7 @@ | |||
from . import models | |||
from .cycode_client_base import CycodeClientBase | |||
from .scan_config.scan_config_base import ScanConfigBase | |||
from ..cli.consts import SECRET_SCAN_TYPE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For consistency with other modules in the project from cycode.cli.consts
if scan_type == SECRET_SCAN_TYPE: | ||
scan_type = "secrets" #the scanService endpoint is secrets and not secret |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
extract to method - get_scan_uri which will return {scan_type}/repository.
if secret
return secrets/repository
else
{scan_type}/repository
anyway, avoid overriding method input and I think that it will be clear so you can skip the comment.
@galdavidi , this PR is still relevant? |
that's duplicate of #136. im waiting for BE chabges first. not merged yet |
Cm 24180 support zip scan for repository
enable to scan files for secreats using the Cycode-cli