cycode 3.2.2.dev1__py3-none-any.whl → 3.2.2.dev2__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__ = '3.2.2.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
1
+ __version__ = '3.2.2.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -88,6 +88,16 @@ def scan_command(
88
88
  rich_help_panel=_SCA_RICH_HELP_PANEL,
89
89
  ),
90
90
  ] = False,
91
+ maven_settings_file: Annotated[
92
+ Optional[Path],
93
+ typer.Option(
94
+ '--maven-settings-file',
95
+ show_default=False,
96
+ help='When specified, Cycode will use this settings.xml file when building the maven dependency tree.',
97
+ dir_okay=False,
98
+ rich_help_panel=_SCA_RICH_HELP_PANEL,
99
+ ),
100
+ ] = None,
91
101
  export_type: Annotated[
92
102
  ExportTypeOption,
93
103
  typer.Option(
@@ -143,6 +153,7 @@ def scan_command(
143
153
  ctx.obj['sync'] = sync
144
154
  ctx.obj['severity_threshold'] = severity_threshold
145
155
  ctx.obj['monitor'] = monitor
156
+ ctx.obj['maven_settings_file'] = maven_settings_file
146
157
  ctx.obj['report'] = report
147
158
 
148
159
  scan_client = get_scan_cycode_client(ctx)
@@ -24,7 +24,12 @@ class RestoreMavenDependencies(BaseRestoreDependencies):
24
24
  return path.basename(document.path).split('/')[-1] == BUILD_MAVEN_FILE_NAME
25
25
 
26
26
  def get_commands(self, manifest_file_path: str) -> list[list[str]]:
27
- return [['mvn', 'org.cyclonedx:cyclonedx-maven-plugin:2.7.4:makeAggregateBom', '-f', manifest_file_path]]
27
+ command = ['mvn', 'org.cyclonedx:cyclonedx-maven-plugin:2.7.4:makeAggregateBom', '-f', manifest_file_path]
28
+
29
+ maven_settings_file = self.ctx.obj.get('maven_settings_file')
30
+ if maven_settings_file:
31
+ command += ['-s', str(maven_settings_file)]
32
+ return [command]
28
33
 
29
34
  def get_lock_file_name(self) -> str:
30
35
  return join_paths('target', MAVEN_CYCLONE_DEP_TREE_FILE_NAME)
@@ -46,7 +51,7 @@ class RestoreMavenDependencies(BaseRestoreDependencies):
46
51
 
47
52
  def restore_from_secondary_command(self, document: Document, manifest_file_path: str) -> Optional[Document]:
48
53
  restore_content = execute_commands(
49
- commands=create_secondary_restore_commands(manifest_file_path),
54
+ commands=self.create_secondary_restore_commands(manifest_file_path),
50
55
  timeout=self.command_timeout,
51
56
  working_directory=self.get_working_directory(document),
52
57
  )
@@ -61,10 +66,8 @@ class RestoreMavenDependencies(BaseRestoreDependencies):
61
66
  absolute_path=restore_file_path,
62
67
  )
63
68
 
64
-
65
- def create_secondary_restore_commands(manifest_file_path: str) -> list[list[str]]:
66
- return [
67
- [
69
+ def create_secondary_restore_commands(self, manifest_file_path: str) -> list[list[str]]:
70
+ command = [
68
71
  'mvn',
69
72
  'dependency:tree',
70
73
  '-B',
@@ -73,4 +76,9 @@ def create_secondary_restore_commands(manifest_file_path: str) -> list[list[str]
73
76
  manifest_file_path,
74
77
  f'-DoutputFile={MAVEN_DEP_TREE_FILE_NAME}',
75
78
  ]
76
- ]
79
+
80
+ maven_settings_file = self.ctx.obj.get('maven_settings_file')
81
+ if maven_settings_file:
82
+ command += ['-s', str(maven_settings_file)]
83
+
84
+ return [command]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cycode
3
- Version: 3.2.2.dev1
3
+ Version: 3.2.2.dev2
4
4
  Summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
5
5
  Home-page: https://github.com/cycodehq/cycode-cli
6
6
  License: MIT
@@ -1,4 +1,4 @@
1
- cycode/__init__.py,sha256=mGxMhWE07_SZneLLsWntqMRC5KvqpIydzl8pr-YBt_Q,114
1
+ cycode/__init__.py,sha256=4MPpi1i5Tw5r9Sac6u3Ee4ElIREFtQwum4ybbk9ojsc,114
2
2
  cycode/__main__.py,sha256=Z3bD5yrA7yPvAChcADQrqCaZd0ChGI1gdiwALwbWJ6U,104
3
3
  cycode/cli/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
4
4
  cycode/cli/app.py,sha256=UC5A5TKIvlxOYKERfJykN8apTT0VyMY5pUjRh_LM-dw,6098
@@ -50,7 +50,7 @@ cycode/cli/apps/scan/repository/repository_command.py,sha256=YwN8kut3PCw7ZYKIwPu
50
50
  cycode/cli/apps/scan/scan_ci/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
51
51
  cycode/cli/apps/scan/scan_ci/ci_integrations.py,sha256=3ZUv1uLsHC13KTNQ4erQKKDXAkmaSm5jow2Utwr4mCw,1634
52
52
  cycode/cli/apps/scan/scan_ci/scan_ci_command.py,sha256=-Eq1FCeO_7Y85oYhBnZurt_wz64WWSA8Zbbm1Y4qLJY,638
53
- cycode/cli/apps/scan/scan_command.py,sha256=moMPafFSbIe_K3IoJtQCRE22U8f5oiM1Sf3HOzFDv6Y,6588
53
+ cycode/cli/apps/scan/scan_command.py,sha256=mpLdd4p-g85LIe-rUxUYpABFOFISplBUooT1ZZW-QPs,7015
54
54
  cycode/cli/apps/scan/scan_parameters.py,sha256=VWucE0PZ2nuSTaNrOpdm8WkX7dkJ7dpp8GkYCA0ub5Y,1484
55
55
  cycode/cli/apps/scan/scan_result.py,sha256=05RFtFgdKDi5_ekzWqRhxlRSu2JduBixm4JkgGhMcW8,8497
56
56
  cycode/cli/apps/status/__init__.py,sha256=uxfkEBafO7Da0mPc1fZhwoO0RTtyXp2a5T3LJTZxubU,371
@@ -84,7 +84,7 @@ cycode/cli/files_collector/sca/go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
84
84
  cycode/cli/files_collector/sca/go/restore_go_dependencies.py,sha256=4gSgeTM5uflu3dnLRxNFoJjGIP1mb9zLINfk2f5zIas,1756
85
85
  cycode/cli/files_collector/sca/maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
86
86
  cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py,sha256=xscXgAQc0gTUGvMMFfAB0vKGxwRd6UFLkAdsA2zxpxA,2663
87
- cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py,sha256=O-0SEx5auT8RJXgNB2A--5TtHgDV-6hk3-nZIFWpEuA,2853
87
+ cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py,sha256=fd3IVHc-E5yoFwAnCV8CGHWh53X9PJtAR2miSXj96-s,3228
88
88
  cycode/cli/files_collector/sca/npm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
89
89
  cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py,sha256=jcubIAgaEKyO83b6qg_Wx8ITYEyx252uyWDrNmRYoi0,1277
90
90
  cycode/cli/files_collector/sca/nuget/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -157,8 +157,8 @@ cycode/cyclient/report_client.py,sha256=h12pz3vWCwDF73BhqFX7iDSxBgQDFwkiGh3hmul2
157
157
  cycode/cyclient/scan_client.py,sha256=nQJyt34Bne8UAQNj9OHSgvoCfI1EJFKNaEeeGPnrKcg,12471
158
158
  cycode/cyclient/scan_config_base.py,sha256=mXsPZGYCtp85rv5GIige40yQZXuRcEKUW-VQJ0vgFzk,1201
159
159
  cycode/logger.py,sha256=xAzpkWLZhixO4egRcYn4HXM9lIfx5wHdpkHxNc5jrX8,2225
160
- cycode-3.2.2.dev1.dist-info/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
161
- cycode-3.2.2.dev1.dist-info/METADATA,sha256=wS1b1wtoOJXN2gOOJaYuJN8S4mzIPwfxIu_wbVP7IYI,69727
162
- cycode-3.2.2.dev1.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
163
- cycode-3.2.2.dev1.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
164
- cycode-3.2.2.dev1.dist-info/RECORD,,
160
+ cycode-3.2.2.dev2.dist-info/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
161
+ cycode-3.2.2.dev2.dist-info/METADATA,sha256=kqrPt4hosc2WaWkL5VonN2UTYDpRfoILx8xlxJl2RE0,69727
162
+ cycode-3.2.2.dev2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
163
+ cycode-3.2.2.dev2.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
164
+ cycode-3.2.2.dev2.dist-info/RECORD,,