Skip to content
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

Closed
wants to merge 3 commits into from

Conversation

galdavidi
Copy link

Cm 24180 support zip scan for repository

enable to scan files for secreats using the Cycode-cli

galdavidi added 2 commits June 26, 2023 17:03
add support for secret scanning using the ScanService
add support for secret scanning using the ScanService
Copy link
Collaborator

@avishaiamiel avishaiamiel left a 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.

Comment on lines +995 to +996
# get the full path by combining file_path and file_name
return f"{detection['detection_details']['file_path']}{detection['detection_details']['file_name']}"
Copy link
Collaborator

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
Copy link
Collaborator

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

Comment on lines +46 to +47
if scan_type == SECRET_SCAN_TYPE:
scan_type = "secrets" #the scanService endpoint is secrets and not secret
Copy link
Collaborator

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.

@doratias18 doratias18 changed the title Cm 24180 support zip scan for repository CM-24180 support zip scan for repository Jul 6, 2023
@MichalBor
Copy link
Collaborator

@galdavidi , this PR is still relevant?

@MarshalX
Copy link
Collaborator

@galdavidi , this PR is still relevant?

that's duplicate of #136. im waiting for BE chabges first. not merged yet

@galdavidi galdavidi closed this Jul 27, 2023
@doratias18 doratias18 deleted the CM-24180-support-zip-scan-for-repository branch August 4, 2023 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants