-
Notifications
You must be signed in to change notification settings - Fork 377
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1230 from TheHive-Project/ci-fixes
Fix build for several analyzers & responders
- Loading branch information
Showing
6 changed files
with
36 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
FROM python:3-slim | ||
WORKDIR /worker | ||
COPY . Maltiverse | ||
RUN apt update && apt install -y git | ||
RUN test ! -e Maltiverse/requirements.txt || pip install --no-cache-dir -r Maltiverse/requirements.txt | ||
ENTRYPOINT Maltiverse/maltiverse-client.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# See https://github.com/splunk/splunk-sdk-python for supported python versions | ||
FROM python:3.7 | ||
WORKDIR /worker | ||
COPY . Splunk | ||
RUN test ! -e Splunk/requirements.txt || pip install --no-cache-dir -r Splunk/requirements.txt | ||
ENTRYPOINT Splunk/splunk.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,9 @@ | ||
# syntax=docker/dockerfile:1.3-labs | ||
FROM python:3.9 | ||
WORKDIR /worker | ||
COPY . Jupyter_Responder | ||
RUN test ! -e Jupyter_Responder/requirements.txt || pip install --no-cache-dir -rJupyter_Responder/requirements.txt | ||
RUN cat <<EOF > /Jupyter_Responder/papermill_iorw.patch | ||
--- iorw.py 2023-08-11 05:49:49.302149767 +0000 | ||
+++ iorw.py 2023-08-11 05:48:38.553642098 +0000 | ||
@@ -180,7 +180,7 @@ | ||
class HttpHandler(object): | ||
@classmethod | ||
def read(cls, path): | ||
- return requests.get(path, headers={'Accept': 'application/json'}).text | ||
+ return json.dumps(requests.get(path, headers={'Accept': 'application/json'}).json()["content"]) | ||
|
||
@classmethod | ||
def listdir(cls, path): | ||
@@ -188,7 +188,9 @@ | ||
|
||
@classmethod | ||
def write(cls, buf, path): | ||
- result = requests.put(path, json=json.loads(buf)) | ||
+ payload = {"type": "notebook", "format": "json", "path": path} | ||
+ payload["content"] = json.loads(buf) | ||
+ result = requests.put(path, json=payload) | ||
result.raise_for_status() | ||
|
||
@classmethod | ||
EOF | ||
RUN test ! -e Jupyter_Responder/requirements.txt || pip install --no-cache-dir -r Jupyter_Responder/requirements.txt | ||
|
||
|
||
RUN pip install papermill | ||
RUN apt update | ||
RUN apt install patch | ||
RUN patch $(python3 -c "from papermill import iorw; print(iorw.__file__)") /Jupyter_Responder/papermill_iorw.patch | ||
RUN apt update &&\ | ||
apt install patch &&\ | ||
patch $(python3 -c "from papermill import iorw; print(iorw.__file__)") Jupyter_Responder/papermill_iorw.patch | ||
ENTRYPOINT Jupyter_Responder/jupyter.py | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
--- iorw.py 2023-08-11 05:49:49.302149767 +0000 | ||
+++ iorw.py 2023-08-11 05:48:38.553642098 +0000 | ||
@@ -180,7 +180,7 @@ | ||
class HttpHandler(object): | ||
@classmethod | ||
def read(cls, path): | ||
- return requests.get(path, headers={'Accept': 'application/json'}).text | ||
+ return json.dumps(requests.get(path, headers={'Accept': 'application/json'}).json()["content"]) | ||
|
||
@classmethod | ||
def listdir(cls, path): | ||
@@ -188,7 +188,9 @@ | ||
|
||
@classmethod | ||
def write(cls, buf, path): | ||
- result = requests.put(path, json=json.loads(buf)) | ||
+ payload = {"type": "notebook", "format": "json", "path": path} | ||
+ payload["content"] = json.loads(buf) | ||
+ result = requests.put(path, json=payload) | ||
result.raise_for_status() | ||
|
||
@classmethod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters