Fixed dockerfile

This commit is contained in:
2025-11-26 11:44:33 +01:00
parent 079f573fd6
commit 49b3011cc3
2 changed files with 13 additions and 10 deletions

View File

@@ -1,16 +1,19 @@
FROM python:3.13-slim-trixie FROM python:3.13-slim-trixie
WORKDIR /opt/hulud_check WORKDIR /opt/hulud_check
RUN apt-get update && apt-get install -y ripgrep git RUN apt-get update && apt-get install -y ripgrep git curl
ADD check_gitlab.py . ADD check_gitlab.py .
ADD pyproject.toml ADD pyproject.toml .
RUN pip install . RUN pip3 install .
COPY <<EOF /entrypoint.sh COPY --chmod=755 <<EOF /opt/hulud_check/entrypoint.sh
#!/bin/bash #!/bin/bash
curl https://raw.githubusercontent.com/wiz-sec-public/wiz-research-iocs/refs/heads/main/reports/shai-hulud-2-packages.csv > sha1-hulud-2-packages.csv echo "Get most recent defintions"
tail -n +2 sha1-hulud-2-packages.csv | awk -F ',' '{print $1}' > patternfile curl -s https://raw.githubusercontent.com/wiz-sec-public/wiz-research-iocs/refs/heads/main/reports/shai-hulud-2-packages.csv > sha1-hulud-2-packages.csv
python3 check_gitlab.py echo "Format patterns"
tail -n +2 sha1-hulud-2-packages.csv | awk -F ',' '{print \$1}' > patternfile
echo "Running check"
python3 -u check_gitlab.py
EOF EOF
ENTRYPOINT [] ENTRYPOINT ["/opt/hulud_check/entrypoint.sh"]

View File

@@ -4,6 +4,6 @@ description = "Quick hacky check for sha1-hulud"
version = "2025.0.0" version = "2025.0.0"
requires-python = ">=3.13" requires-python = ">=3.13"
dependencies = [ dependencies = [
"GitPython" = ">=3.1.45", "GitPython>=3.1.45",
"requests" = ">=2.32.5" "requests>=2.32.5"
] ]