Refactored it a bit

This commit is contained in:
2026-04-02 13:05:56 +02:00
parent ba550f8dc5
commit 280450fc0f
8 changed files with 196 additions and 89 deletions

View File

@@ -1,20 +1,10 @@
FROM python:3.13-slim-trixie
WORKDIR /opt/hulud_check
WORKDIR /opt/glchecka
RUN apt-get update && apt-get install -y ripgrep git curl
ADD check_gitlab.py .
ADD pyproject.toml .
ADD entrypoint.sh .
RUN pip3 install .
COPY --chmod=755 <<EOF /opt/hulud_check/entrypoint.sh
#!/bin/bash
echo "Get most recent defintions"
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
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
ENTRYPOINT ["/opt/hulud_check/entrypoint.sh"]
ENTRYPOINT ["python3", "-u", "check_gitlab.py"]