cycode 1.3.1.dev2__py3-none-any.whl → 1.3.1.dev4__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cycode/__init__.py CHANGED
@@ -1 +1 @@
1
- __version__ = '1.3.1.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
1
+ __version__ = '1.3.1.dev4' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -1,7 +1,6 @@
1
1
  import click
2
2
 
3
3
  from cycode.cli.commands.report.sbom.sbom_command import sbom_command
4
- from cycode.cli.utils.get_api_client import get_report_cycode_client
5
4
  from cycode.cli.utils.progress_bar import SBOM_REPORT_PROGRESS_BAR_SECTIONS, get_progress_bar
6
5
 
7
6
 
@@ -16,8 +15,5 @@ def report_command(
16
15
  context: click.Context,
17
16
  ) -> int:
18
17
  """Generate report."""
19
-
20
- context.obj['client'] = get_report_cycode_client(hide_response_log=False) # TODO disable log
21
18
  context.obj['progress_bar'] = get_progress_bar(hidden=False, sections=SBOM_REPORT_PROGRESS_BAR_SECTIONS)
22
-
23
19
  return 1
@@ -8,6 +8,7 @@ from cycode.cli.commands.report.sbom.handle_errors import handle_report_exceptio
8
8
  from cycode.cli.files_collector.path_documents import get_relevant_document
9
9
  from cycode.cli.files_collector.sca.sca_code_scanner import perform_pre_scan_documents_actions
10
10
  from cycode.cli.files_collector.zip_documents import zip_documents
11
+ from cycode.cli.utils.get_api_client import get_report_cycode_client
11
12
  from cycode.cli.utils.progress_bar import SbomReportProgressBarSection
12
13
 
13
14
 
@@ -15,7 +16,7 @@ from cycode.cli.utils.progress_bar import SbomReportProgressBarSection
15
16
  @click.argument('path', nargs=1, type=click.Path(exists=True, resolve_path=True), required=True)
16
17
  @click.pass_context
17
18
  def sbom_path_command(context: click.Context, path: str) -> None:
18
- client = context.obj['client']
19
+ client = get_report_cycode_client()
19
20
  report_parameters = context.obj['report_parameters']
20
21
  output_format = report_parameters.output_format
21
22
  output_file = context.obj['output_file']
@@ -4,6 +4,7 @@ import click
4
4
 
5
5
  from cycode.cli.commands.report.sbom.common import create_sbom_report, send_report_feedback
6
6
  from cycode.cli.commands.report.sbom.handle_errors import handle_report_exception
7
+ from cycode.cli.utils.get_api_client import get_report_cycode_client
7
8
  from cycode.cli.utils.progress_bar import SbomReportProgressBarSection
8
9
 
9
10
 
@@ -15,7 +16,7 @@ def sbom_repository_url_command(context: click.Context, uri: str) -> None:
15
16
  progress_bar.start()
16
17
  progress_bar.set_section_length(SbomReportProgressBarSection.PREPARE_LOCAL_FILES)
17
18
 
18
- client = context.obj['client']
19
+ client = get_report_cycode_client()
19
20
  report_parameters = context.obj['report_parameters']
20
21
  output_file = context.obj['output_file']
21
22
  output_format = report_parameters.output_format
@@ -18,6 +18,6 @@ def create_scan_client(client_id: str, client_secret: str, hide_response_log: bo
18
18
  return ScanClient(client, scan_config, hide_response_log)
19
19
 
20
20
 
21
- def create_report_client(client_id: str, client_secret: str, hide_response_log: bool) -> ReportClient:
21
+ def create_report_client(client_id: str, client_secret: str, _: bool) -> ReportClient:
22
22
  client = CycodeDevBasedClient(DEV_CYCODE_API_URL) if dev_mode else CycodeTokenBasedClient(client_id, client_secret)
23
- return ReportClient(client, hide_response_log)
23
+ return ReportClient(client)
@@ -37,9 +37,8 @@ class ReportClient:
37
37
 
38
38
  DOWNLOAD_REPORT_PATH: str = 'files/api/v1/file/sbom/{file_name}' # not in the report service
39
39
 
40
- def __init__(self, client: CycodeClientBase, hide_response_log: bool = True) -> None:
40
+ def __init__(self, client: CycodeClientBase) -> None:
41
41
  self.client = client
42
- self._hide_response_log = hide_response_log
43
42
 
44
43
  def request_sbom_report_execution(
45
44
  self, params: ReportParameters, zip_file: InMemoryZip = None, repository_url: Optional[str] = None
@@ -55,7 +54,6 @@ class ReportClient:
55
54
  request_args = {
56
55
  'url_path': url_path,
57
56
  'data': request_data,
58
- 'hide_response_content_log': self._hide_response_log,
59
57
  }
60
58
 
61
59
  if zip_file:
@@ -84,7 +82,9 @@ class ReportClient:
84
82
 
85
83
  def get_file_content(self, file_name: str) -> str:
86
84
  response = self.client.get(
87
- url_path=self.DOWNLOAD_REPORT_PATH.format(file_name=file_name), params={'include_hidden': True}
85
+ url_path=self.DOWNLOAD_REPORT_PATH.format(file_name=file_name),
86
+ params={'include_hidden': True},
87
+ hide_response_content_log=True,
88
88
  )
89
89
  return response.text
90
90
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cycode
3
- Version: 1.3.1.dev2
3
+ Version: 1.3.1.dev4
4
4
  Summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
5
5
  Home-page: https://github.com/cycodehq-public/cycode-cli
6
6
  License: MIT
@@ -22,16 +22,16 @@ Classifier: Programming Language :: Python :: 3.10
22
22
  Classifier: Programming Language :: Python :: 3.11
23
23
  Classifier: Programming Language :: Python :: 3 :: Only
24
24
  Classifier: Programming Language :: Python :: 3.12
25
- Requires-Dist: arrow (>=0.17.0,<0.18.0)
25
+ Requires-Dist: arrow (>=0.17.0,<1.3.0)
26
26
  Requires-Dist: binaryornot (>=0.4.4,<0.5.0)
27
27
  Requires-Dist: click (>=8.1.0,<8.2.0)
28
28
  Requires-Dist: colorama (>=0.4.3,<0.5.0)
29
29
  Requires-Dist: gitpython (>=3.1.30,<3.2.0)
30
- Requires-Dist: marshmallow (>=3.8.0,<3.9.0)
30
+ Requires-Dist: marshmallow (>=3.15.0,<3.21.0)
31
31
  Requires-Dist: pathspec (>=0.11.1,<0.12.0)
32
32
  Requires-Dist: pyyaml (>=6.0,<7.0)
33
33
  Requires-Dist: requests (>=2.24,<3.0)
34
- Requires-Dist: texttable (>=1.6.7,<1.7.0)
34
+ Requires-Dist: texttable (>=1.6.7,<1.8.0)
35
35
  Requires-Dist: urllib3 (==1.26.17)
36
36
  Project-URL: Repository, https://github.com/cycodehq-public/cycode-cli
37
37
  Description-Content-Type: text/markdown
@@ -1,4 +1,4 @@
1
- cycode/__init__.py,sha256=MEyDIfYJrqTqL0EiJKlqlSyDFWCnNVr1j_jdEnG9SMo,114
1
+ cycode/__init__.py,sha256=oSipSJwc2JrRu0PagmXE1xAEZ1cNF1MbFlp5yQ42ROU,114
2
2
  cycode/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  cycode/cli/auth/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  cycode/cli/auth/auth_command.py,sha256=WRK09H4MV42LwhPr5nvHv7gl4MtJOlx6T3B5bkrG1Yk,3003
@@ -10,14 +10,14 @@ cycode/cli/commands/configure/configure_command.py,sha256=eJXWFkB2d4ddXaPjcHSojb
10
10
  cycode/cli/commands/ignore/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
11
  cycode/cli/commands/ignore/ignore_command.py,sha256=6Oht0P3rS7nkq0ewIMjA0BCpEIopIDIdoN7QIQwYJ4Q,3873
12
12
  cycode/cli/commands/report/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
- cycode/cli/commands/report/report_command.py,sha256=40CJ_yecG_w9behmtpDTvAWE79FYScAhEROuIyEsW1o,732
13
+ cycode/cli/commands/report/report_command.py,sha256=1g7ZDxCO2jiIewSEm3rAyj7sRagHcp0MUki97o-7MDU,563
14
14
  cycode/cli/commands/report/sbom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
15
15
  cycode/cli/commands/report/sbom/common.py,sha256=EmIw3P4PhVhZFKB9bIGSnWauVgqPh46-fGTuo4muLQ0,3429
16
16
  cycode/cli/commands/report/sbom/handle_errors.py,sha256=A53Hw76y8VzEbhi5wStQpKV8XiMH4VJMd0SbWjUfRPo,1688
17
17
  cycode/cli/commands/report/sbom/sbom_command.py,sha256=-2ctzcv4vxTbpUKjnttp8qSjG2A6BGp4ZI1u5xAFIhc,2368
18
- cycode/cli/commands/report/sbom/sbom_path_command.py,sha256=9yG58f7pZ0e_5yxCEhF-CABLQaxIeqUb5m1RKqExmvY,2745
18
+ cycode/cli/commands/report/sbom/sbom_path_command.py,sha256=gDmsVVVgIDEDcJ1zrUcWDqI7Fzh7i0YlI_HfPxoKLqA,2819
19
19
  cycode/cli/commands/report/sbom/sbom_report_file.py,sha256=fr3HMSr6lppeI3OgYADDWlWD8ij2edN1gmpUOPmeTN0,1533
20
- cycode/cli/commands/report/sbom/sbom_repository_url_command.py,sha256=0P--9h1h5bzVmPtc18upMYZJchVUPYOHWnU8c992upA,2072
20
+ cycode/cli/commands/report/sbom/sbom_repository_url_command.py,sha256=w0SDQIptR63IC_c0H6xcPNujU21gGRIxvmzQwBHTetE,2146
21
21
  cycode/cli/config.py,sha256=JR_-uZdWVV-AaffRqTbDH0V7O4KLGNKn50v3huuPlts,466
22
22
  cycode/cli/config.yaml,sha256=SBs5VNdaY9BVbRlwgnTF_j53GBbjJVwwBj9qx_qvrds,463
23
23
  cycode/cli/consts.py,sha256=plqnlG1PVDPN9p6KqjiNTfkJstlBVyzzs858OSyLsNo,6087
@@ -69,7 +69,7 @@ cycode/cli/utils/task_timer.py,sha256=Wk68CRjtfy1y04aBRECBo-9g5FvnxU7EP9TH9-vpiN
69
69
  cycode/cli/utils/yaml_utils.py,sha256=SFO-Dy2tYekHnBS1DVdpiTS-_DgZpCN4DpD76NGDZLk,934
70
70
  cycode/cyclient/__init__.py,sha256=Gr6lQk8UL8i8cIUZOWgHX2puqazmjinW3lYzXAaMHlU,56
71
71
  cycode/cyclient/auth_client.py,sha256=AnHCUOizyPoSbeApwAN3pm6ng-YJ_AykorriOrdeCr8,1749
72
- cycode/cyclient/client_creator.py,sha256=87-UVw0qSTszd7yf-JDwL0nvL6N50J239QkcVXGKVm8,1107
72
+ cycode/cyclient/client_creator.py,sha256=BhMprmCLFX7h4Kfnp4Iv9FXr-nXMWBntC3I3RcsfdYY,1072
73
73
  cycode/cyclient/config.py,sha256=OIgBa8hrmXSABa2ldsFxmokCMysLXJLzMAXK8KICuh4,2891
74
74
  cycode/cyclient/config.yaml,sha256=DRcMddItspavKuCGMLyiWCMSCVpUO4IoyEyMkOX2gtw,126
75
75
  cycode/cyclient/config_dev.py,sha256=GJ3w8Q-ow5SvXGBFA34eaeoI6GhitavAGy3UfcUh9OU,120
@@ -78,10 +78,10 @@ cycode/cyclient/cycode_client_base.py,sha256=ZepRsI7rgyBbTSYhTDaNkO3jTG11y_c6nqu
78
78
  cycode/cyclient/cycode_dev_based_client.py,sha256=z1K1hvrOfYZijDCfcevSnmWcWobfAu2DLKlhacoaZfY,640
79
79
  cycode/cyclient/cycode_token_based_client.py,sha256=fZLchQl0GkQ-LpiaRl8BywJ_kJb-2RRNljG5uQCDtHk,1848
80
80
  cycode/cyclient/models.py,sha256=HkyLU5zyS5WqrFzRDco9cp9guU-oZG3Q0YzVfdlQVfk,11430
81
- cycode/cyclient/report_client.py,sha256=7TjyxxLzIxMPa805TzHUPSDd-oB78xrKXT-YwfqSRFw,4064
81
+ cycode/cyclient/report_client.py,sha256=sNLOm64oaONz-TUBs6fpFfbb7RfxALPS6YBqadMo2-8,3971
82
82
  cycode/cyclient/scan_client.py,sha256=shvrueyolohDBzo_3E6XA7ykokZm6meU4z621TSkBng,6491
83
83
  cycode/cyclient/scan_config_base.py,sha256=Y5HFIh9FxxbffMGfeot6NWYjEtsA4wUwG9L2wnrOKEU,1086
84
- cycode-1.3.1.dev2.dist-info/METADATA,sha256=VzznXC1UtSwOHbbhv01cDEi4oNtenCf6_RXSMen8dg0,37710
85
- cycode-1.3.1.dev2.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
86
- cycode-1.3.1.dev2.dist-info/entry_points.txt,sha256=GKZlS6LtUdABDPd7-o9bwNSI5gYQnyA3qGrFFQKt3Vc,51
87
- cycode-1.3.1.dev2.dist-info/RECORD,,
84
+ cycode-1.3.1.dev4.dist-info/METADATA,sha256=hX_UvAIOZWVB-cUr9EpepphiweDhskB3UB2gRJCqDog,37711
85
+ cycode-1.3.1.dev4.dist-info/WHEEL,sha256=Zb28QaM1gQi8f4VCBhsUklF61CTlNYfs9YAZn-TOGFk,88
86
+ cycode-1.3.1.dev4.dist-info/entry_points.txt,sha256=GKZlS6LtUdABDPd7-o9bwNSI5gYQnyA3qGrFFQKt3Vc,51
87
+ cycode-1.3.1.dev4.dist-info/RECORD,,