TheHive-Project / Cortex

Cortex: a Powerful Observable Analysis and Active Response Engine
https://strangebee.com/cortex/
GNU Affero General Public License v3.0
1.33k stars 228 forks source link

cortexutils not installed in Mailer Responder Docker Image #334

Open 239487230597507 opened 3 years ago

239487230597507 commented 3 years ago

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
  2. run the image
    foo@bar:~$ sudo docker run -it --rm cortexneurons/mailer:1

Possible Solutions

Install cortexutils in docker image.

wmartial commented 3 years ago

Hi,

same issue observed with the SendGrid Docker image

docker.io/cortexneurons/sendgrid:1 docker.io/cortexneurons/sendgrid@sha256:51a24dc157d1253a5b9a8e4f2ff0f0f674cf55a3b3e1a89a8189ff2cc95cafa3

Is it possible to correct this Docker image present in the Docker Hub repository ?

Thanks in advance

du5hyant commented 3 years ago

Hi, Looks like requirements.txt is missing in the Mailer Responder https://github.com/TheHive-Project/Cortex-Analyzers/tree/master/responders/Mailer