Skip to content

Commit

Permalink
Fixing name to asset_name to match change on opencti branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ParamConstructor committed Jun 28, 2024
1 parent 28c7a37 commit 7a9dafe
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion examples/create_observable_financial_asset.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
process = opencti_api_client.stix_cyber_observable.create(
observableData={
"type": "Financial-Asset",
"name": "Joe's Big Boat",
"asset_name": "Joe's Big Boat",
"asset_type": "boat",
"asset_value": 12000000,
"currency_code": "belarusian_ruble_(byr)",
Expand Down
4 changes: 2 additions & 2 deletions pycti/entities/opencti_stix_core_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ def __init__(self, opencti, file):
currency_code
}
... on FinancialAsset {
name
asset_name
asset_type
asset_value
currency_code
Expand Down Expand Up @@ -1313,7 +1313,7 @@ def __init__(self, opencti, file):
currency_code
}
... on FinancialAsset {
name
asset_name
asset_type
asset_value
currency_code
Expand Down
2 changes: 1 addition & 1 deletion pycti/entities/opencti_stix_cyber_observable.py
Original file line number Diff line number Diff line change
Expand Up @@ -1038,7 +1038,7 @@ def create(self, **kwargs):
type == "Financial-Asset" or type.lower() == "x-opencti-financial-asset"
):
input_variables["FinancialAsset"] = {
"name": observable_data.get("name"),
"asset_name": observable_data.get("asset_name"),
"asset_type": observable_data.get("asset_type"),
"asset_value": observable_data.get("asset_value"),
"currency_code": observable_data.get("currency_code"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@
currency_code
}
... on FinancialAsset {
name
asset_name
asset_type
asset_value
currency_code
Expand Down Expand Up @@ -613,7 +613,7 @@
currency_code
}
... on FinancialAsset {
name
asset_name
asset_type
asset_value
currency_code
Expand Down
3 changes: 2 additions & 1 deletion pycti/utils/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class StixCyberObservableTypes(Enum):
FINANCIAL_TRANSACTION = "Financial-Transaction"
TEXT = "Text"
USER_AGENT = "User-Agent"
# BANK_ACCOUNT = "Bank-Account"
PHONE_NUMBER = "Phone-Number"
CREDENTIAL = "Credential"
TRACKING_NUMBER = "Tracking-Number"
Expand Down Expand Up @@ -439,7 +440,7 @@ class CustomObservableFinancialAccount:
@CustomObservable(
"financial-asset",
[
("name", StringProperty()),
("asset_name", StringProperty()),
("asset_type", StringProperty()),
("asset_value", StringProperty()),
("currency_code", StringProperty()),
Expand Down
1 change: 1 addition & 0 deletions pycti/utils/opencti_stix2_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"Windows-Registry-Key": ["key"],
"Windows-Registry-Value-Type": ["name"],
"Hostname": ["value"],
# "Bank-Account": ["iban"],
"Phone-Number": ["value"],
"Payment-Card": ["card_number"],
"Tracking-Number": ["value"],
Expand Down

0 comments on commit 7a9dafe

Please sign in to comment.