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

Alpine docker images support + dockerfile & Requirements.txt cleanup #1325

Merged
merged 29 commits into from
Feb 11, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
8ca08b4
Merge branch 'release/3.4.4'
nusantara-self Feb 7, 2025
a01d377
YETI - Fix requirements.txt
nusantara-self Feb 7, 2025
1f6c71e
Update requirements.txt
nusantara-self Feb 10, 2025
29fb734
Update requirements.txt
nusantara-self Feb 10, 2025
4d40424
Delete responders/AWSLambda/Dockerfile
nusantara-self Feb 10, 2025
387c639
Delete responders/KnowBe4/Dockerfile
nusantara-self Feb 10, 2025
9471e21
Delete responders/MSDefenderEndpoints/Dockerfile
nusantara-self Feb 10, 2025
e9b66a3
Delete responders/Gmail/Dockerfile
nusantara-self Feb 10, 2025
ac2b7dc
Delete responders/Netcraft/Dockerfile
nusantara-self Feb 10, 2025
2ce09f9
Remove unnecessary Dockerfiles
nusantara-self Feb 10, 2025
959be61
Dockerfile - Alpine support Capa
nusantara-self Feb 10, 2025
51a76ef
Dockerfile - python:3-slim
nusantara-self Feb 10, 2025
cb7db03
Alpine dockerfile support
nusantara-self Feb 10, 2025
cc20c86
Fix missing dependency
nusantara-self Feb 10, 2025
e46617b
Fix missing dependency
nusantara-self Feb 10, 2025
3c56dff
Fix missing dependency
nusantara-self Feb 10, 2025
59c1b35
Alpine dockerfile support
nusantara-self Feb 10, 2025
9e0655e
python3 compatibility
nusantara-self Feb 10, 2025
6845a83
Remove unnecessary Dockerfile
nusantara-self Feb 10, 2025
ffe185a
requirements.txt fixes
nusantara-self Feb 10, 2025
b764155
Update censys_analyzer.py
nusantara-self Feb 10, 2025
7ef4b41
Import fix
nusantara-self Feb 10, 2025
e4ab181
Binalyze AIR fix
nusantara-self Feb 10, 2025
af2aa4b
Alpine image support
nusantara-self Feb 10, 2025
0b006a7
Alpine support
nusantara-self Feb 10, 2025
3c9ebc4
Update Dockerfile
nusantara-self Feb 11, 2025
3a06988
Update requirements.txt
nusantara-self Feb 11, 2025
0344ce4
Docker image fixes
nusantara-self Feb 11, 2025
78635dc
Slimmer image
nusantara-self Feb 11, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions analyzers/Abuse_Finder/Dockerfile

This file was deleted.

4 changes: 2 additions & 2 deletions analyzers/Abuse_Finder/abusefinder.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"""

from cortexutils.analyzer import Analyzer
from abuse_finder import domain_abuse, ip_abuse, \
email_abuse, url_abuse
from abuse_finder import domain_abuse, ip_abuse, email_abuse, url_abuse

import logging
logging.getLogger("tldextract").setLevel(logging.CRITICAL)

Expand Down
5 changes: 0 additions & 5 deletions analyzers/Autofocus/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion analyzers/Autofocus/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cortexutils
git+https://github.com/PaloAltoNetworks/autofocus-client-library
autofocus-client-library
6 changes: 0 additions & 6 deletions analyzers/CISMCAP/Dockerfile

This file was deleted.

19 changes: 11 additions & 8 deletions analyzers/Capa/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
FROM python:3
FROM python:3-alpine
WORKDIR /worker
COPY . Capa

# Install required tools
RUN apt-get update && apt-get install -y \
RUN apk add --no-cache \
curl \
jq \
unzip && \
rm -rf /var/lib/apt/lists/*
unzip \
bash && \
rm -rf /var/cache/apk/*

COPY requirements.txt Capa/
RUN test ! -e Capa/requirements.txt || pip install --no-cache-dir -r Capa/requirements.txt

# Add a script to fetch the latest capa release and extract it
COPY fetch_capa.sh /worker/fetch_capa.sh
RUN chmod +x /worker/fetch_capa.sh && /worker/fetch_capa.sh

RUN test ! -e Capa/requirements.txt || pip install --no-cache-dir -r Capa/requirements.txt
ENTRYPOINT "Capa/CapaAnalyze.py"
COPY . Capa/

ENTRYPOINT ["python", "Capa/CapaAnalyze.py"]
5 changes: 0 additions & 5 deletions analyzers/Censys/Dockerfile

This file was deleted.

6 changes: 1 addition & 5 deletions analyzers/Censys/censys_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
from cortexutils.analyzer import Analyzer
from censys.search import CensysHosts, CensysCerts

from censys.common.exceptions import (
CensysNotFoundException,
CensysRateLimitExceededException,
CensysUnauthorizedException,
)
from censys.common.exceptions import CensysNotFoundException, CensysRateLimitExceededException, CensysUnauthorizedException

import iocextract

Expand Down
5 changes: 0 additions & 5 deletions analyzers/CheckPhish/Dockerfile

This file was deleted.

7 changes: 0 additions & 7 deletions analyzers/Cluster25/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions analyzers/Crtsh/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions analyzers/Cylance/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cortexutils
cyapi
setuptools
6 changes: 0 additions & 6 deletions analyzers/DNSDB/Dockerfile

This file was deleted.

8 changes: 0 additions & 8 deletions analyzers/DShield/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions analyzers/EchoTrail/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions analyzers/Elasticsearch/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ elasticsearch
cortexutils
pytz
requests
python-dateutil
5 changes: 0 additions & 5 deletions analyzers/FalconSandbox/Dockerfile

This file was deleted.

1 change: 1 addition & 0 deletions analyzers/GRR/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
cortexutils
grr-api-client
setuptools
5 changes: 0 additions & 5 deletions analyzers/GoogleDNS/Dockerfile

This file was deleted.

5 changes: 1 addition & 4 deletions analyzers/Malwares/malwares.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
from malwares_api import Api
from cortexutils.analyzer import Analyzer

try:
from StringIO import StringIO
except ImportError:
from io import StringIO
from io import StringIO


class MalwaresAnalyzer(Analyzer):
Expand Down
11 changes: 11 additions & 0 deletions analyzers/OpenCTI/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
FROM python:3-alpine
WORKDIR /worker

# Install libmagic (development package provides libmagic.so symlink)
RUN apk add --no-cache file-dev

COPY requirements.txt OpenCTI/
RUN test ! -e OpenCTI/requirements.txt || pip install --no-cache-dir -r OpenCTI/requirements.txt
COPY . OpenCTI/

ENTRYPOINT ["python", "OpenCTI/opencti.py"]
6 changes: 0 additions & 6 deletions analyzers/PaloAltoWildFire/Dockerfile

This file was deleted.

2 changes: 1 addition & 1 deletion analyzers/QrDecode/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3
FROM python:3-slim
WORKDIR /worker
COPY . QrDecode
RUN test ! -e QrDecode/requirements.txt || pip install --no-cache-dir -r QrDecode/requirements.txt
Expand Down
6 changes: 0 additions & 6 deletions analyzers/Splunk/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions analyzers/Threatcrowd/Dockerfile

This file was deleted.

5 changes: 0 additions & 5 deletions analyzers/Verifalia/Dockerfile

This file was deleted.

18 changes: 11 additions & 7 deletions analyzers/VirusTotal/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
FROM python:3.9
FROM python:3-alpine

WORKDIR /worker
COPY . VirusTotal
RUN apt update
RUN apt install -y -q libimage-exiftool-perl && \
rm -rf /var/lib/apt/lists/*

RUN pip install --no-cache-dir -r VirusTotal/requirements.txt
# install runtime dependencies.
RUN apk add --no-cache perl-image-exiftool file-dev

COPY requirements.txt VirusTotal/

# Install Python dependencies from requirements.txt
RUN test ! -e VirusTotal/requirements.txt || pip install --no-cache-dir -r VirusTotal/requirements.txt

COPY . VirusTotal

ENTRYPOINT VirusTotal/virustotal.py
ENTRYPOINT ["python", "VirusTotal/virustotal.py"]
10 changes: 10 additions & 0 deletions analyzers/Yeti/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
FROM python:3-alpine
WORKDIR /worker

RUN apk add --no-cache git

COPY requirements.txt Yeti/
RUN test ! -e Yeti/requirements.txt || pip install --no-cache-dir -r Yeti/requirements.txt
COPY . Yeti/

ENTRYPOINT ["python", "Yeti/yeti.py"]
2 changes: 1 addition & 1 deletion analyzers/Yeti/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
cortexutils
git+https://github.com/yeti-platform/pyeti
git+https://github.com/yeti-platform/pyeti
6 changes: 0 additions & 6 deletions responders/AWSLambda/Dockerfile

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"dataTypeList": [
"thehive:case_artifact"
],
"command": "BinalyzeAIR/air.py",
"command": "BinalyzeAIR/binalyze.py",
"config": {
"service": "air_isolate"
},
Expand Down
3 changes: 2 additions & 1 deletion responders/CheckPoint/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
cortexutils
cp-mgmt-api-sdk
# -e git+https://github.com/CheckPointSW/cp_mgmt_api_python_sdk#egg=cpapi cpapi
git+https://github.com/CheckPointSW/cp_mgmt_api_python_sdk
#git+https://github.com/CheckPointSW/cp_mgmt_api_python_sdk
6 changes: 0 additions & 6 deletions responders/FalconCustomIOC/Dockerfile

This file was deleted.

15 changes: 10 additions & 5 deletions responders/Gmail/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
FROM python:3

FROM python:3-alpine
WORKDIR /worker
COPY . Gmail
RUN pip install --no-cache-dir -r Gmail/requirements.txt
ENTRYPOINT Gmail/Gmail.py

# Install libmagic (development package provides libmagic.so symlink)
RUN apk add --no-cache file-dev

COPY requirements.txt Gmail/
RUN test ! -e Gmail/requirements.txt || pip install --no-cache-dir -r Gmail/requirements.txt
COPY . Gmail/

ENTRYPOINT ["python", "Gmail/Gmail.py"]
6 changes: 0 additions & 6 deletions responders/KnowBe4/Dockerfile

This file was deleted.

21 changes: 0 additions & 21 deletions responders/MSDefenderEndpoints/Dockerfile

This file was deleted.

15 changes: 15 additions & 0 deletions responders/MailIncidentStatus/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM python:3-alpine

WORKDIR /worker

# install runtime dependencies
RUN apk add --no-cache file-dev

COPY requirements.txt MailIncidentStatus/

# Install Python dependencies from requirements.txt
RUN test ! -e MailIncidentStatus/requirements.txt || pip install --no-cache-dir -r MailIncidentStatus/requirements.txt

COPY . MailIncidentStatus

ENTRYPOINT ["python", "MailIncidentStatus/mailincidentstatus.py"]
6 changes: 0 additions & 6 deletions responders/Netcraft/Dockerfile

This file was deleted.

6 changes: 0 additions & 6 deletions responders/PaloAltoCortexXDR/Dockerfile

This file was deleted.

3 changes: 2 additions & 1 deletion responders/PaloAltoNGFW/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
cortexutils
requests
pan-os-python
thehive4py~=1.8.1
thehive4py~=1.8.1
setuptools
1 change: 1 addition & 0 deletions responders/SendGrid/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
sendgrid
cortexutils
5 changes: 0 additions & 5 deletions responders/SentinelOne/Dockerfile

This file was deleted.

3 changes: 2 additions & 1 deletion responders/Telegram/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
cortexutils
cortexutils
requests
Loading