Skip to content

Commit

Permalink
[client] Extract creators field from indicators and observables (#434)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliapaluch authored Aug 16, 2023
1 parent 983b605 commit 9737ba3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pycti/entities/opencti_indicator.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ def __init__(self, opencti):
spec_version
created_at
updated_at
creators {
id
name
}
createdBy {
... on Identity {
id
Expand Down
4 changes: 4 additions & 0 deletions pycti/entities/opencti_stix_cyber_observable.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def __init__(self, opencti, file):
spec_version
created_at
updated_at
creators {
id
name
}
createdBy {
... on Identity {
id
Expand Down
6 changes: 6 additions & 0 deletions tests/cases/entities.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,10 @@ def data(self) -> Dict:
# TODO killchain phase
}

def get_compare_exception_keys(self) -> List[str]:
# indicator objects include extracted creators field
return ["type", "update", "createdBy", "modified", "creators"]

def teardown(self):
self.api_client.stix_domain_object.delete(id=self.organization["id"])

Expand Down Expand Up @@ -869,9 +873,11 @@ def get_compare_exception_keys(self) -> List[str]:
# toId = to
# simple_observable_key = entity_type
# simple_observable_value = observable_value & value
# includes extracted creators field
return [
"type",
"update",
"creators",
"createdBy",
"modified",
"simple_observable_key",
Expand Down

0 comments on commit 9737ba3

Please sign in to comment.