From 8b55f8d63f8fb12ba3f11cbb0413878f0d5e5368 Mon Sep 17 00:00:00 2001 From: Joachim Metz Date: Sun, 7 Apr 2024 10:09:33 +0200 Subject: [PATCH] Removed unnecessary override from SQLite storage file --- config/dpkg/control | 2 +- dependencies.ini | 2 +- plaso/dependencies.py | 2 +- requirements.txt | 2 +- tests/serializer/json_serializer.py | 22 +++++++++++++++++++++- 5 files changed, 25 insertions(+), 5 deletions(-) diff --git a/config/dpkg/control b/config/dpkg/control index de8b3144f1..d021ab5d5c 100644 --- a/config/dpkg/control +++ b/config/dpkg/control @@ -17,7 +17,7 @@ Description: Data files for plaso (log2timeline) Package: python3-plaso Architecture: all -Depends: plaso-data (>= ${binary:Version}), libbde-python3 (>= 20220121), libcaes-python3 (>= 20240114), libcreg-python3 (>= 20200725), libesedb-python3 (>= 20220806), libevt-python3 (>= 20191104), libevtx-python3 (>= 20220724), libewf-python3 (>= 20131210), libfcrypto-python3 (>= 20240114), libfsapfs-python3 (>= 20220709), libfsext-python3 (>= 20220829), libfsfat-python3 (>= 20220925), libfshfs-python3 (>= 20220831), libfsntfs-python3 (>= 20211229), libfsxfs-python3 (>= 20220829), libfvde-python3 (>= 20220121), libfwnt-python3 (>= 20210717), libfwsi-python3 (>= 20240225), liblnk-python3 (>= 20230716), libluksde-python3 (>= 20220121), libmodi-python3 (>= 20210405), libmsiecf-python3 (>= 20150314), libolecf-python3 (>= 20151223), libphdi-python3 (>= 20220228), libqcow-python3 (>= 20201213), libregf-python3 (>= 20201002), libscca-python3 (>= 20190605), libsigscan-python3 (>= 20230109), libsmdev-python3 (>= 20140529), libsmraw-python3 (>= 20140612), libvhdi-python3 (>= 20201014), libvmdk-python3 (>= 20140421), libvsapm-python3 (>= 20230506), libvsgpt-python3 (>= 20211115), libvshadow-python3 (>= 20160109), libvslvm-python3 (>= 20160109), python3-acstore (>= 20240406), python3-artifacts (>= 20220219), python3-bencode, python3-certifi (>= 2016.9.26), python3-cffi-backend (>= 1.9.1), python3-chardet (>= 2.0.1), python3-dateutil (>= 1.5), python3-defusedxml (>= 0.5.0), python3-dfdatetime (>= 20240330), python3-dfvfs (>= 20240115), python3-dfwinreg (>= 20240229), python3-dtfabric (>= 20230518), python3-flor (>= 1.1.3), python3-future (>= 0.16.0), python3-idna (>= 2.5), python3-lz4 (>= 0.10.0), python3-opensearch, python3-pefile (>= 2021.5.24), python3-psutil (>= 5.4.3), python3-pyparsing (>= 3.0.0), python3-pytsk3 (>= 20210419), python3-redis (>= 3.4), python3-requests (>= 2.18.0), python3-six (>= 1.1.0), python3-tz, python3-urllib3 (>= 1.21.1), python3-xattr (>= 0.7.2), python3-xlsxwriter (>= 0.9.3), python3-yaml (>= 3.10), python3-yara (>= 3.4.0), python3-zmq (>= 2.1.11), python3-zstd (>= 1.3.0.2), ${misc:Depends} +Depends: plaso-data (>= ${binary:Version}), libbde-python3 (>= 20220121), libcaes-python3 (>= 20240114), libcreg-python3 (>= 20200725), libesedb-python3 (>= 20220806), libevt-python3 (>= 20191104), libevtx-python3 (>= 20220724), libewf-python3 (>= 20131210), libfcrypto-python3 (>= 20240114), libfsapfs-python3 (>= 20220709), libfsext-python3 (>= 20220829), libfsfat-python3 (>= 20220925), libfshfs-python3 (>= 20220831), libfsntfs-python3 (>= 20211229), libfsxfs-python3 (>= 20220829), libfvde-python3 (>= 20220121), libfwnt-python3 (>= 20210717), libfwsi-python3 (>= 20240225), liblnk-python3 (>= 20230716), libluksde-python3 (>= 20220121), libmodi-python3 (>= 20210405), libmsiecf-python3 (>= 20150314), libolecf-python3 (>= 20151223), libphdi-python3 (>= 20220228), libqcow-python3 (>= 20201213), libregf-python3 (>= 20201002), libscca-python3 (>= 20190605), libsigscan-python3 (>= 20230109), libsmdev-python3 (>= 20140529), libsmraw-python3 (>= 20140612), libvhdi-python3 (>= 20201014), libvmdk-python3 (>= 20140421), libvsapm-python3 (>= 20230506), libvsgpt-python3 (>= 20211115), libvshadow-python3 (>= 20160109), libvslvm-python3 (>= 20160109), python3-acstore (>= 20240407), python3-artifacts (>= 20220219), python3-bencode, python3-certifi (>= 2016.9.26), python3-cffi-backend (>= 1.9.1), python3-chardet (>= 2.0.1), python3-dateutil (>= 1.5), python3-defusedxml (>= 0.5.0), python3-dfdatetime (>= 20240330), python3-dfvfs (>= 20240115), python3-dfwinreg (>= 20240229), python3-dtfabric (>= 20230518), python3-flor (>= 1.1.3), python3-future (>= 0.16.0), python3-idna (>= 2.5), python3-lz4 (>= 0.10.0), python3-opensearch, python3-pefile (>= 2021.5.24), python3-psutil (>= 5.4.3), python3-pyparsing (>= 3.0.0), python3-pytsk3 (>= 20210419), python3-redis (>= 3.4), python3-requests (>= 2.18.0), python3-six (>= 1.1.0), python3-tz, python3-urllib3 (>= 1.21.1), python3-xattr (>= 0.7.2), python3-xlsxwriter (>= 0.9.3), python3-yaml (>= 3.10), python3-yara (>= 3.4.0), python3-zmq (>= 2.1.11), python3-zstd (>= 1.3.0.2), ${misc:Depends} Description: Python 3 module of plaso (log2timeline) Plaso (log2timeline) is a framework to create super timelines. Its purpose is to extract timestamps from various files found on typical diff --git a/dependencies.ini b/dependencies.ini index 6f7117d8eb..21b26449b3 100644 --- a/dependencies.ini +++ b/dependencies.ini @@ -1,6 +1,6 @@ [acstore] dpkg_name: python3-acstore -minimum_version: 20240406 +minimum_version: 20240407 rpm_name: python3-acstore version_property: __version__ diff --git a/plaso/dependencies.py b/plaso/dependencies.py index bf25fad032..8c640a0ae1 100644 --- a/plaso/dependencies.py +++ b/plaso/dependencies.py @@ -16,7 +16,7 @@ # Where version_attribute_name is either a name of an attribute, # property or method. PYTHON_DEPENDENCIES = { - 'acstore': ('__version__', '20240406', None, True), + 'acstore': ('__version__', '20240407', None, True), 'artifacts': ('__version__', '20220219', None, True), 'bencode': ('', '', None, True), 'certifi': ('__version__', '2016.9.26', None, True), diff --git a/requirements.txt b/requirements.txt index 57147564ef..7ece13000d 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,6 +1,6 @@ PyYAML >= 3.10 XlsxWriter >= 0.9.3 -acstore >= 20240406 +acstore >= 20240407 artifacts >= 20220219 bencode.py certifi >= 2016.9.26 diff --git a/tests/serializer/json_serializer.py b/tests/serializer/json_serializer.py index dab6880e00..5c8b543166 100644 --- a/tests/serializer/json_serializer.py +++ b/tests/serializer/json_serializer.py @@ -6,6 +6,8 @@ import unittest import uuid +from acstore.containers import interface as containers_interface + from dfdatetime import posix_time as dfdatetime_posix_time from dfvfs.lib import definitions as dfvfs_definitions from dfvfs.path import fake_path_spec @@ -212,12 +214,23 @@ def testReadAndWriteSerializedEventObject(self): expected_event_dict = { '_event_data_identifier': 'event_data.1', - 'date_time': test_date_time, + 'date_time': test_date_time.CopyToDateTimeStringISO8601(), 'timestamp': 1621839644, 'timestamp_desc': definitions.TIME_DESCRIPTION_MODIFICATION} event_dict = event.CopyToDict() + self.assertIsInstance( + event_dict['_event_data_identifier'], + containers_interface.AttributeContainerIdentifier) + event_dict['_event_data_identifier'] = ( + event_dict['_event_data_identifier'].CopyToString()) + + self.assertIsInstance( + event_dict['date_time'], dfdatetime_posix_time.PosixTime) + event_dict['date_time'] = ( + event_dict['date_time'].CopyToDateTimeStringISO8601()) + self.assertEqual(event_dict, expected_event_dict) def testReadAndWriteSerializedEventSource(self): @@ -272,6 +285,13 @@ def testReadAndWriteSerializedEventTag(self): 'labels': ['Malware', 'Common']} event_tag_dict = event_tag.CopyToDict() + + self.assertIsInstance( + event_tag_dict['_event_identifier'], + containers_interface.AttributeContainerIdentifier) + event_tag_dict['_event_identifier'] = ( + event_tag_dict['_event_identifier'].CopyToString()) + self.assertEqual( sorted(event_tag_dict.items()), sorted(expected_event_tag_dict.items()))