Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
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
11 changes: 6 additions & 5 deletions build/tor/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# Pinned to a named minor version by digest (#135, #373). The digest is authoritative; the tag
# names the Alpine minor line (3.24) so Dependabot's patch-update policy has a real version to track.
FROM alpine:3.24@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf

ARG TOR_VERSION=0.4.9.17-r0
RUN apk add --no-cache --upgrade libcrypto3 libssl3 musl musl-utils "tor=${TOR_VERSION}" netcat-openbsd \
&& tor --version | grep -F "Tor version ${TOR_VERSION%-r*}."
ARG TOR_VERSION=0.4.9.18-r0
RUN addgroup -S -g 101 tor \
&& adduser -S -D -H -h /var/lib/tor -s /sbin/nologin -u 100 -G tor -g tor tor \
&& apk add --no-cache --upgrade busybox busybox-binsh ssl_client libcrypto3 libssl3 musl musl-utils "tor=${TOR_VERSION}" netcat-openbsd \
&& tor --version | grep -F "Tor version ${TOR_VERSION%-r*}." \
&& [ "$(id -u tor):$(id -g tor)" = 100:101 ]

COPY torrc.template /etc/tor/torrc.template
COPY entrypoint.sh /usr/local/bin/tor-entrypoint.sh
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/tor-client/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.24@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf

RUN apk add --no-cache --upgrade libcrypto3 libssl3 musl musl-utils tor curl ca-certificates
RUN apk add --no-cache --upgrade busybox busybox-binsh ssl_client libcrypto3 libssl3 musl musl-utils tor curl ca-certificates

COPY probe.sh /usr/local/bin/probe.sh
RUN chmod 0755 /usr/local/bin/probe.sh
Expand Down
2 changes: 1 addition & 1 deletion tests/netwatch/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
FROM alpine:3.24@sha256:f59abe656b692d901e184be3445e084786602108599d2a51d229c0f5a48c71bf

RUN apk add --no-cache --upgrade libcrypto3 libssl3 musl musl-utils zlib conntrack-tools tcpdump
RUN apk add --no-cache --upgrade busybox busybox-binsh ssl_client libcrypto3 libssl3 musl musl-utils zlib conntrack-tools tcpdump

ENTRYPOINT ["/usr/sbin/conntrack"]
5 changes: 4 additions & 1 deletion tests/stack/test-harness-tooling.sh
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,12 @@ assert_rc "every real healthcheck script exists where its own Dockerfile promise
echo "== unit: image builds retry apt update (#1802) =="
for image in monero p2pool xmrig-proxy; do assert_contains "image build retries apt update with delayed, bounded backoff (#1802)" "$(cat "$ROOT/build/$image/Dockerfile")" 'for attempt in 1 2 3; do apt-get update && break || { [ "$attempt" = 3 ] && exit 1; sleep "$((attempt * 5))"; }; done'; done
echo "== unit: image builds pull base security fixes past the digest pin (#3923, #3929) =="
for alpine_image in build/tor tests/integration/tor-client tests/netwatch; do assert_contains "alpine image build pulls the base's musl past the digest pin with the openssl libs (#3929)" "$(cat "$ROOT/$alpine_image/Dockerfile")" 'apk add --no-cache --upgrade libcrypto3 libssl3 musl musl-utils'; done
for alpine_image in build/tor tests/integration/tor-client tests/netwatch; do assert_contains "alpine image build pulls the base's busybox and musl past the digest pin with the openssl libs (#3929, #4676)" "$(cat "$ROOT/$alpine_image/Dockerfile")" 'apk add --no-cache --upgrade busybox busybox-binsh ssl_client libcrypto3 libssl3 musl musl-utils'; done
assert_contains "tor image pins the apk tor package to an explicit version (#4125)" "$(cat "$ROOT/build/tor/Dockerfile")" '"tor=${TOR_VERSION}"'
assert_contains "tor image build fails unless the installed tor reports the pinned version (#4125)" "$(cat "$ROOT/build/tor/Dockerfile")" 'tor --version | grep -F "Tor version ${TOR_VERSION%-r*}."'
assert_contains "tor image creates tor as 100:101 before apk can hand those ids to another package" "$(cat "$ROOT/build/tor/Dockerfile")" $'RUN addgroup -S -g 101 tor \\\n && adduser -S -D -H -h /var/lib/tor -s /sbin/nologin -u 100 -G tor -g tor tor \\\n && apk add '
assert_contains "tor image build fails unless tor is 100:101, the owner pithead gives the tor data folder" "$(cat "$ROOT/build/tor/Dockerfile")" '[ "$(id -u tor):$(id -g tor)" = 100:101 ]'
assert_contains "pithead hands the tor data folder to the same 100:101" "$(cat "$ROOT/lib/pithead/29-preserved-state-and-dirs.sh")" 'chown -R 100:101 "$TOR_DATA_DIR"'
assert_contains "netwatch build pulls the base's zlib with the rest (#3929)" "$(cat "$ROOT/tests/netwatch/Dockerfile")" 'musl musl-utils zlib'
for debian_image in dashboard os/rootfs; do assert_contains "debian image build lists zlib1g to pull its security build (#3923)" "$(cat "$ROOT/$debian_image/Dockerfile")" 'zlib1g'; done
echo "== unit: patch-coverage overlap self-test (#1000) =="
Expand Down
Loading