diff --git a/core/oletools/Dockerfile b/core/oletools/Dockerfile index 77d088a0..6193888f 100644 --- a/core/oletools/Dockerfile +++ b/core/oletools/Dockerfile @@ -6,9 +6,13 @@ FROM base ARG VERSION=local LABEL version=$VERSION +ARG OLEFY_SCRIPT https://raw.githubusercontent.com/HeinleinSupport/olefy/f8aac6cc55283886d153e89c8f27fae66b1c24e2/olefy.py +ARG OLEFY_SHA256 1f5aa58b78ca7917350135b4425e5ed4d580c7051aabed1952c6afd12d0345a0 + RUN set -euxo pipefail \ ; apk add --no-cache netcat-openbsd libmagic libffi \ - ; curl -sLo olefy.py https://raw.githubusercontent.com/HeinleinSupport/olefy/f8aac6cc55283886d153e89c8f27fae66b1c24e2/olefy.py \ + ; curl -sLo olefy.py $OLEFY_SCRIPT \ + ; echo "$OLEFY_SHA256 olefy.py" |sha256sum --check \ ; chmod 755 olefy.py COPY start.py / diff --git a/core/oletools/start.py b/core/oletools/start.py index 58d26cce..b0972908 100755 --- a/core/oletools/start.py +++ b/core/oletools/start.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 -import os from socrate import system system.set_env() -os.execl("/app/olefy.py", "olefy") \ No newline at end of file +with open('/app/olefy.py') as olefy: + exec(olefy.read())