Skip to content

Commit 7a9dafe

Browse files
Fixing name to asset_name to match change on opencti branch
1 parent 28c7a37 commit 7a9dafe

6 files changed

+9
-7
lines changed

examples/create_observable_financial_asset.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
process = opencti_api_client.stix_cyber_observable.create(
1313
observableData={
1414
"type": "Financial-Asset",
15-
"name": "Joe's Big Boat",
15+
"asset_name": "Joe's Big Boat",
1616
"asset_type": "boat",
1717
"asset_value": 12000000,
1818
"currency_code": "belarusian_ruble_(byr)",

pycti/entities/opencti_stix_core_object.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ def __init__(self, opencti, file):
644644
currency_code
645645
}
646646
... on FinancialAsset {
647-
name
647+
asset_name
648648
asset_type
649649
asset_value
650650
currency_code
@@ -1313,7 +1313,7 @@ def __init__(self, opencti, file):
13131313
currency_code
13141314
}
13151315
... on FinancialAsset {
1316-
name
1316+
asset_name
13171317
asset_type
13181318
asset_value
13191319
currency_code

pycti/entities/opencti_stix_cyber_observable.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ def create(self, **kwargs):
10381038
type == "Financial-Asset" or type.lower() == "x-opencti-financial-asset"
10391039
):
10401040
input_variables["FinancialAsset"] = {
1041-
"name": observable_data.get("name"),
1041+
"asset_name": observable_data.get("asset_name"),
10421042
"asset_type": observable_data.get("asset_type"),
10431043
"asset_value": observable_data.get("asset_value"),
10441044
"currency_code": observable_data.get("currency_code"),

pycti/entities/stix_cyber_observable/opencti_stix_cyber_observable_properties.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@
289289
currency_code
290290
}
291291
... on FinancialAsset {
292-
name
292+
asset_name
293293
asset_type
294294
asset_value
295295
currency_code
@@ -613,7 +613,7 @@
613613
currency_code
614614
}
615615
... on FinancialAsset {
616-
name
616+
asset_name
617617
asset_type
618618
asset_value
619619
currency_code

pycti/utils/constants.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ class StixCyberObservableTypes(Enum):
4343
FINANCIAL_TRANSACTION = "Financial-Transaction"
4444
TEXT = "Text"
4545
USER_AGENT = "User-Agent"
46+
# BANK_ACCOUNT = "Bank-Account"
4647
PHONE_NUMBER = "Phone-Number"
4748
CREDENTIAL = "Credential"
4849
TRACKING_NUMBER = "Tracking-Number"
@@ -439,7 +440,7 @@ class CustomObservableFinancialAccount:
439440
@CustomObservable(
440441
"financial-asset",
441442
[
442-
("name", StringProperty()),
443+
("asset_name", StringProperty()),
443444
("asset_type", StringProperty()),
444445
("asset_value", StringProperty()),
445446
("currency_code", StringProperty()),

pycti/utils/opencti_stix2_utils.py

+1
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
"Windows-Registry-Key": ["key"],
6464
"Windows-Registry-Value-Type": ["name"],
6565
"Hostname": ["value"],
66+
# "Bank-Account": ["iban"],
6667
"Phone-Number": ["value"],
6768
"Payment-Card": ["card_number"],
6869
"Tracking-Number": ["value"],

0 commit comments

Comments
 (0)