cycode 3.17.3.dev1__py3-none-any.whl → 3.17.3.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 +1 -1
- cycode/cli/consts.py +2 -4
- cycode/cli/files_collector/zip_documents.py +1 -5
- cycode/cli/utils/scan_utils.py +1 -6
- cycode/config.py +1 -8
- {cycode-3.17.3.dev1.dist-info → cycode-3.17.3.dev2.dist-info}/METADATA +1 -1
- {cycode-3.17.3.dev1.dist-info → cycode-3.17.3.dev2.dist-info}/RECORD +10 -10
- {cycode-3.17.3.dev1.dist-info → cycode-3.17.3.dev2.dist-info}/WHEEL +0 -0
- {cycode-3.17.3.dev1.dist-info → cycode-3.17.3.dev2.dist-info}/entry_points.txt +0 -0
- {cycode-3.17.3.dev1.dist-info → cycode-3.17.3.dev2.dist-info}/licenses/LICENCE +0 -0
cycode/__init__.py
CHANGED
|
@@ -5,4 +5,4 @@ import time as _time
|
|
|
5
5
|
# end-to-end scan duration from the moment the user actually triggered it.
|
|
6
6
|
_BOOT_WALL: float = _time.time()
|
|
7
7
|
|
|
8
|
-
__version__ = '3.17.3.
|
|
8
|
+
__version__ = '3.17.3.dev2' # DON'T TOUCH. Placeholder. Will be filled automatically on poetry build from Git Tag
|
cycode/cli/consts.py
CHANGED
|
@@ -222,15 +222,13 @@ EXCLUSIONS_BY_CVE_SECTION_NAME = 'cves'
|
|
|
222
222
|
FILE_MAX_SIZE_LIMIT_IN_BYTES = 5000000
|
|
223
223
|
|
|
224
224
|
PRESIGNED_LINK_UPLOADED_ZIP_MAX_SIZE_LIMIT_IN_BYTES = 5 * 1024 * 1024 * 1024 # 5 GB (S3 presigned POST limit)
|
|
225
|
-
PRESIGNED_UPLOAD_SCAN_TYPES = {SAST_SCAN_TYPE}
|
|
226
|
-
# Secret scans use the previous (batched / API-upload) flow by default. The presigned S3 async flow is
|
|
227
|
-
# opt-in via the SECRET_SCAN_ASYNC_ENV_VAR_NAME env var; see should_use_presigned_upload.
|
|
228
|
-
SECRET_SCAN_ASYNC_ENV_VAR_NAME = 'CYCODE_SECRET_SCAN_ASYNC'
|
|
225
|
+
PRESIGNED_UPLOAD_SCAN_TYPES = {SAST_SCAN_TYPE, SECRET_SCAN_TYPE}
|
|
229
226
|
|
|
230
227
|
DEFAULT_ZIP_MAX_SIZE_LIMIT_IN_BYTES = 20 * 1024 * 1024
|
|
231
228
|
ZIP_MAX_SIZE_LIMIT_IN_BYTES = {
|
|
232
229
|
SCA_SCAN_TYPE: 200 * 1024 * 1024,
|
|
233
230
|
SAST_SCAN_TYPE: PRESIGNED_LINK_UPLOADED_ZIP_MAX_SIZE_LIMIT_IN_BYTES,
|
|
231
|
+
SECRET_SCAN_TYPE: PRESIGNED_LINK_UPLOADED_ZIP_MAX_SIZE_LIMIT_IN_BYTES,
|
|
234
232
|
}
|
|
235
233
|
|
|
236
234
|
# scan in batches
|
|
@@ -6,17 +6,13 @@ from cycode.cli import consts
|
|
|
6
6
|
from cycode.cli.exceptions import custom_exceptions
|
|
7
7
|
from cycode.cli.files_collector.models.in_memory_zip import InMemoryZip
|
|
8
8
|
from cycode.cli.models import Document
|
|
9
|
-
from cycode.cli.utils.scan_utils import should_use_presigned_upload
|
|
10
9
|
from cycode.logger import get_logger
|
|
11
10
|
|
|
12
11
|
logger = get_logger('ZIP')
|
|
13
12
|
|
|
14
13
|
|
|
15
14
|
def _validate_zip_file_size(scan_type: str, zip_file_size: int) -> None:
|
|
16
|
-
|
|
17
|
-
max_size_limit = consts.PRESIGNED_LINK_UPLOADED_ZIP_MAX_SIZE_LIMIT_IN_BYTES
|
|
18
|
-
else:
|
|
19
|
-
max_size_limit = consts.ZIP_MAX_SIZE_LIMIT_IN_BYTES.get(scan_type, consts.DEFAULT_ZIP_MAX_SIZE_LIMIT_IN_BYTES)
|
|
15
|
+
max_size_limit = consts.ZIP_MAX_SIZE_LIMIT_IN_BYTES.get(scan_type, consts.DEFAULT_ZIP_MAX_SIZE_LIMIT_IN_BYTES)
|
|
20
16
|
if zip_file_size > max_size_limit:
|
|
21
17
|
raise custom_exceptions.ZipTooLargeError(max_size_limit)
|
|
22
18
|
|
cycode/cli/utils/scan_utils.py
CHANGED
|
@@ -7,7 +7,6 @@ import typer
|
|
|
7
7
|
|
|
8
8
|
from cycode.cli import consts
|
|
9
9
|
from cycode.cli.cli_types import SeverityOption
|
|
10
|
-
from cycode.config import parse_bool
|
|
11
10
|
|
|
12
11
|
if TYPE_CHECKING:
|
|
13
12
|
from cycode.cli.models import LocalScanResult
|
|
@@ -34,11 +33,7 @@ def is_cycodeignore_allowed_by_scan_config(ctx: typer.Context) -> bool:
|
|
|
34
33
|
|
|
35
34
|
|
|
36
35
|
def should_use_presigned_upload(scan_type: str) -> bool:
|
|
37
|
-
|
|
38
|
-
return True
|
|
39
|
-
if scan_type == consts.SECRET_SCAN_TYPE:
|
|
40
|
-
return parse_bool(os.getenv(consts.SECRET_SCAN_ASYNC_ENV_VAR_NAME))
|
|
41
|
-
return False
|
|
36
|
+
return scan_type in consts.PRESIGNED_UPLOAD_SCAN_TYPES
|
|
42
37
|
|
|
43
38
|
|
|
44
39
|
def generate_unique_scan_id() -> UUID:
|
cycode/config.py
CHANGED
|
@@ -19,18 +19,11 @@ def get_val_as_string(key: str) -> str:
|
|
|
19
19
|
return configuration.get(key)
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
_TRUTHY_STRING_VALUES = {'true', '1', 'yes', 'y', 'on', 'enabled'}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
def parse_bool(value: Optional[str]) -> bool:
|
|
26
|
-
return value is not None and value.lower() in _TRUTHY_STRING_VALUES
|
|
27
|
-
|
|
28
|
-
|
|
29
22
|
def get_val_as_bool(key: str, default: bool = False) -> bool:
|
|
30
23
|
if key not in configuration:
|
|
31
24
|
return default
|
|
32
25
|
|
|
33
|
-
return
|
|
26
|
+
return configuration[key].lower() in {'true', '1', 'yes', 'y', 'on', 'enabled'}
|
|
34
27
|
|
|
35
28
|
|
|
36
29
|
def get_val_as_int(key: str) -> Optional[int]:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
cycode/__init__.py,sha256=
|
|
1
|
+
cycode/__init__.py,sha256=POZ48ePzQu0rbNSdJykELEPLG1DAjKmca9-alWByHvM,396
|
|
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=AlR2durAEbsa47PDfIj7JtMvJDWA_Dq6wPtVuMJYSCs,10250
|
|
@@ -94,7 +94,7 @@ cycode/cli/apps/status/version_command.py,sha256=c6Iko_rmZo9T_kQSd3HUloBi40Qv7cj
|
|
|
94
94
|
cycode/cli/cli_types.py,sha256=QbFWJLtlsEnHGdqdHbLolJqT57RfhocvsPAhlcNcCRE,3354
|
|
95
95
|
cycode/cli/config.py,sha256=Op-lX_neanJtvPvoOEx4ByBdveh5ygElIga1FdSHhOI,299
|
|
96
96
|
cycode/cli/console.py,sha256=vp-DHwlkwpwdsPyfwGdjsPF-6-Bi3f8W7G-W_YXCMH8,1914
|
|
97
|
-
cycode/cli/consts.py,sha256=
|
|
97
|
+
cycode/cli/consts.py,sha256=LX9YW0JlD4jQSDzui0IA6KONMQ-POBHx7sX8X57XpGE,9780
|
|
98
98
|
cycode/cli/exceptions/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
99
99
|
cycode/cli/exceptions/custom_exceptions.py,sha256=mTPLPI6V5JrEM6IQ8f7An9P207oYWEgJr-l9UpieSWk,4232
|
|
100
100
|
cycode/cli/exceptions/handle_ai_remediation_errors.py,sha256=mA70upSYXK3rL_fmanzKYeUzLENhpXdkW8k3aIHrKzU,785
|
|
@@ -139,7 +139,7 @@ cycode/cli/files_collector/sca/sbt/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQe
|
|
|
139
139
|
cycode/cli/files_collector/sca/sbt/restore_sbt_dependencies.py,sha256=cfBUR4iQcfplX_O2QPjYh2wSyBteze8wZcT_dG9d1d4,709
|
|
140
140
|
cycode/cli/files_collector/sca/sca_file_collector.py,sha256=POvajFssRea-Lax9YG3taAlYvI5by1EbMqso401SQ8M,10099
|
|
141
141
|
cycode/cli/files_collector/walk_ignore.py,sha256=nvOM6oDmT2SxSI4pU-bLlc9LwTgkfTd2egse69ixf3g,2464
|
|
142
|
-
cycode/cli/files_collector/zip_documents.py,sha256=
|
|
142
|
+
cycode/cli/files_collector/zip_documents.py,sha256=FMzbA2Vog7Zl_ntizNQJK8AFqoGu0QlPIMIBpgmBiVI,1852
|
|
143
143
|
cycode/cli/logger.py,sha256=mlaYEQGYd582fTCc3SC3cFMj0PKTB6EsaI12Q4VL1z8,65
|
|
144
144
|
cycode/cli/main.py,sha256=QTPqIZsJsNK_vun8---vP2jP4ljlNJ15xidNrQ-Y0Rc,316
|
|
145
145
|
cycode/cli/models.py,sha256=fuFjEXdH5QUpu4iwo5eMDgfJ9FzVtjTlTJNvBqPaBjE,1850
|
|
@@ -179,14 +179,14 @@ cycode/cli/utils/jwt_utils.py,sha256=EGI-0CKhCGY8hIcZ9b9diq9hqtOUf8Ha8ukeVJIf974
|
|
|
179
179
|
cycode/cli/utils/path_utils.py,sha256=U5te1unzhs9pnU5d9BWExgFWElHQkgKvFxKiOF-lp-w,3245
|
|
180
180
|
cycode/cli/utils/progress_bar.py,sha256=bKBWHHdZsVkdDdWMJLfgLGR0cBYeB44P_DpRM8pvWqU,9528
|
|
181
181
|
cycode/cli/utils/scan_batch.py,sha256=5xKGVDVqoRxdKhuZkK11x4QrNqKmU20Q83E_fy8Nndk,5188
|
|
182
|
-
cycode/cli/utils/scan_utils.py,sha256=
|
|
182
|
+
cycode/cli/utils/scan_utils.py,sha256=sTj7j9dVHcgeMqfYp8sO78ZiWX8LnhpgjCOi1N1gmAM,2248
|
|
183
183
|
cycode/cli/utils/shell_executor.py,sha256=VkzzQPZCmTkFvDjhgJrkv-Icej3U1wLW9LLN6k6OahA,1848
|
|
184
184
|
cycode/cli/utils/string_utils.py,sha256=KyPSAHDRPEGNCCcKTF0v99vad5z9djpVGc8nxpBqdYo,2445
|
|
185
185
|
cycode/cli/utils/task_timer.py,sha256=wxfM2TtJGjc1F17CIja_Qmt6zd4a1qdMwuz0ltgTDAg,2722
|
|
186
186
|
cycode/cli/utils/url_utils.py,sha256=2ZhRCbQsKnvAl5MBugQ5CrwuALP8uivsCI6chlqxahM,2304
|
|
187
187
|
cycode/cli/utils/version_checker.py,sha256=0f5PaTk02ZkDxzBqZOeMV9mU_CWcx6HKW80jUKFOOZs,8239
|
|
188
188
|
cycode/cli/utils/yaml_utils.py,sha256=R-tqzl0C-zoa42rS7nfWeHu3GJ0jpbQUyyqYYU2hleM,1818
|
|
189
|
-
cycode/config.py,sha256=
|
|
189
|
+
cycode/config.py,sha256=jHORGZQcAXkAGSf2XreC-RQoc8sdNWja69QKtPWTbWo,1044
|
|
190
190
|
cycode/cyclient/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
191
191
|
cycode/cyclient/ai_security_manager_client.py,sha256=K3fvBC_d-8iDnVnMSVPXiDtuuapiWGT2xg1Kx203XU0,4808
|
|
192
192
|
cycode/cyclient/ai_security_manager_service_config.py,sha256=83pQzgOb93JW6E-dznJkI4c0NEXmQRlx9YZKMmjVwp8,808
|
|
@@ -209,8 +209,8 @@ cycode/cyclient/report_client.py,sha256=Scq30NeJPzgXv0hPLO1U05AdE9i_2iu6cIrSKpEJ
|
|
|
209
209
|
cycode/cyclient/scan_client.py,sha256=6TK5FQkfrvV7PHqRnUzEn1PBNd2oPYVamvIixcUfe3c,16755
|
|
210
210
|
cycode/cyclient/scan_config_base.py,sha256=mXsPZGYCtp85rv5GIige40yQZXuRcEKUW-VQJ0vgFzk,1201
|
|
211
211
|
cycode/logger.py,sha256=EfZGRK6VC5rE_LAjIcRrHFiQCueylCDXoG6bvGkrIME,2111
|
|
212
|
-
cycode-3.17.3.
|
|
213
|
-
cycode-3.17.3.
|
|
214
|
-
cycode-3.17.3.
|
|
215
|
-
cycode-3.17.3.
|
|
216
|
-
cycode-3.17.3.
|
|
212
|
+
cycode-3.17.3.dev2.dist-info/METADATA,sha256=9HItp9grnt8BhyySCEulAE8AIE_upApZGFy-uRoQbQ8,89246
|
|
213
|
+
cycode-3.17.3.dev2.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
214
|
+
cycode-3.17.3.dev2.dist-info/entry_points.txt,sha256=iDcVJM8ByLElVgvBgtYxDjw1kT7O8Mo0LcWZIT5L3Ig,45
|
|
215
|
+
cycode-3.17.3.dev2.dist-info/licenses/LICENCE,sha256=2Wx4N6mD_4xB7-E3hPkZ3MPhpJy__k_I8MaCSO-PDRo,1068
|
|
216
|
+
cycode-3.17.3.dev2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|