cycode 3.15.3.dev6__py3-none-any.whl → 3.15.3.dev8__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.15.3.dev6' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
1
+ __version__ = '3.15.3.dev8' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
@@ -1,3 +1,4 @@
1
+ import json
1
2
  from os import path
2
3
  from pathlib import Path
3
4
  from typing import Optional
@@ -20,6 +21,16 @@ MAVEN_CYCLONE_DEP_TREE_FILE_NAME = 'bom.json'
20
21
  MAVEN_DEP_TREE_FILE_NAME = 'bcde.mvndeps'
21
22
 
22
23
 
24
+ def _has_dependency_graph(bom_content: Optional[str]) -> bool:
25
+ try:
26
+ if not bom_content:
27
+ return False
28
+ bom = json.loads(bom_content)
29
+ return any(dep.get('dependsOn') for dep in bom.get('dependencies', []))
30
+ except Exception:
31
+ return False
32
+
33
+
23
34
  class RestoreMavenDependencies(BaseRestoreDependencies):
24
35
  def __init__(self, ctx: typer.Context, is_git_diff: bool, command_timeout: int) -> None:
25
36
  super().__init__(ctx, is_git_diff, command_timeout)
@@ -46,8 +57,16 @@ class RestoreMavenDependencies(BaseRestoreDependencies):
46
57
  if document.content is None:
47
58
  return self.restore_from_secondary_command(document, manifest_file_path)
48
59
 
49
- # super() reads the content and cleans up any generated file; no re-read needed
50
- return super().try_restore_dependencies(document)
60
+ restore_dependencies_document = super().try_restore_dependencies(document)
61
+ if restore_dependencies_document is None:
62
+ return None
63
+
64
+ if not _has_dependency_graph(restore_dependencies_document.content):
65
+ fallback = self.restore_from_secondary_command(document, manifest_file_path)
66
+ if fallback is not None and fallback.content is not None:
67
+ return fallback
68
+
69
+ return restore_dependencies_document
51
70
 
52
71
  def restore_from_secondary_command(self, document: Document, manifest_file_path: str) -> Optional[Document]:
53
72
  restore_content = execute_commands(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cycode
3
- Version: 3.15.3.dev6
3
+ Version: 3.15.3.dev8
4
4
  Summary: Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning.
5
5
  License-Expression: MIT
6
6
  License-File: LICENCE
@@ -62,6 +62,7 @@ This guide walks you through both installation and usage.
62
62
  2. [Available Options](#available-options)
63
63
  3. [MCP Tools](#mcp-tools)
64
64
  4. [Usage Examples](#usage-examples)
65
+ 5. [Advanced Configuration](#advanced-configuration)
65
66
  5. [Platform Command](#platform-command-beta)
66
67
  1. [Discovering Commands](#discovering-commands)
67
68
  2. [Examples](#platform-examples)
@@ -600,6 +601,38 @@ cycode mcp -t streamable-http -H 127.0.0.2 -p 9000 &
600
601
  }
601
602
  ```
602
603
 
604
+ ### Advanced Configuration
605
+ ##### Custom Certificates and Timeouts (Proxy Environments)
606
+
607
+ If your organization uses a corporate proxy or a custom CA bundle for HTTPS inspection, you need to tell Cycode CLI (and the underlying Python TLS stack) where to find the trusted certificate bundle. You can also increase the MCP tool call timeout if scans are being cut short.
608
+
609
+ | Environment Variable | Description |
610
+ |----------------------|-------------|
611
+ | `REQUESTS_CA_BUNDLE` | Path to a custom CA bundle file (`.pem` or `.crt`). Used by the `requests` library for all HTTPS calls made by Cycode CLI. |
612
+ | `SSL_CERT_FILE` | Path to a custom CA bundle file. Used by Python's low-level `ssl` module. Set this alongside `REQUESTS_CA_BUNDLE` for full coverage. |
613
+ | `MCP_TOOL_TIMEOUT` | Timeout (in seconds) that MCP clients such as Claude and GitHub Copilot wait for a tool call to complete. Increase this if long-running scans are being cut off before they finish. |
614
+
615
+ > [!TIP]
616
+ > Set both `REQUESTS_CA_BUNDLE` and `SSL_CERT_FILE` to the same CA bundle path. `REQUESTS_CA_BUNDLE` covers the HTTP layer; `SSL_CERT_FILE` covers the lower-level TLS layer. Using only one may still cause certificate errors in some environments.
617
+
618
+ Example `mcp.json` configuration with custom certificates and a longer timeout:
619
+
620
+ ```json
621
+ {
622
+ "mcpServers": {
623
+ "cycode": {
624
+ "command": "cycode",
625
+ "args": ["mcp"],
626
+ "env": {
627
+ "REQUESTS_CA_BUNDLE": "/path/to/your/corporate-ca-bundle.pem",
628
+ "SSL_CERT_FILE": "/path/to/your/corporate-ca-bundle.pem",
629
+ "MCP_TOOL_TIMEOUT": "1800"
630
+ }
631
+ }
632
+ }
633
+ }
634
+ ```
635
+
603
636
  > [!NOTE]
604
637
  > The MCP server requires proper Cycode CLI authentication to function. Make sure you have authenticated using `cycode auth` or configured your credentials before starting the MCP server.
605
638
 
@@ -649,6 +682,8 @@ This information can be helpful when:
649
682
  - Identifying authentication problems
650
683
  - Debugging transport-specific issues
651
684
 
685
+ ### MCP Configuration
686
+
652
687
 
653
688
  # Platform Command \[BETA\]
654
689
 
@@ -1,4 +1,4 @@
1
- cycode/__init__.py,sha256=lyWKTzLFkmm2U87BiE9HnQbyHQoh6OleEoXGMQwD9-A,115
1
+ cycode/__init__.py,sha256=S0MXR32Gh81GzG2SydtJYW2spFlLLfAgOvuvHh2WXMA,115
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=7ReEcVkRX9IaQ2I7jAj7Sl9smbtvxiuK8-9bitMEQik,7491
@@ -115,7 +115,7 @@ cycode/cli/files_collector/sca/go/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeR
115
115
  cycode/cli/files_collector/sca/go/restore_go_dependencies.py,sha256=LXUjslfdHO3umz36WtQyRpKa_fVaRgEjewVkZ0QvnYU,1899
116
116
  cycode/cli/files_collector/sca/maven/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
117
117
  cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py,sha256=hwsdJby0_7i3s6YmCU-tB6B3TfsfbyQyeTVwEy6c6SA,2699
118
- cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py,sha256=n1DI0LLFWyC9YwqJXtQmoeanF8ULi-OAVBako1jd2TE,3377
118
+ cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py,sha256=zObNN8n6yUriNVB3ZdvAkoKXXrMvzU9Lpd5lNhVo_so,4003
119
119
  cycode/cli/files_collector/sca/npm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
120
120
  cycode/cli/files_collector/sca/npm/restore_deno_dependencies.py,sha256=XL0VXEPL0jf6ruZZkCpv99lkU8-MNc09CU1fgGgTbHs,1768
121
121
  cycode/cli/files_collector/sca/npm/restore_npm_dependencies.py,sha256=oUPJa1qwzCg3h1eZeVrU95Fluubo7p5gNlGmjJQem-4,2477
@@ -204,8 +204,8 @@ cycode/cyclient/report_client.py,sha256=Scq30NeJPzgXv0hPLO1U05AdE9i_2iu6cIrSKpEJ
204
204
  cycode/cyclient/scan_client.py,sha256=6TK5FQkfrvV7PHqRnUzEn1PBNd2oPYVamvIixcUfe3c,16755
205
205
  cycode/cyclient/scan_config_base.py,sha256=mXsPZGYCtp85rv5GIige40yQZXuRcEKUW-VQJ0vgFzk,1201
206
206
  cycode/logger.py,sha256=EfZGRK6VC5rE_LAjIcRrHFiQCueylCDXoG6bvGkrIME,2111
207
- cycode-3.15.3.dev6.dist-info/METADATA,sha256=dYKh0aHA_fobhTLjEJ3dl1Cqm-BEVu6wVRcRmNVmPoU,87415
208
- cycode-3.15.3.dev6.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
209
- cycode-3.15.3.dev6.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
210
- cycode-3.15.3.dev6.dist-info/licenses/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
211
- cycode-3.15.3.dev6.dist-info/RECORD,,
207
+ cycode-3.15.3.dev8.dist-info/METADATA,sha256=F223hOYh-Wc0xdC5zIczE-rsKzl3uYEBfQbYPJdHrzQ,89102
208
+ cycode-3.15.3.dev8.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
209
+ cycode-3.15.3.dev8.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
210
+ cycode-3.15.3.dev8.dist-info/licenses/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
211
+ cycode-3.15.3.dev8.dist-info/RECORD,,