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

Ensure all required Python packages are installed for TAXII push #107

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sei-jphoskinson
Copy link

@sei-jphoskinson sei-jphoskinson commented Jul 20, 2023

When trying to do a "push to TAXII server" from the "Linked TAXII Servers" page, I would always see the following error in the exec-errors.log:

[2023-07-19 21:02:20 417] Running command python3 /var/www/MISP/app/files/scripts/taxii/taxii_push.py --dir /tmp/Taxii/31WFfqecOd3h --baseurl http://medallion:5000/ --api_root trustgroup1 --key [REDACTED] --collection 365fed99-08fa-fdcd-a1b3-fb247eb41d01
Traceback (most recent call last):
  File "/var/www/MISP/app/files/scripts/taxii/taxii_push.py", line 9, in <module>
    import taxii2client
ModuleNotFoundError: No module named 'taxii2client'
[2023-07-19 21:02:20 417] Process finished with return code 1

Adding that package to the container's requirements.txt resulted in additional libraries it couldn't find, including several that are submoduled in the MISP codebase, but don't seem to actually be getting installed into the Python search path.

This is a PR to ensure that all libraries needed for the TAXII push functionality are installed into the container's Python environment, using the versions included in the MISP codebase, if possible. I had to move the package installation to after the git checkout for this to work.

With this change (and a version bump to MISP v2.4.173 to pick up this fix), I was able to successfully push events from a MISP server to a TAXII server.

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

Successfully merging this pull request may close these issues.

1 participant