You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have written a bare minimal responder that just returns a success message for a request from TheHive. However, I get the status failure without much information.
#!/usr/bin/env python3
from cortexutils.responder import Responder
class SampleService(Responder):
def __init__(self):
Responder.__init__(self)
def run(self):
Responder.run(self)
self.report({'message': "success"})
def operations(self, raw):
return [self.build_operation("AddTagToCase", tag="sampleId:id-1")]
if __name__ == "__main__":
SampleService().run()
When I run the responder from TheHive, I get the below output in the application logs with a warning saying [warn] o.t.c.s.DockerJobRunnerSrv - The worker didn't generate output file.
[info] o.t.c.s.DockerJobRunnerSrv - Execute container bf99c645848c9ca0f9f00d573b7f1b8d21220f272f9003b4fb44b8c87c0370b9
timeout: 30 minutes
image : cortex-neurons/sample_service:0.2
volume : /tmp/cortex-jobs/cortex-job-Fk2v5ocBSFpERmG9YbQq-7518629213985387577:/job
[info] c.s.d.c.DefaultDockerClient - Starting container with Id: bf99c645848c9ca0f9f00d573b7f1b8d21220f272f9003b4fb44b8c87c0370b9
[info] o.t.c.s.AccessLogFilter - 192.168.65.205 GET /api/alert took 17ms and returned 200 2 bytes
[warn] o.t.c.s.DockerJobRunnerSrv - The worker didn't generate output file.
[info] o.t.c.s.JobSrv - Job Fk2v5ocBSFpERmG9YbQq has finished with status Failure
[info] o.t.c.s.AuditActor - Job Fk2v5ocBSFpERmG9YbQq has be updated (JsDefined("Failure"))
In cortex UI I can see the observable information as input and output(Report) only contains,
I found a fix for this. I was following https://thehive-project.github.io/Cortex-Analyzers/dev_guides/dockerize-your-custom-analyzers-responders/ and when you build the docker image the ENTRYPOINT command is set as ENTRYPOINT \$command This is only passing the file path and not prefixed with python command.
Describe the bug
I have written a bare minimal responder that just returns a success message for a
request
from TheHive. However, I get the statusfailure
without much information.When I run the responder from TheHive, I get the below output in the application logs with a warning saying
[warn] o.t.c.s.DockerJobRunnerSrv - The worker didn't generate output file.
In cortex UI I can see the observable information as input and output(Report) only contains,
Work environment
Additional information
The text was updated successfully, but these errors were encountered: