assemblyline-v4-service 4.5.0.38__py3-none-any.whl → 4.5.0.40__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.
Potentially problematic release.
This version of assemblyline-v4-service might be problematic. Click here for more details.
- assemblyline_v4_service/VERSION +1 -1
- assemblyline_v4_service/common/task.py +10 -2
- assemblyline_v4_service/dev/run_service_once.py +2 -2
- {assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/METADATA +1 -1
- {assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/RECORD +8 -8
- {assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/LICENCE.md +0 -0
- {assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/WHEEL +0 -0
- {assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/top_level.txt +0 -0
assemblyline_v4_service/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.5.0.
|
|
1
|
+
4.5.0.40
|
|
@@ -9,6 +9,7 @@ from assemblyline_v4_service.common.helper import get_service_manifest
|
|
|
9
9
|
from assemblyline_v4_service.common.result import Result
|
|
10
10
|
|
|
11
11
|
from assemblyline.common import forge
|
|
12
|
+
from assemblyline.common.constants import MAX_INT
|
|
12
13
|
from assemblyline.common import log as al_log
|
|
13
14
|
from assemblyline.common.classification import Classification
|
|
14
15
|
from assemblyline.common.digests import get_digests_for_file, get_sha256_for_file
|
|
@@ -96,10 +97,17 @@ class Task:
|
|
|
96
97
|
self.log.info(f"Adding empty extracted or supplementary files is not allowed. "
|
|
97
98
|
f"Empty file ({name}) was ignored.")
|
|
98
99
|
return
|
|
100
|
+
elif os.path.getsize(path) > MAX_INT:
|
|
101
|
+
self.log.error(f"Adding file of size {os.path.getsize(path)} is impossible due to ElasticSearch "
|
|
102
|
+
f"limitations. File ({name}) was ignored.")
|
|
103
|
+
return
|
|
99
104
|
|
|
100
105
|
if parent_relation not in PARENT_RELATION.keys():
|
|
101
106
|
raise ValueError(
|
|
102
|
-
|
|
107
|
+
(
|
|
108
|
+
f"An invalid 'parent_relation' was provided: '{parent_relation}'. "
|
|
109
|
+
f"Possible values are: '{PARENT_RELATION.keys()}'"
|
|
110
|
+
)
|
|
103
111
|
)
|
|
104
112
|
|
|
105
113
|
# If file classification not provided, then use the default result classification
|
|
@@ -129,7 +137,7 @@ class Task:
|
|
|
129
137
|
# Allows the administrator to be selective about the types of hashes to lookup in the safelist
|
|
130
138
|
if safelist_interface and self.safelist_config.enabled and not (self.deep_scan or self.ignore_filtering):
|
|
131
139
|
# Ignore adding files that are known to the system to be safe
|
|
132
|
-
digests = get_digests_for_file(path, skip_fuzzy_hashes=True)
|
|
140
|
+
digests = get_digests_for_file(path, calculate_entropy=False, skip_fuzzy_hashes=True)
|
|
133
141
|
for hash_type in self.safelist_config.hash_types:
|
|
134
142
|
qhash = digests[hash_type]
|
|
135
143
|
resp = safelist_interface.lookup_safelist(qhash)
|
|
@@ -55,7 +55,7 @@ class RunService:
|
|
|
55
55
|
self.service.start_service()
|
|
56
56
|
|
|
57
57
|
# Identify the file
|
|
58
|
-
file_info = self.identify.fileinfo(FILE_PATH, skip_fuzzy_hashes=True)
|
|
58
|
+
file_info = self.identify.fileinfo(FILE_PATH, skip_fuzzy_hashes=True, calculate_entropy=False)
|
|
59
59
|
if file_info['type'] == "archive/cart" or file_info['magic'] == "custom: archive/cart":
|
|
60
60
|
original_file_name = get_metadata_only(FILE_PATH).get("name")
|
|
61
61
|
if original_file_name:
|
|
@@ -66,7 +66,7 @@ class RunService:
|
|
|
66
66
|
with open(FILE_PATH, 'rb') as ifile, open(original_temp, 'wb') as ofile:
|
|
67
67
|
unpack_stream(ifile, ofile)
|
|
68
68
|
|
|
69
|
-
file_info = self.identify.fileinfo(original_temp, skip_fuzzy_hashes=True)
|
|
69
|
+
file_info = self.identify.fileinfo(original_temp, skip_fuzzy_hashes=True, calculate_entropy=False)
|
|
70
70
|
target_file = os.path.join(tempfile.gettempdir(), file_info['sha256'])
|
|
71
71
|
shutil.move(original_temp, target_file)
|
|
72
72
|
LOG.info(f"File was a CaRT archive, it was un-CaRTed to {target_file} for processing")
|
{assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/RECORD
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
assemblyline_v4_service/VERSION,sha256
|
|
1
|
+
assemblyline_v4_service/VERSION,sha256=-1_3Fi58ZR3Fw0X_9VmkeUGAcGH66vGoauBp2hK5EBU,9
|
|
2
2
|
assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
3
|
assemblyline_v4_service/healthz.py,sha256=3QGBg0EZuXC6UN411HFwpLNEop9UvS9feFhvBUTP-k4,1576
|
|
4
4
|
assemblyline_v4_service/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -12,10 +12,10 @@ assemblyline_v4_service/common/ocr.py,sha256=3fV0PyY3oui_ucAM9dkolP0VRYKACKJuGY4
|
|
|
12
12
|
assemblyline_v4_service/common/ontology_helper.py,sha256=4YW_iqwX3PFMc9efknxzBHNxep64tEaVASYS8WFZTHw,7924
|
|
13
13
|
assemblyline_v4_service/common/request.py,sha256=ZP80rDWIyVotwVDN70L7ujN9RoxZRdmaeUN0DFIvrT4,11732
|
|
14
14
|
assemblyline_v4_service/common/result.py,sha256=9AqM6qCYiia_Bpyn_fBFhzNQMcqJbtFSiGjp57fXW2E,32713
|
|
15
|
-
assemblyline_v4_service/common/task.py,sha256=
|
|
15
|
+
assemblyline_v4_service/common/task.py,sha256=CJ5Mw1Lre09HGf9rbWfKxQdxmRS_mImnHLlE1oQk5dM,14089
|
|
16
16
|
assemblyline_v4_service/common/utils.py,sha256=k2__d-V5LjB6o2IKbjVe7tJWKcKuUHto5TyT5oKhIa0,3890
|
|
17
17
|
assemblyline_v4_service/dev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
18
|
-
assemblyline_v4_service/dev/run_service_once.py,sha256=
|
|
18
|
+
assemblyline_v4_service/dev/run_service_once.py,sha256=cGwsNGWNp5KcZ4iVqMf76uGHR21faYhpEkEclMwEdcI,10505
|
|
19
19
|
assemblyline_v4_service/updater/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
20
20
|
assemblyline_v4_service/updater/__main__.py,sha256=9Os-u8Tf7MD73JSrUSPmOaErTgfvesNLiEeszU4ujXA,133
|
|
21
21
|
assemblyline_v4_service/updater/app.py,sha256=Mtmx4bkXfP4nFqqa5q15jW8QIXr4JK84lCovxAVyvPs,3317
|
|
@@ -38,8 +38,8 @@ test/test_common/test_request.py,sha256=zoBURe3QbycWK4I7uvkixcmykrOCqY_TchmxJinN
|
|
|
38
38
|
test/test_common/test_result.py,sha256=6BiOKxEPrKBjOY44jv3TY-yiXm0qI1ok_CZBnjP9TM4,45447
|
|
39
39
|
test/test_common/test_task.py,sha256=LzEIfFHJEcB_YPucOZGtm1TwyHnqJE-0Qc2MDsH4TN4,18957
|
|
40
40
|
test/test_common/test_utils.py,sha256=TbnBxqpS_ZC5ptXR9XJX3xtbItD0mTbtiBxxdyP8J5k,5904
|
|
41
|
-
assemblyline_v4_service-4.5.0.
|
|
42
|
-
assemblyline_v4_service-4.5.0.
|
|
43
|
-
assemblyline_v4_service-4.5.0.
|
|
44
|
-
assemblyline_v4_service-4.5.0.
|
|
45
|
-
assemblyline_v4_service-4.5.0.
|
|
41
|
+
assemblyline_v4_service-4.5.0.40.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
42
|
+
assemblyline_v4_service-4.5.0.40.dist-info/METADATA,sha256=Ikhgydt_hILziuubhBGHJjx0dop7UXMjvvanUAKGveE,9495
|
|
43
|
+
assemblyline_v4_service-4.5.0.40.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
|
|
44
|
+
assemblyline_v4_service-4.5.0.40.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
|
|
45
|
+
assemblyline_v4_service-4.5.0.40.dist-info/RECORD,,
|
{assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/LICENCE.md
RENAMED
|
File without changes
|
{assemblyline_v4_service-4.5.0.38.dist-info → assemblyline_v4_service-4.5.0.40.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|