Zum Inhalt springen

Downloaded script piped into a shell (ARCH10005)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

Key config.docker.pipe-to-shell · Severity warning · Category security · CWE CWE-494

curl ... | sh runs whatever the server answers, during the build, with the build’s rights, and leaves no record of what ran. The next build may run something else.

FROM debian:12.7-slim
RUN curl -fsSL https://get.example.com/install.sh | sh
USER 65534
FROM debian:12.7-slim
RUN curl -fsSLo /tmp/install.sh https://get.example.com/install.sh \
&& echo "9f86d081884c7d659a2feaa0c55ad015a3bf4f1b2b0b822cd15d6c15b0f00a08 /tmp/install.sh" | sha256sum -c - \
&& sh /tmp/install.sh
USER 65534

Download the script to a file, verify its checksum or signature, then run it.

  • A download saved to a file and run separately.