TheHive-Project / TheHive-Project/Cortex

cortexutils not installed in Mailer Responder Docker Image

Open
#334 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
1.6k
Forks
264
PR merge metrics
No merged PRs in 30d

Description

Request Type

Bug

Work Environment
Question Answer
OS version (server) Ubuntu 20.04
OS version (client) Ubuntu 20.04
Cortex version / git hash 3.1.0-1
Package Type Docker
Browser type & version -
Problem Description

Running the Mailer responder in Docker throws a ModuleNotFound error.

Traceback (most recent call last):
  File "Mailer/mailer.py", line 6, in <module>
    from cortexutils.responder import Responder
ModuleNotFoundError: No module named 'cortexutils'

Checking with pip inside a container reveals that it is indeed not installed

sudo docker run -it --rm --entrypoint bash cortexneurons/mailer:1
root@a4d180d0d136:/worker# pip3 list
Package    Version
---------- -------
pip        20.2.2
setuptools 49.3.1
wheel      0.34.2

Steps to Reproduce
  1. run the Mailer responder with job.runner set to docker

or

  1. pull the docker image
foo@bar:~$ sudo docker pull cortexneurons/mailer:1
  1. run the image
foo@bar:~$ sudo docker run -it --rm cortexneurons/mailer:1
Possible Solutions

Install cortexutils in docker image.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with Mailer/mailer.py and inspect the Docker image build configuration to see how its Python dependencies are installed. Confirm that cortexutils is available inside the built image, then run the Mailer responder with job.runner set to docker and verify that the ModuleNotFoundError no longer occurs.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, python
Domain
devops
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.