cycode 1.10.1.dev1__tar.gz → 1.10.2.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.10.1.dev1 → cycode-1.10.2.dev1}/PKG-INFO +1 -1
- cycode-1.10.2.dev1/cycode/__init__.py +1 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/path_utils.py +26 -2
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/pyproject.toml +1 -1
- cycode-1.10.1.dev1/cycode/__init__.py +0 -1
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/README.md +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/auth/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/auth/auth_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/auth/auth_manager.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/configure/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/configure/configure_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/ignore/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/ignore/ignore_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/main_cli.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/report_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/common.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/path/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/path/path_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/repository_url/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/repository_url/repository_url_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/sbom_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/sbom_report_file.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/code_scanner.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/commit_history/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/commit_history/commit_history_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/path/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/path/path_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/pre_commit/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/pre_receive/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/pre_receive/pre_receive_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/repository/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/repository/repository_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/scan_ci/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/scan_ci/ci_integrations.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/scan_ci/scan_ci_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/scan_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/version/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/version/version_command.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/config.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/config.yaml +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/consts.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/exceptions/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/exceptions/custom_exceptions.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/exceptions/handle_scan_errors.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/excluder.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/iac/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/models/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/models/in_memory_zip.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/path_documents.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/repository_documents.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/sca/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/sca/maven/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/sca/maven/base_restore_maven_dependencies.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/sca/maven/restore_gradle_dependencies.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/sca/maven/restore_maven_dependencies.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/sca/sca_code_scanner.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/zip_documents.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/main.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/models.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/console_printer.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/json_printer.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/printer_base.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/tables/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/tables/sca_table_printer.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/tables/table.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/tables/table_models.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/tables/table_printer.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/tables/table_printer_base.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/printers/text_printer.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/user_settings/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/user_settings/base_file_manager.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/user_settings/config_file_manager.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/user_settings/configuration_manager.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/user_settings/credentials_manager.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/user_settings/jwt_creator.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/enum_utils.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/get_api_client.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/git_proxy.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/progress_bar.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/scan_batch.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/scan_utils.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/shell_executor.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/string_utils.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/task_timer.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/utils/yaml_utils.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/__init__.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/auth_client.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/client_creator.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/config.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/config.yaml +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/config_dev.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/cycode_client.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/cycode_client_base.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/cycode_dev_based_client.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/cycode_token_based_client.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/headers.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/models.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/report_client.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/scan_client.py +0 -0
- {cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cyclient/scan_config_base.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '1.10.2.dev1' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
|
@@ -3,7 +3,9 @@ import os
|
|
|
3
3
|
from functools import lru_cache
|
|
4
4
|
from typing import AnyStr, List, Optional
|
|
5
5
|
|
|
6
|
-
from binaryornot.
|
|
6
|
+
from binaryornot.helpers import is_binary_string
|
|
7
|
+
|
|
8
|
+
from cycode.cyclient import logger
|
|
7
9
|
|
|
8
10
|
|
|
9
11
|
@lru_cache(maxsize=None)
|
|
@@ -22,8 +24,28 @@ def get_absolute_path(path: str) -> str:
|
|
|
22
24
|
return os.path.abspath(path)
|
|
23
25
|
|
|
24
26
|
|
|
27
|
+
def _get_starting_chunk(filename: str, length: int = 1024) -> Optional[bytes]:
|
|
28
|
+
# We are using our own implementation of get_starting_chunk
|
|
29
|
+
# because the original one from binaryornot uses print()...
|
|
30
|
+
|
|
31
|
+
try:
|
|
32
|
+
with open(filename, 'rb') as f:
|
|
33
|
+
return f.read(length)
|
|
34
|
+
except IOError as e:
|
|
35
|
+
logger.debug('Failed to read the starting chunk from file: %s', filename, exc_info=e)
|
|
36
|
+
|
|
37
|
+
return None
|
|
38
|
+
|
|
39
|
+
|
|
25
40
|
def is_binary_file(filename: str) -> bool:
|
|
26
|
-
|
|
41
|
+
# Check if the file extension is in a list of known binary types
|
|
42
|
+
binary_extensions = ('.pyc',)
|
|
43
|
+
if filename.endswith(binary_extensions):
|
|
44
|
+
return True
|
|
45
|
+
|
|
46
|
+
# Check if the starting chunk is a binary string
|
|
47
|
+
chunk = _get_starting_chunk(filename)
|
|
48
|
+
return is_binary_string(chunk)
|
|
27
49
|
|
|
28
50
|
|
|
29
51
|
def get_file_size(filename: str) -> int:
|
|
@@ -56,6 +78,8 @@ def get_file_content(file_path: str) -> Optional[AnyStr]:
|
|
|
56
78
|
return f.read()
|
|
57
79
|
except (FileNotFoundError, UnicodeDecodeError):
|
|
58
80
|
return None
|
|
81
|
+
except PermissionError:
|
|
82
|
+
logger.warn('Permission denied to read the file: %s', file_path)
|
|
59
83
|
|
|
60
84
|
|
|
61
85
|
def load_json(txt: str) -> Optional[dict]:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[tool.poetry]
|
|
2
2
|
name = "cycode"
|
|
3
|
-
version = "1.10.
|
|
3
|
+
version = "1.10.2.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.10.1.dev1' # 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
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/configure/configure_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
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/path/path_command.py
RENAMED
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/repository_url/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/report/sbom/sbom_report_file.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/commit_history/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/pre_commit/pre_commit_command.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/repository/repository_command.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/scan_ci/ci_integrations.py
RENAMED
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/commands/scan/scan_ci/scan_ci_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
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/exceptions/handle_report_sbom_errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/iac/tf_content_generator.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/models/in_memory_zip.py
RENAMED
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/repository_documents.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{cycode-1.10.1.dev1 → cycode-1.10.2.dev1}/cycode/cli/files_collector/sca/sca_code_scanner.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
|