assemblyline-v4-service 4.4.1.dev84__py3-none-any.whl → 4.4.1.dev89__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.

@@ -1 +1 @@
1
- 4.4.1.dev84
1
+ 4.4.1.dev89
@@ -208,6 +208,7 @@ class SectionBody:
208
208
  def __init__(self, body_format, body=None):
209
209
  self._format = body_format
210
210
  self._data = body
211
+ self._config = {}
211
212
 
212
213
  @property
213
214
  def format(self):
@@ -222,6 +223,10 @@ class SectionBody:
222
223
  else:
223
224
  return self._data
224
225
 
226
+ @property
227
+ def config(self) -> dict:
228
+ return self._config
229
+
225
230
  def set_body(self, body):
226
231
  self._data = body
227
232
 
@@ -396,6 +401,11 @@ class TableSectionBody(SectionBody):
396
401
 
397
402
  def add_row(self, row: TableRow) -> None:
398
403
  self._data.append(row)
404
+ self.set_column_order(list(row.keys()))
405
+
406
+ def set_column_order(self, order: List[str]):
407
+ self._config = {'column_order': order}
408
+
399
409
 
400
410
 
401
411
  class ImageSectionBody(SectionBody):
@@ -418,7 +428,7 @@ class MultiSectionBody(SectionBody):
418
428
  super().__init__(BODY_FORMAT.MULTI, body=[])
419
429
 
420
430
  def add_section_body(self, section_body: SectionBody) -> None:
421
- self._data.append((section_body.format, section_body._data))
431
+ self._data.append((section_body.format, section_body._data, section_body._config))
422
432
 
423
433
 
424
434
  class DividerSectionBody(SectionBody):
@@ -461,10 +471,12 @@ class ResultSection:
461
471
  self._subsections: List[ResultSection] = []
462
472
  if isinstance(body, SectionBody):
463
473
  self._body_format = body.format
474
+ self._body_config = body.config
464
475
  self._body = body.body
465
476
  else:
466
477
  self._body_format = body_format
467
478
  self._body = body
479
+ self._body_config = {}
468
480
  self.classification: Classification = classification or SERVICE_ATTRIBUTES.default_result_classification
469
481
  self.depth: int = 0
470
482
  self._tags = tags or {}
@@ -497,6 +509,10 @@ class ResultSection:
497
509
  def body_format(self):
498
510
  return self._body_format
499
511
 
512
+ @property
513
+ def body_config(self):
514
+ return self._body_config
515
+
500
516
  @property
501
517
  def heuristic(self):
502
518
  return self._heuristic
@@ -629,6 +645,10 @@ class TypeSpecificResultSection(ResultSection):
629
645
  def body(self):
630
646
  return self.section_body.body
631
647
 
648
+ @property
649
+ def body_config(self):
650
+ return self.section_body.config
651
+
632
652
  def add_line(self, text: Union[str, List]) -> None:
633
653
  raise InvalidFunctionException("Do not use default add_line method in a type specific section.")
634
654
 
@@ -720,6 +740,10 @@ class ResultTableSection(TypeSpecificResultSection):
720
740
 
721
741
  def add_row(self, row: TableRow) -> None:
722
742
  self.section_body.add_row(row)
743
+ self.set_column_order(list(row.keys()))
744
+
745
+ def set_column_order(self, order: List[str]):
746
+ self.section_body.set_column_order(order)
723
747
 
724
748
 
725
749
  class ResultImageSection(TypeSpecificResultSection):
@@ -772,6 +796,7 @@ class Result:
772
796
  body=section.body,
773
797
  classification=section.classification,
774
798
  body_format=section.body_format,
799
+ body_config=section.body_config,
775
800
  depth=section.depth,
776
801
  heuristic=get_heuristic_primitives(section.heuristic),
777
802
  tags=unflatten(section.tags),
@@ -102,6 +102,7 @@ class RunService:
102
102
  min_classification=forge.get_classification().UNRESTRICTED,
103
103
  max_files=501, # TODO: get the actual value
104
104
  ttl=3600
105
+
105
106
  ))
106
107
 
107
108
  LOG.info(f"Starting task with SID: {service_task.sid}")
@@ -32,4 +32,4 @@ def perform_check():
32
32
 
33
33
 
34
34
  if __name__ == '__main__':
35
- perform_check()
35
+ perform_check()
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: assemblyline-v4-service
3
- Version: 4.4.1.dev84
3
+ Version: 4.4.1.dev89
4
4
  Summary: Assemblyline 4 - Service base
5
5
  Home-page: https://github.com/CybercentreCanada/assemblyline-v4-service/
6
6
  Author: CCCS Assemblyline development team
@@ -1,6 +1,6 @@
1
- assemblyline_v4_service/VERSION,sha256=95RDIHSDSFbrM9_bAAa2I5Xpyg2kXbnY-MU_vliuFYY,12
1
+ assemblyline_v4_service/VERSION,sha256=45JdHGa7mWPE1Se_q1hDikzAXS6RhwoRf4n5z9jsP0c,12
2
2
  assemblyline_v4_service/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- assemblyline_v4_service/healthz.py,sha256=3QGBg0EZuXC6UN411HFwpLNEop9UvS9feFhvBUTP-k4,1576
3
+ assemblyline_v4_service/healthz.py,sha256=sS1cFkDLw8hUPMpj7tbHXFv8ZmHcazrwZ0l6oQDwwkQ,1575
4
4
  assemblyline_v4_service/run_privileged_service.py,sha256=9uTfHetXR5G-EDKMDrgfWUOw34yr64-cj6Cm9eZaCbQ,14547
5
5
  assemblyline_v4_service/run_service.py,sha256=RCqxdm-OAwJhl15BnKFkuavpQ5k6eTX3ZGeSna5JJBw,5557
6
6
  assemblyline_v4_service/common/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -12,7 +12,7 @@ assemblyline_v4_service/common/icap.py,sha256=phT3CT5uII3Qm90Nzi4O-eDkQ2jmr3zHcV
12
12
  assemblyline_v4_service/common/keytool_parse.py,sha256=e829hrNNG5LFw1kjLsYVZsafCm2S3NpgM6jBc6JKawY,2219
13
13
  assemblyline_v4_service/common/ontology_helper.py,sha256=uiwc5cfPDAesEDYKk7etzCMTGQNVwhNrO3mWLdB2520,7793
14
14
  assemblyline_v4_service/common/request.py,sha256=p8A9boDZ6KuVxl3EdhvaU1D_5K6_gAVoIbJYDz8TzjA,9711
15
- assemblyline_v4_service/common/result.py,sha256=0_ybxAQ_0W0pYo35Kr2EUgBMujQeGsgHbbbdfiLud88,29651
15
+ assemblyline_v4_service/common/result.py,sha256=9OGfWTCnBtow31Ft03us9Ew_2pXyDydUTP4iio9Qg8Q,30349
16
16
  assemblyline_v4_service/common/safelist_helper.py,sha256=QHTuG8q52o3U307AADPgrIgug7aYFK2uQE4-EtWG3yQ,3037
17
17
  assemblyline_v4_service/common/section_reducer.py,sha256=JJOT7eFfBn4hFJKHY9UeVEbHS-E8FpmQ_dPZC-dWla0,1513
18
18
  assemblyline_v4_service/common/tag_helper.py,sha256=om3TVPY_XDeFDqVW2iUA349xbljSAy5tv667jCiA7JI,4186
@@ -37,7 +37,7 @@ assemblyline_v4_service/common/pestudio/xml/resources.xml,sha256=bYP-AVbq_Dlhgj_
37
37
  assemblyline_v4_service/common/pestudio/xml/signatures.xml,sha256=r5FLFgmWejRdqPdoPQCFTt31Tllc64o81geaN1SbwS4,1255658
38
38
  assemblyline_v4_service/common/pestudio/xml/strings.xml,sha256=kRU8WbCcU1RckM6oCFeUVMdpOxZjJDDTMIIor8k2ru0,102459
39
39
  assemblyline_v4_service/dev/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
40
- assemblyline_v4_service/dev/run_service_once.py,sha256=4gnb09WeKXlyWQKCQdH4SoL4xtfIRWq_9nyIiECrJ7g,10592
40
+ assemblyline_v4_service/dev/run_service_once.py,sha256=D-QpwRox1dy9H6EPoR6nY1o3XiD3JRjC7xrEkPn952I,10593
41
41
  assemblyline_v4_service/testing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
42
42
  assemblyline_v4_service/testing/helper.py,sha256=f0-qBtgR0vWZBpEV9sPfcworLtdh4h_CcoAofHlOtZE,19711
43
43
  assemblyline_v4_service/testing/regenerate_results.py,sha256=Cbp2CMAxbF3kz5vxEPPCxrgUp1Vl3Tz6e46aUhg_I4U,1101
@@ -47,8 +47,8 @@ assemblyline_v4_service/updater/app.py,sha256=Ass5DZtOCr0tdoRbLo7Qn8Ujlw8T8mUDro
47
47
  assemblyline_v4_service/updater/gunicorn_config.py,sha256=p3j2KPBeD5jvMw9O5i7vAtlRgPSVVxIG9AO0DfN82J8,1247
48
48
  assemblyline_v4_service/updater/helper.py,sha256=JD0gX3KHY-wvsFjTbWkT83F0d5Up3OfubMPinuNzbTQ,9069
49
49
  assemblyline_v4_service/updater/updater.py,sha256=AQ3aTm5nhb-RXWjm5w1RIZM3j3UQJ4Vr4bVJ6Z2rX8A,29322
50
- assemblyline_v4_service-4.4.1.dev84.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
51
- assemblyline_v4_service-4.4.1.dev84.dist-info/METADATA,sha256=nmf8AtvsnyGfusB4RSXTH_wBnjG8uDGeIlx4aM_csdo,9359
52
- assemblyline_v4_service-4.4.1.dev84.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
53
- assemblyline_v4_service-4.4.1.dev84.dist-info/top_level.txt,sha256=Ut5IqePObcxlJ8rv2--dOAzYbxzqlllfiV_51cbqjbA,24
54
- assemblyline_v4_service-4.4.1.dev84.dist-info/RECORD,,
50
+ assemblyline_v4_service-4.4.1.dev89.dist-info/LICENCE.md,sha256=NSkYo9EH8h5oOkzg4VhjAHF4339MqPP2cQ8msTPgl-c,1396
51
+ assemblyline_v4_service-4.4.1.dev89.dist-info/METADATA,sha256=QqK15xucWw48M1j0mgoeWJ1e8OojPNSbFbnZEitdXco,9359
52
+ assemblyline_v4_service-4.4.1.dev89.dist-info/WHEEL,sha256=pkctZYzUS4AYVn6dJ-7367OJZivF2e8RA9b_ZBjif18,92
53
+ assemblyline_v4_service-4.4.1.dev89.dist-info/top_level.txt,sha256=Ut5IqePObcxlJ8rv2--dOAzYbxzqlllfiV_51cbqjbA,24
54
+ assemblyline_v4_service-4.4.1.dev89.dist-info/RECORD,,