cycode 1.9.3.dev2__tar.gz → 1.9.4.dev1__tar.gz
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-1.9.3.dev2 → cycode-1.9.4.dev1}/PKG-INFO +1 -1
- cycode-1.9.4.dev1/cycode/__init__.py +1 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/consts.py +1 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/models/in_memory_zip.py +11 -1
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/zip_documents.py +6 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/user_settings/configuration_manager.py +7 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/pyproject.toml +1 -1
- cycode-1.9.3.dev2/cycode/__init__.py +0 -1
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/README.md +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/auth/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/auth/auth_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/auth/auth_manager.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/configure/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/configure/configure_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/ignore/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/ignore/ignore_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/main_cli.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/report_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/common.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/path/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/path/path_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/repository_url/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/sbom_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/sbom_report_file.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/code_scanner.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/commit_history/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/commit_history/commit_history_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/path/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/path/path_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/pre_commit/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/pre_receive/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/repository/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/repository/repository_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/scan_ci/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/scan_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/version/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/version/version_command.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/config.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/config.yaml +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/excluder.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/sca/maven/base_restore_maven_dependencies.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/sca/sca_code_scanner.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/main.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/models.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/__init__.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/auth_client.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/client_creator.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/config.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/config.yaml +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/config_dev.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/models.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/report_client.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/scan_client.py +0 -0
- {cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cyclient/scan_config_base.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.9.4.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -116,6 +116,7 @@ TIMEOUT_ENV_VAR_NAME = 'TIMEOUT'
|
|
|
116
116
|
CYCODE_CLI_REQUEST_TIMEOUT_ENV_VAR_NAME = 'CYCODE_CLI_REQUEST_TIMEOUT'
|
|
117
117
|
LOGGING_LEVEL_ENV_VAR_NAME = 'LOGGING_LEVEL'
|
|
118
118
|
VERBOSE_ENV_VAR_NAME = 'CYCODE_CLI_VERBOSE'
|
|
119
|
+
DEBUG_ENV_VAR_NAME = 'CYCODE_CLI_DEBUG'
|
|
119
120
|
|
|
120
121
|
CYCODE_CONFIGURATION_DIRECTORY: str = '.cycode'
|
|
121
122
|
|
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
from io import BytesIO
|
|
2
2
|
from sys import getsizeof
|
|
3
|
-
from typing import Optional
|
|
3
|
+
from typing import TYPE_CHECKING, Optional
|
|
4
4
|
from zipfile import ZIP_DEFLATED, ZipFile
|
|
5
5
|
|
|
6
|
+
from cycode.cli.user_settings.configuration_manager import ConfigurationManager
|
|
6
7
|
from cycode.cli.utils.path_utils import concat_unique_id
|
|
7
8
|
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
from pathlib import Path
|
|
11
|
+
|
|
8
12
|
|
|
9
13
|
class InMemoryZip(object):
|
|
10
14
|
def __init__(self) -> None:
|
|
15
|
+
self.configuration_manager = ConfigurationManager()
|
|
16
|
+
|
|
11
17
|
# Create the in-memory file-like object
|
|
12
18
|
self.in_memory_zip = BytesIO()
|
|
13
19
|
self.zip = ZipFile(self.in_memory_zip, 'a', ZIP_DEFLATED, False)
|
|
@@ -27,6 +33,10 @@ class InMemoryZip(object):
|
|
|
27
33
|
self.in_memory_zip.seek(0)
|
|
28
34
|
return self.in_memory_zip.read()
|
|
29
35
|
|
|
36
|
+
def write_on_disk(self, path: 'Path') -> None:
|
|
37
|
+
with open(path, 'wb') as f:
|
|
38
|
+
f.write(self.read())
|
|
39
|
+
|
|
30
40
|
@property
|
|
31
41
|
def size(self) -> int:
|
|
32
42
|
return getsizeof(self.in_memory_zip)
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import time
|
|
2
|
+
from pathlib import Path
|
|
2
3
|
from typing import List, Optional
|
|
3
4
|
|
|
4
5
|
from cycode.cli import consts
|
|
@@ -37,4 +38,9 @@ def zip_documents(scan_type: str, documents: List[Document], zip_file: Optional[
|
|
|
37
38
|
zip_creation_time = int(end_zip_creation_time - start_zip_creation_time)
|
|
38
39
|
logger.debug('finished to create zip file, %s', {'zip_creation_time': zip_creation_time})
|
|
39
40
|
|
|
41
|
+
if zip_file.configuration_manager.get_debug_flag():
|
|
42
|
+
zip_file_path = Path.joinpath(Path.cwd(), f'{scan_type}_scan_{end_zip_creation_time}.zip')
|
|
43
|
+
logger.debug('writing zip file to disk, %s', {'zip_file_path': zip_file_path})
|
|
44
|
+
zip_file.write_on_disk(zip_file_path)
|
|
45
|
+
|
|
40
46
|
return zip_file
|
|
@@ -46,6 +46,13 @@ class ConfigurationManager:
|
|
|
46
46
|
|
|
47
47
|
return consts.DEFAULT_CYCODE_APP_URL
|
|
48
48
|
|
|
49
|
+
def get_debug_flag_from_environment_variables(self) -> bool:
|
|
50
|
+
value = self._get_value_from_environment_variables(consts.DEBUG_ENV_VAR_NAME, '')
|
|
51
|
+
return value.lower() in {'true', '1'}
|
|
52
|
+
|
|
53
|
+
def get_debug_flag(self) -> bool:
|
|
54
|
+
return self.get_debug_flag_from_environment_variables()
|
|
55
|
+
|
|
49
56
|
def get_verbose_flag(self) -> bool:
|
|
50
57
|
verbose_flag_env_var = self.get_verbose_flag_from_environment_variables()
|
|
51
58
|
verbose_flag_local_config = self.local_config_file_manager.get_verbose_flag()
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cycode"
|
|
3
|
-
version = "1.9.
|
|
3
|
+
version = "1.9.4.dev1" # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
4
4
|
description = "Boost security in your dev lifecycle via SAST, SCA, Secrets & IaC scanning."
|
|
5
5
|
keywords=["secret-scan", "cycode", "devops", "token", "secret", "security", "cycode", "code"]
|
|
6
6
|
authors = ["Cycode <support@cycode.com>"]
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = '1.9.3.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/path/path_command.py
RENAMED
|
File without changes
|
{cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/report/sbom/repository_url/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/commands/scan/repository/repository_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.9.3.dev2 → cycode-1.9.4.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|