cycode 1.9.4.dev2__tar.gz → 1.9.4.dev3__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.4.dev2 → cycode-1.9.4.dev3}/PKG-INFO +1 -1
- cycode-1.9.4.dev3/cycode/__init__.py +1 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/printer_base.py +4 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/config.py +19 -17
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/cycode_client_base.py +5 -21
- cycode-1.9.4.dev3/cycode/cyclient/headers.py +46 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/pyproject.toml +1 -1
- cycode-1.9.4.dev2/cycode/__init__.py +0 -1
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/README.md +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/auth/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/auth/auth_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/auth/auth_manager.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/configure/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/configure/configure_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/ignore/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/ignore/ignore_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/main_cli.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/report_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/common.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/path/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/path/path_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/repository_url/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/sbom_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/sbom_report_file.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/code_scanner.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/commit_history/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/commit_history/commit_history_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/path/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/path/path_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/pre_commit/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/pre_receive/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/repository/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/repository/repository_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/scan_ci/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/scan_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/version/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/version/version_command.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/config.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/config.yaml +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/consts.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/excluder.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/sca/maven/base_restore_maven_dependencies.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/sca/sca_code_scanner.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/main.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/models.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/path_utils.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/__init__.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/auth_client.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/client_creator.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/config.yaml +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/config_dev.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/models.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/report_client.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/scan_client.py +0 -0
- {cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cyclient/scan_config_base.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.9.4.dev3' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -5,6 +5,7 @@ from typing import TYPE_CHECKING, Dict, List, Optional
|
|
|
5
5
|
import click
|
|
6
6
|
|
|
7
7
|
from cycode.cli.models import CliError, CliResult
|
|
8
|
+
from cycode.cyclient.headers import get_correlation_id
|
|
8
9
|
|
|
9
10
|
if TYPE_CHECKING:
|
|
10
11
|
from cycode.cli.models import LocalScanResult
|
|
@@ -46,3 +47,6 @@ class PrinterBase(ABC):
|
|
|
46
47
|
message = f'Error: {traceback_message}'
|
|
47
48
|
|
|
48
49
|
click.secho(message, err=True, fg=self.RED_COLOR_NAME)
|
|
50
|
+
|
|
51
|
+
correlation_message = f'Correlation ID: {get_correlation_id()}'
|
|
52
|
+
click.secho(correlation_message, err=True, fg=self.RED_COLOR_NAME)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
import os
|
|
3
3
|
import sys
|
|
4
|
-
from typing import Optional
|
|
4
|
+
from typing import Optional, Union
|
|
5
5
|
from urllib.parse import urlparse
|
|
6
6
|
|
|
7
7
|
from cycode.cli import consts
|
|
8
8
|
from cycode.cli.user_settings.configuration_manager import ConfigurationManager
|
|
9
|
-
from cycode.cyclient
|
|
9
|
+
from cycode.cyclient import config_dev
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def _set_io_encodings() -> None:
|
|
@@ -37,7 +37,7 @@ logging.getLogger('git.util').setLevel(logging.WARNING)
|
|
|
37
37
|
DEFAULT_CONFIGURATION = {
|
|
38
38
|
consts.TIMEOUT_ENV_VAR_NAME: 300,
|
|
39
39
|
consts.LOGGING_LEVEL_ENV_VAR_NAME: logging.INFO,
|
|
40
|
-
DEV_MODE_ENV_VAR_NAME: '
|
|
40
|
+
config_dev.DEV_MODE_ENV_VAR_NAME: 'false',
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
configuration = dict(DEFAULT_CONFIGURATION, **os.environ)
|
|
@@ -45,12 +45,14 @@ configuration = dict(DEFAULT_CONFIGURATION, **os.environ)
|
|
|
45
45
|
_CREATED_LOGGERS = set()
|
|
46
46
|
|
|
47
47
|
|
|
48
|
-
def
|
|
49
|
-
config_level =
|
|
50
|
-
|
|
48
|
+
def get_logger_level() -> Optional[Union[int, str]]:
|
|
49
|
+
config_level = get_val_as_string(consts.LOGGING_LEVEL_ENV_VAR_NAME)
|
|
50
|
+
return logging.getLevelName(config_level)
|
|
51
|
+
|
|
51
52
|
|
|
53
|
+
def get_logger(logger_name: Optional[str] = None) -> logging.Logger:
|
|
52
54
|
new_logger = logging.getLogger(logger_name)
|
|
53
|
-
new_logger.setLevel(
|
|
55
|
+
new_logger.setLevel(get_logger_level())
|
|
54
56
|
|
|
55
57
|
_CREATED_LOGGERS.add(new_logger)
|
|
56
58
|
|
|
@@ -62,16 +64,16 @@ def set_logging_level(level: int) -> None:
|
|
|
62
64
|
created_logger.setLevel(level)
|
|
63
65
|
|
|
64
66
|
|
|
65
|
-
def
|
|
67
|
+
def get_val_as_string(key: str) -> str:
|
|
66
68
|
return configuration.get(key)
|
|
67
69
|
|
|
68
70
|
|
|
69
|
-
def
|
|
71
|
+
def get_val_as_bool(key: str, default: str = '') -> bool:
|
|
70
72
|
val = configuration.get(key, default)
|
|
71
|
-
return val.lower() in
|
|
73
|
+
return val.lower() in {'true', '1'}
|
|
72
74
|
|
|
73
75
|
|
|
74
|
-
def
|
|
76
|
+
def get_val_as_int(key: str) -> Optional[int]:
|
|
75
77
|
val = configuration.get(key)
|
|
76
78
|
if val:
|
|
77
79
|
return int(val)
|
|
@@ -79,7 +81,7 @@ def _get_val_as_int(key: str) -> Optional[int]:
|
|
|
79
81
|
return None
|
|
80
82
|
|
|
81
83
|
|
|
82
|
-
def
|
|
84
|
+
def is_valid_url(url: str) -> bool:
|
|
83
85
|
try:
|
|
84
86
|
urlparse(url)
|
|
85
87
|
return True
|
|
@@ -92,12 +94,12 @@ logger = get_logger('cycode cli')
|
|
|
92
94
|
configuration_manager = ConfigurationManager()
|
|
93
95
|
|
|
94
96
|
cycode_api_url = configuration_manager.get_cycode_api_url()
|
|
95
|
-
if not
|
|
97
|
+
if not is_valid_url(cycode_api_url):
|
|
96
98
|
cycode_api_url = consts.DEFAULT_CYCODE_API_URL
|
|
97
99
|
|
|
98
|
-
timeout =
|
|
100
|
+
timeout = get_val_as_int(consts.CYCODE_CLI_REQUEST_TIMEOUT_ENV_VAR_NAME)
|
|
99
101
|
if not timeout:
|
|
100
|
-
timeout =
|
|
102
|
+
timeout = get_val_as_int(consts.TIMEOUT_ENV_VAR_NAME)
|
|
101
103
|
|
|
102
|
-
dev_mode =
|
|
103
|
-
dev_tenant_id =
|
|
104
|
+
dev_mode = get_val_as_bool(config_dev.DEV_MODE_ENV_VAR_NAME)
|
|
105
|
+
dev_tenant_id = get_val_as_string(config_dev.DEV_TENANT_ID_ENV_VAR_NAME)
|
|
@@ -1,33 +1,17 @@
|
|
|
1
|
-
import platform
|
|
2
1
|
from typing import ClassVar, Dict, Optional
|
|
3
2
|
|
|
4
3
|
from requests import Response, exceptions, request
|
|
5
4
|
|
|
6
|
-
from cycode import __version__
|
|
7
5
|
from cycode.cli.exceptions.custom_exceptions import HttpUnauthorizedError, NetworkError
|
|
8
|
-
from cycode.cli.user_settings.configuration_manager import ConfigurationManager
|
|
9
6
|
from cycode.cyclient import config, logger
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def get_cli_user_agent() -> str:
|
|
13
|
-
"""Return base User-Agent of CLI.
|
|
14
|
-
|
|
15
|
-
Example: CycodeCLI/0.2.3 (OS: Darwin; Arch: arm64; Python: 3.8.16; InstallID: *uuid4*)
|
|
16
|
-
"""
|
|
17
|
-
app_name = 'CycodeCLI'
|
|
18
|
-
version = __version__
|
|
19
|
-
|
|
20
|
-
os = platform.system()
|
|
21
|
-
arch = platform.machine()
|
|
22
|
-
python_version = platform.python_version()
|
|
23
|
-
|
|
24
|
-
install_id = ConfigurationManager().get_or_create_installation_id()
|
|
25
|
-
|
|
26
|
-
return f'{app_name}/{version} (OS: {os}; Arch: {arch}; Python: {python_version}; InstallID: {install_id})'
|
|
7
|
+
from cycode.cyclient.headers import get_cli_user_agent, get_correlation_id
|
|
27
8
|
|
|
28
9
|
|
|
29
10
|
class CycodeClientBase:
|
|
30
|
-
MANDATORY_HEADERS: ClassVar[Dict[str, str]] = {
|
|
11
|
+
MANDATORY_HEADERS: ClassVar[Dict[str, str]] = {
|
|
12
|
+
'User-Agent': get_cli_user_agent(),
|
|
13
|
+
'X-Correlation-Id': get_correlation_id(),
|
|
14
|
+
}
|
|
31
15
|
|
|
32
16
|
def __init__(self, api_url: str) -> None:
|
|
33
17
|
self.timeout = config.timeout
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import platform
|
|
2
|
+
from typing import Optional
|
|
3
|
+
from uuid import uuid4
|
|
4
|
+
|
|
5
|
+
from cycode import __version__
|
|
6
|
+
from cycode.cli.user_settings.configuration_manager import ConfigurationManager
|
|
7
|
+
from cycode.cyclient import logger
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_cli_user_agent() -> str:
|
|
11
|
+
"""Return base User-Agent of CLI.
|
|
12
|
+
|
|
13
|
+
Example: CycodeCLI/0.2.3 (OS: Darwin; Arch: arm64; Python: 3.8.16; InstallID: *uuid4*)
|
|
14
|
+
"""
|
|
15
|
+
app_name = 'CycodeCLI'
|
|
16
|
+
version = __version__
|
|
17
|
+
|
|
18
|
+
os = platform.system()
|
|
19
|
+
arch = platform.machine()
|
|
20
|
+
python_version = platform.python_version()
|
|
21
|
+
|
|
22
|
+
install_id = ConfigurationManager().get_or_create_installation_id()
|
|
23
|
+
|
|
24
|
+
return f'{app_name}/{version} (OS: {os}; Arch: {arch}; Python: {python_version}; InstallID: {install_id})'
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
class _CorrelationId:
|
|
28
|
+
_id: Optional[str] = None
|
|
29
|
+
|
|
30
|
+
def get_correlation_id(self) -> str:
|
|
31
|
+
"""Get correlation ID.
|
|
32
|
+
|
|
33
|
+
Notes:
|
|
34
|
+
Used across all requests to correlate logs and metrics.
|
|
35
|
+
It doesn't depend on client instances.
|
|
36
|
+
Lifetime is the same as the process.
|
|
37
|
+
"""
|
|
38
|
+
if self._id is None:
|
|
39
|
+
# example: 16fd2706-8baf-433b-82eb-8c7fada847da
|
|
40
|
+
self._id = str(uuid4())
|
|
41
|
+
logger.debug(f'Correlation ID: {self._id}')
|
|
42
|
+
|
|
43
|
+
return self._id
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
get_correlation_id = _CorrelationId().get_correlation_id
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cycode"
|
|
3
|
-
version = "1.9.4.
|
|
3
|
+
version = "1.9.4.dev3" # 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.4.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.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/report/sbom/path/path_command.py
RENAMED
|
File without changes
|
{cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/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.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/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
|
|
File without changes
|
{cycode-1.9.4.dev2 → cycode-1.9.4.dev3}/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
|