|
4 | 4 | from cdo_local_uuid import local_uuid
|
5 | 5 |
|
6 | 6 | from ..base import FacetEntity, ObjectEntity, UcoInherentCharacterizationThing
|
| 7 | +from .action import Action |
7 | 8 | from .core import Relationship
|
8 | 9 | from .identity import Identity
|
| 10 | +from .location import Location |
9 | 11 | from .types import Dictionary
|
10 | 12 |
|
11 | 13 |
|
@@ -426,6 +428,15 @@ def __init__(self, *args: Any, has_changed=None, state=None, **kwargs: Any) -> N
|
426 | 428 | self._bool_vars(**{"uco-observable:hasChanged": has_changed})
|
427 | 429 |
|
428 | 430 |
|
| 431 | +class ObservableAction(Action): |
| 432 | + def __init__(self, *args: Any, **kwargs: Any) -> None: |
| 433 | + """ |
| 434 | + An observable action is a grouping of characteristics unique to something that may be done or performed within the digital domain. |
| 435 | + """ |
| 436 | + super().__init__(*args, **kwargs) |
| 437 | + self["@type"] = "uco-observable:ObservableAction" |
| 438 | + |
| 439 | + |
429 | 440 | class FacetApplication(FacetEntity):
|
430 | 441 | def __init__(
|
431 | 442 | self,
|
@@ -1342,42 +1353,61 @@ def __init__(self, path: str) -> None:
|
1342 | 1353 | self._str_vars(**{"uco-observable:path": path})
|
1343 | 1354 |
|
1344 | 1355 |
|
1345 |
| -class FacetEvent(FacetEntity): |
| 1356 | +class EventRecordFacet(FacetEntity): |
1346 | 1357 | def __init__(
|
1347 | 1358 | self,
|
1348 |
| - event_type=None, |
1349 |
| - event_text=None, |
1350 |
| - event_id=None, |
1351 |
| - cyber_action=None, |
1352 |
| - computer_name=None, |
1353 |
| - created_time=None, |
1354 |
| - start_time=None, |
1355 |
| - end_time=None, |
| 1359 | + account: Union[None, ObjectEntity] = None, |
| 1360 | + application: Union[None, ObjectEntity] = None, |
| 1361 | + cyber_action: Union[None, ObjectEntity] = None, |
| 1362 | + end_time: Optional[datetime] = None, |
| 1363 | + event_record_device: Union[None, ObjectEntity] = None, |
| 1364 | + event_record_id: Optional[str] = None, |
| 1365 | + event_record_raw: Optional[str] = None, |
| 1366 | + event_record_service_name: Optional[str] = None, |
| 1367 | + event_record_text: Optional[str] = None, |
| 1368 | + event_type: Optional[str] = None, |
| 1369 | + observable_created_time: Optional[datetime] = None, |
| 1370 | + start_time: Optional[datetime] = None, |
1356 | 1371 | ):
|
1357 | 1372 | """
|
1358 | 1373 | An event facet is a grouping of characteristics unique to something that happens in a digital context
|
1359 | 1374 | (e.g., operating system events).
|
1360 |
| - :param event_type: The type of the event, for example 'information', 'warning' or 'error'. |
1361 |
| - :param event_text: The textual representation of the event. |
1362 |
| - :param event_id: The identifier of the event. |
| 1375 | + :param account: Specifies the account referenced in an event log entry or |
| 1376 | + used to run the scheduled task. |
| 1377 | + :param application: The application associated with this object. |
1363 | 1378 | :param cyber_action: The action taken in response to the event.
|
1364 |
| - :param created_time: The date and time at which the observable object being characterized was created. |
1365 |
| - :param start_time: The date and time at which the observable object being characterized started. |
1366 | 1379 | :param end_time: The date and time at which the observable object being characterized ended.
|
| 1380 | + :param event_record_device: The device where the event has been registered. |
| 1381 | + :param event_record_id: The identifier of the event. |
| 1382 | + :param event_record_raw: The complete raw content of the event record. |
| 1383 | + :param event_record_service_name: The service that generated the event record. |
| 1384 | + :param event_record_text: The textual representation of the event. |
| 1385 | + :param event_type: The type of the event, for example 'information', 'warning' or 'error'. |
| 1386 | + :param observable_created_time: The date and time at which the observable object being characterized was created. |
| 1387 | + :param start_time: The date and time at which the observable object being characterized started. |
1367 | 1388 | """
|
1368 | 1389 | super().__init__()
|
1369 | 1390 | self["@type"] = "uco-observable:EventRecordFacet"
|
1370 | 1391 | self._str_vars(
|
1371 | 1392 | **{
|
| 1393 | + "uco-observable:eventRecordID": event_record_id, |
| 1394 | + "uco-observable:eventRecordRaw": event_record_raw, |
| 1395 | + "uco-observable:eventRecordServiceName": event_record_service_name, |
| 1396 | + "uco-observable:eventRecordText": event_record_text, |
1372 | 1397 | "uco-observable:eventType": event_type,
|
1373 |
| - "uco-observable:eventText": event_text, |
1374 |
| - "uco-observable:eventID": event_id, |
1375 |
| - "uco-observable:computerName": computer_name, |
1376 | 1398 | }
|
1377 | 1399 | )
|
1378 |
| - self._node_reference_vars(**{"uco-observable:cyberAction": cyber_action}) |
| 1400 | + self._node_reference_vars( |
| 1401 | + **{ |
| 1402 | + "uco-observable:account": account, |
| 1403 | + "uco-observable:application": application, |
| 1404 | + "uco-observable:cyberAction": cyber_action, |
| 1405 | + "uco-observable:eventRecordDevice": event_record_device, |
| 1406 | + } |
| 1407 | + ) |
1379 | 1408 | self._datetime_vars(
|
1380 | 1409 | **{
|
| 1410 | + "uco-observable:observableCreatedTime": observable_created_time, |
1381 | 1411 | "uco-observable:startTime": start_time,
|
1382 | 1412 | "uco-observable:endTime": end_time,
|
1383 | 1413 | }
|
@@ -1719,7 +1749,7 @@ def __init__(self, disk_type=None, size=None, partition=None):
|
1719 | 1749 | "uco-observable:SIMCardFacet": FacetSimCard,
|
1720 | 1750 | "uco-observable:OperatingSystemFacet": FacetOperatingSystem,
|
1721 | 1751 | "uco-observable:PathRelationFacet": FacetPathRelation,
|
1722 |
| - "uco-observable:EventFacet": FacetEvent, |
| 1752 | + "uco-observable:EventRecordFacet": EventRecordFacet, |
1723 | 1753 | "uco-observable:ObservableRelationship": ObservableRelationship,
|
1724 | 1754 | "uco-observable:ApplicationAccountFacet": FacetApplicationAccount,
|
1725 | 1755 | "uco-observable:DigitalAccountFacet": FacetDigitalAccount,
|
|
0 commit comments