assemblyline-v4-service 4.5.1.dev439__py3-none-any.whl → 4.5.1.dev440__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/updater/client.py +17 -4
- {assemblyline_v4_service-4.5.1.dev439.dist-info → assemblyline_v4_service-4.5.1.dev440.dist-info}/METADATA +1 -1
- {assemblyline_v4_service-4.5.1.dev439.dist-info → assemblyline_v4_service-4.5.1.dev440.dist-info}/RECORD +7 -7
- {assemblyline_v4_service-4.5.1.dev439.dist-info → assemblyline_v4_service-4.5.1.dev440.dist-info}/LICENCE.md +0 -0
- {assemblyline_v4_service-4.5.1.dev439.dist-info → assemblyline_v4_service-4.5.1.dev440.dist-info}/WHEEL +0 -0
- {assemblyline_v4_service-4.5.1.dev439.dist-info → assemblyline_v4_service-4.5.1.dev440.dist-info}/top_level.txt +0 -0
assemblyline_v4_service/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
4.5.1.
|
|
1
|
+
4.5.1.dev440
|
|
@@ -20,8 +20,12 @@ class SyncableBadlistClient(BadlistClient):
|
|
|
20
20
|
self.classification_override = None
|
|
21
21
|
|
|
22
22
|
def add_update_many(self, data: List[Union[dict, BadlistModel]]) -> Dict[str, Any]:
|
|
23
|
-
|
|
23
|
+
response = hashlist_add_update_many(self, self.datastore.badlist, data)
|
|
24
24
|
|
|
25
|
+
# Ensure new data is available to query
|
|
26
|
+
self.datastore.badlist.commit()
|
|
27
|
+
|
|
28
|
+
return response
|
|
25
29
|
|
|
26
30
|
class SyncableSafelistClient(SafelistClient):
|
|
27
31
|
def __init__(self, datastore, config=None):
|
|
@@ -30,7 +34,12 @@ class SyncableSafelistClient(SafelistClient):
|
|
|
30
34
|
self.classification_override = None
|
|
31
35
|
|
|
32
36
|
def add_update_many(self, data: List[Union[dict, SafelistModel]]) -> Dict[str, Any]:
|
|
33
|
-
|
|
37
|
+
response = hashlist_add_update_many(self, self.datastore.safelist, data)
|
|
38
|
+
|
|
39
|
+
# Ensure new data is available to query
|
|
40
|
+
self.datastore.safelist.commit()
|
|
41
|
+
|
|
42
|
+
return response
|
|
34
43
|
|
|
35
44
|
|
|
36
45
|
def hashlist_add_update_many(client: Union[SyncableBadlistClient, SyncableSafelistClient],
|
|
@@ -187,10 +196,11 @@ class SyncableSignatureClient(SignatureClient):
|
|
|
187
196
|
[(self.datastore.signature.UPDATE_SET, 'status', 'DISABLED'),
|
|
188
197
|
(self.datastore.signature.UPDATE_SET, 'last_modified', 'NOW')])
|
|
189
198
|
|
|
199
|
+
response = None
|
|
190
200
|
# Proceed with adding/updating signatures
|
|
191
201
|
if len(data) < SIGNATURE_UPDATE_BATCH:
|
|
192
202
|
# Update all of them in a single batch
|
|
193
|
-
|
|
203
|
+
response = super().add_update_many(source, sig_type, data, dedup_name)
|
|
194
204
|
else:
|
|
195
205
|
response = {
|
|
196
206
|
'success': 0,
|
|
@@ -213,7 +223,10 @@ class SyncableSignatureClient(SignatureClient):
|
|
|
213
223
|
batch_num += 1
|
|
214
224
|
start = batch_num * SIGNATURE_UPDATE_BATCH
|
|
215
225
|
|
|
216
|
-
|
|
226
|
+
# Ensure new data is available to query
|
|
227
|
+
self.datastore.signature.commit()
|
|
228
|
+
|
|
229
|
+
return response
|
|
217
230
|
|
|
218
231
|
|
|
219
232
|
class UpdaterClient(object):
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
assemblyline_v4_service/VERSION,sha256=
|
|
1
|
+
assemblyline_v4_service/VERSION,sha256=H7M57wxLrsdx3Rh9tXOhqnTbXS1BxKdT8XghlednKqc,13
|
|
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
|
|
@@ -19,7 +19,7 @@ assemblyline_v4_service/dev/run_service_once.py,sha256=1sdxkRBI7x9Sht8EVCTMIW3Mg
|
|
|
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
|
|
22
|
-
assemblyline_v4_service/updater/client.py,sha256=
|
|
22
|
+
assemblyline_v4_service/updater/client.py,sha256=tLY84gaGdFBVIDaMgRHIEa7x2S8jBl7lQLzp4seC6aI,11200
|
|
23
23
|
assemblyline_v4_service/updater/gunicorn_config.py,sha256=p3j2KPBeD5jvMw9O5i7vAtlRgPSVVxIG9AO0DfN82J8,1247
|
|
24
24
|
assemblyline_v4_service/updater/helper.py,sha256=Eo8HNyHRZ3OL_b6onWIFj_BykwYj94JgRrT9GQx2Tsg,10076
|
|
25
25
|
assemblyline_v4_service/updater/updater.py,sha256=HqRVUs5nNIfKmHu7g1GUkgC7bvYWs2EC9ZFy1kj-Ltw,31609
|
|
@@ -38,8 +38,8 @@ test/test_common/test_request.py,sha256=Ceyds8BNO1O0f1kH1VEb84faJcaupvSjVKIrGdHe
|
|
|
38
38
|
test/test_common/test_result.py,sha256=6BiOKxEPrKBjOY44jv3TY-yiXm0qI1ok_CZBnjP9TM4,45447
|
|
39
39
|
test/test_common/test_task.py,sha256=P44mNcSe-3tJgDk9ppN3KbM7oN4LBVIuhONG-Gveh74,19007
|
|
40
40
|
test/test_common/test_utils.py,sha256=TbnBxqpS_ZC5ptXR9XJX3xtbItD0mTbtiBxxdyP8J5k,5904
|
|
41
|
-
assemblyline_v4_service-4.5.1.
|
|
42
|
-
assemblyline_v4_service-4.5.1.
|
|
43
|
-
assemblyline_v4_service-4.5.1.
|
|
44
|
-
assemblyline_v4_service-4.5.1.
|
|
45
|
-
assemblyline_v4_service-4.5.1.
|
|
41
|
+
assemblyline_v4_service-4.5.1.dev440.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
|
|
42
|
+
assemblyline_v4_service-4.5.1.dev440.dist-info/METADATA,sha256=7GM_yfY93KURNOaDK5S3B2mo1RGNWVv-DToGolqwPmM,5603
|
|
43
|
+
assemblyline_v4_service-4.5.1.dev440.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
|
|
44
|
+
assemblyline_v4_service-4.5.1.dev440.dist-info/top_level.txt,sha256=LpTOEaVCatkrvbVq3EZseMSIa2PQZU-2rhuO_FTpZgY,29
|
|
45
|
+
assemblyline_v4_service-4.5.1.dev440.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|