Skip to content
This repository was archived by the owner on Dec 5, 2025. It is now read-only.

Commit 95b41d5

Browse files
author
Samuel Hassine
committed
[client] More handling of custom attributes in lists
1 parent d94be96 commit 95b41d5

11 files changed

+22
-11
lines changed

pycti/entities/opencti_attack_pattern.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ def list(self, **kwargs):
131131
after = kwargs.get("after", None)
132132
order_by = kwargs.get("orderBy", None)
133133
order_mode = kwargs.get("orderMode", None)
134+
custom_attributes = kwargs.get("customAttributes", None)
134135
get_all = kwargs.get("getAll", False)
135136
if get_all:
136137
first = 500
@@ -145,7 +146,7 @@ def list(self, **kwargs):
145146
edges {
146147
node {
147148
"""
148-
+ self.properties
149+
+ (custom_attributes if custom_attributes is not None else self.properties)
149150
+ """
150151
}
151152
}

pycti/entities/opencti_campaign.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def list(self, **kwargs):
114114
after = kwargs.get("after", None)
115115
order_by = kwargs.get("orderBy", None)
116116
order_mode = kwargs.get("orderMode", None)
117+
custom_attributes = kwargs.get("customAttributes", None)
117118
get_all = kwargs.get("getAll", False)
118119
if get_all:
119120
first = 500
@@ -128,7 +129,7 @@ def list(self, **kwargs):
128129
edges {
129130
node {
130131
"""
131-
+ self.properties
132+
+ (custom_attributes if custom_attributes is not None else self.properties)
132133
+ """
133134
}
134135
}

pycti/entities/opencti_course_of_action.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ def list(self, **kwargs):
111111
after = kwargs.get("after", None)
112112
order_by = kwargs.get("orderBy", None)
113113
order_mode = kwargs.get("orderMode", None)
114+
custom_attributes = kwargs.get("customAttributes", None)
114115
get_all = kwargs.get("getAll", False)
115116
if get_all:
116117
first = 500
@@ -126,7 +127,7 @@ def list(self, **kwargs):
126127
edges {
127128
node {
128129
"""
129-
+ self.properties
130+
+ (custom_attributes if custom_attributes is not None else self.properties)
130131
+ """
131132
}
132133
}

pycti/entities/opencti_identity.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ def list(self, **kwargs):
114114
after = kwargs.get("after", None)
115115
order_by = kwargs.get("orderBy", None)
116116
order_mode = kwargs.get("orderMode", None)
117+
custom_attributes = kwargs.get("customAttributes", None)
117118
get_all = kwargs.get("getAll", False)
118119
if get_all:
119120
first = 500
@@ -128,7 +129,7 @@ def list(self, **kwargs):
128129
edges {
129130
node {
130131
"""
131-
+ self.properties
132+
+ (custom_attributes if custom_attributes is not None else self.properties)
132133
+ """
133134
}
134135
}

pycti/entities/opencti_incident.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ def list(self, **kwargs):
123123
after = kwargs.get("after", None)
124124
order_by = kwargs.get("orderBy", None)
125125
order_mode = kwargs.get("orderMode", None)
126+
custom_attributes = kwargs.get("customAttributes", None)
126127
get_all = kwargs.get("getAll", False)
127128
if get_all:
128129
first = 500
@@ -137,7 +138,7 @@ def list(self, **kwargs):
137138
edges {
138139
node {
139140
"""
140-
+ self.properties
141+
+ (custom_attributes if custom_attributes is not None else self.properties)
141142
+ """
142143
}
143144
}

pycti/entities/opencti_indicator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ def list(self, **kwargs):
145145
after = kwargs.get("after", None)
146146
order_by = kwargs.get("orderBy", None)
147147
order_mode = kwargs.get("orderMode", None)
148+
custom_attributes = kwargs.get("customAttributes", None)
148149
get_all = kwargs.get("getAll", False)
149150
if get_all:
150151
first = 500
@@ -159,7 +160,7 @@ def list(self, **kwargs):
159160
edges {
160161
node {
161162
"""
162-
+ self.properties
163+
+ (custom_attributes if custom_attributes is not None else self.properties)
163164
+ """
164165
}
165166
}

pycti/entities/opencti_intrusion_set.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ def list(self, **kwargs):
118118
after = kwargs.get("after", None)
119119
order_by = kwargs.get("orderBy", None)
120120
order_mode = kwargs.get("orderMode", None)
121+
custom_attributes = kwargs.get("customAttributes", None)
121122
get_all = kwargs.get("getAll", False)
122123
if get_all:
123124
first = 500
@@ -132,7 +133,7 @@ def list(self, **kwargs):
132133
edges {
133134
node {
134135
"""
135-
+ self.properties
136+
+ (custom_attributes if custom_attributes is not None else self.properties)
136137
+ """
137138
}
138139
}

pycti/entities/opencti_malware.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,7 @@ def list(self, **kwargs):
128128
after = kwargs.get("after", None)
129129
order_by = kwargs.get("orderBy", None)
130130
order_mode = kwargs.get("orderMode", None)
131+
custom_attributes = kwargs.get("customAttributes", None)
131132
get_all = kwargs.get("getAll", False)
132133
if get_all:
133134
first = 500
@@ -142,7 +143,7 @@ def list(self, **kwargs):
142143
edges {
143144
node {
144145
"""
145-
+ self.properties
146+
+ (custom_attributes if custom_attributes is not None else self.properties)
146147
+ """
147148
}
148149
}

pycti/entities/opencti_note.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def list(self, **kwargs):
138138
after = kwargs.get("after", None)
139139
order_by = kwargs.get("orderBy", None)
140140
order_mode = kwargs.get("orderMode", None)
141+
custom_attributes = kwargs.get("customAttributes", None)
141142
get_all = kwargs.get("getAll", False)
142143
if get_all:
143144
first = 500
@@ -152,7 +153,7 @@ def list(self, **kwargs):
152153
edges {
153154
node {
154155
"""
155-
+ self.properties
156+
+ (custom_attributes if custom_attributes is not None else self.properties)
156157
+ """
157158
}
158159
}

pycti/entities/opencti_opinion.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ def list(self, **kwargs):
138138
after = kwargs.get("after", None)
139139
order_by = kwargs.get("orderBy", None)
140140
order_mode = kwargs.get("orderMode", None)
141+
custom_attributes = kwargs.get("customAttributes", None)
141142
get_all = kwargs.get("getAll", False)
142143
if get_all:
143144
first = 500
@@ -152,7 +153,7 @@ def list(self, **kwargs):
152153
edges {
153154
node {
154155
"""
155-
+ self.properties
156+
+ (custom_attributes if custom_attributes is not None else self.properties)
156157
+ """
157158
}
158159
}

0 commit comments

Comments
 (0)