Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ParseError: Can't parse unknown object type 'infrastructure'! #617

Open
MrDynmt opened this issue Dec 18, 2024 · 2 comments
Open

ParseError: Can't parse unknown object type 'infrastructure'! #617

MrDynmt opened this issue Dec 18, 2024 · 2 comments

Comments

@MrDynmt
Copy link

MrDynmt commented Dec 18, 2024

I am unable to parse the infrastructure type in the same way that I am able to parse the threat-actor and tool type. Here is the dictionary I attempt to parse: {'parent_type': 'generic',
'type': 'infrastructure',
'sourcereliability': '2',
'actionable': '2',
'relevance': '2',
'info': 'https://cert.gov.ua/article/6123309',
'name': 'pre-compromised server',
'labels': 'White'}
Here is the error I get: ParseError: Can't parse unknown object type 'infrastructure'! For custom types, use the CustomObject decorator.

@chisholm
Copy link
Contributor

You didn't give any sample code showing what you tried, but I suspect you didn't give a STIX specification version so the library tried to detect it and came up with 2.0. But infrastructure is a 2.1 SDO. You might try adding property "spec_version": "2.1" to your dictionary (that's a required property for 2.1 SDOs anyway).

@MrDynmt
Copy link
Author

MrDynmt commented Dec 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants