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

Bug: Installing misp-stix and stix2 in the same environment breaks misp_stix_converter export --version 2.1 #69

Open
1 task done
gopackgo90 opened this issue Feb 16, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@gopackgo90
Copy link

gopackgo90 commented Feb 16, 2025

MISP-STIX usage

CLI

Expected behavior

When installing misp-stix and stix2 in the same Python environment, I would expect to still be able to use misp_stix_converter export --version 2.1 and produce a STIX 2.1 Bundle.

Actual behavior

When running misp_stix_converter export --version 2.1 on a MISP Event file after installing stix2 I get:

$ misp_stix_converter export --version 2.1 --file misp.event.circl-osint-feed-0b988513-9535-42f0-9ebc-5d6aec2e1c79.json 
Failed parsing the following - and the related error message:
 misp.event.circl-osint-feed-0b988513-9535-42f0-9ebc-5d6aec2e1c79.json - Unexpected properties for Identity: (interoperability).
No result from the MISP to STIX conversion.

This seems to be due to misp-lib-stix2 and stix2 both using the same stix2 package name. So when installing stix2 after misp-lib-stix2, misp-lib-stix2 gets overwritten. Ideally misp-lib-stix2 would use it's own package name so both can be used in the same environment.

Steps to reproduce

  1. Create a Python (3.11) venv, update pip and setuptools, then install misp-stix, then install stix2.
$ python3.11 -m venv misp_stix_venv
$ source misp_stix_venv/bin/activate
(misp_stix) $ pip install -U pip setuptools
(misp_stix) $ pip install misp-stix
(misp_stix) $ pip install stix2
  1. Run misp_stix_converter export --version 2.1 --file misp.event.json against a valid MISP Event
(misp_stix) $ misp_stix_converter export --version 2.1 --file misp.event.circl-osint-feed-0b988513-9535-42f0-9ebc-5d6aec2e1c79.json
  1. Observe the "Unexpected properties for Identity: (interoperability)." error message

pip freeze of my Python 3.11 environment:

antlr4-python3-runtime==4.9.3
certifi==2025.1.31
charset-normalizer==3.4.1
cybox==2.1.0.21
Deprecated==1.2.18
idna==3.10
lxml==5.3.1
maec==4.1.0.17
misp-lib-stix2==3.0.1.2
misp-stix==2025.2.14
mixbox==1.0.5
ordered-set==4.1.0
publicsuffixlist==1.0.2.20250213
pymisp==2.5.4
python-dateutil==2.9.0.post0
pytz==2025.1
requests==2.32.3
simplejson==3.20.1
six==1.17.0
stix==1.2.0.11
stix-edh==1.0.3
stix2==3.0.1
stix2-patterns==2.0.0
urllib3==2.3.0
weakrefmethod==1.0.3
wrapt==1.17.2

Version

2025.2.14

Python version

3.11

Relevant log output

Extra attachments

Sample MISP event from https://www.circl.lu/doc/misp/feed-osint/0b988513-9535-42f0-9ebc-5d6aec2e1c79.json:

misp.event.circl-osint-feed-0b988513-9535-42f0-9ebc-5d6aec2e1c79.json

Code of Conduct

  • I agree to follow this project's Code of Conduct
@gopackgo90 gopackgo90 added the bug Something isn't working label Feb 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant