Skip to content
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/codeql-verification.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,12 @@ jobs:
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/go1.27.3.linux-amd64.tar.gz"
archive="$RUNNER_TEMP/go1.27.4.linux-amd64.tar.gz"
curl --fail --silent --show-error --location \
--output "$archive" \
'https://go.dev/dl/go1.27.3.linux-amd64.tar.gz'
'https://go.dev/dl/go1.27.4.linux-amd64.tar.gz'
printf '%s %s\n' \
'65efbc80fdc1fa2cd2631cad5b481777a68e8725f34e89f50fc6ac714e379b40' \
'7226736c2339719cda28fbf3a54d71aa63bcefe376e98cef00034268dab24840' \
"$archive" | sha256sum --check
tar -C "$RUNNER_TEMP" -xzf "$archive"
"$RUNNER_TEMP/go/bin/go" version
Expand Down
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ jobs:
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/go1.27.3.linux-amd64.tar.gz"
archive="$RUNNER_TEMP/go1.27.4.linux-amd64.tar.gz"
curl --fail --silent --show-error --location --output "$archive" \
'https://go.dev/dl/go1.27.3.linux-amd64.tar.gz'
'https://go.dev/dl/go1.27.4.linux-amd64.tar.gz'
printf '%s %s\n' \
'65efbc80fdc1fa2cd2631cad5b481777a68e8725f34e89f50fc6ac714e379b40' \
'7226736c2339719cda28fbf3a54d71aa63bcefe376e98cef00034268dab24840' \
"$archive" | sha256sum --check
tar -C "$RUNNER_TEMP" -xzf "$archive"
printf '%s\n' "$RUNNER_TEMP/go/bin" >> "$GITHUB_PATH"
Expand All @@ -72,8 +72,7 @@ jobs:
grep -Fxq "$SERVICE_IMAGE" dist/images
controller_version="$(docker run --rm --entrypoint /usr/bin/lb-controller "$SERVICE_IMAGE" --version)"
grep -F "$GITHUB_REF_NAME" <<< "$controller_version" >/dev/null
haproxy_version="$(docker run --rm --entrypoint /usr/sbin/haproxy "$SERVICE_IMAGE" -vv)"
grep -F 'HAProxy version 3.4.3' <<< "$haproxy_version" >/dev/null
bash scripts/verify-haproxy-runtime "$SERVICE_IMAGE"

- name: Scan and create release SBOMs
shell: bash
Expand Down Expand Up @@ -108,6 +107,8 @@ jobs:
-v "$PWD/$release_dir:/release" -v "$cache:/root/.cache/trivy" "$TRIVY_IMAGE" image \
--skip-db-update --offline-scan --format cyclonedx \
--output "/release/load-balancer-controller-${VERSION}-service.cdx.json" "$SERVICE_IMAGE"
python3 scripts/record-haproxy-sbom.py "$SERVICE_IMAGE" \
"$release_dir/load-balancer-controller-${VERSION}-service.cdx.json"

python3 - "$release_dir" "$VERSION" <<'PY'
import json, pathlib, sys
Expand Down
11 changes: 5 additions & 6 deletions .github/workflows/security-release-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,11 @@ jobs:
shell: bash
run: |
set -euo pipefail
archive="$RUNNER_TEMP/go1.27.3.linux-amd64.tar.gz"
archive="$RUNNER_TEMP/go1.27.4.linux-amd64.tar.gz"
curl --fail --silent --show-error --location --output "$archive" \
'https://go.dev/dl/go1.27.3.linux-amd64.tar.gz'
'https://go.dev/dl/go1.27.4.linux-amd64.tar.gz'
printf '%s %s\n' \
'65efbc80fdc1fa2cd2631cad5b481777a68e8725f34e89f50fc6ac714e379b40' \
'7226736c2339719cda28fbf3a54d71aa63bcefe376e98cef00034268dab24840' \
"$archive" | sha256sum --check
tar -C "$RUNNER_TEMP" -xzf "$archive"
export PATH="$RUNNER_TEMP/go/bin:$PATH"
Expand Down Expand Up @@ -95,9 +95,7 @@ jobs:
grep -Fxq "$SERVICE_IMAGE" dist/images
docker run --rm --entrypoint /usr/bin/lb-controller "$SERVICE_IMAGE" --version \
| grep -Fq "security-${GITHUB_SHA}"
docker run --rm --entrypoint /usr/sbin/haproxy "$SERVICE_IMAGE" -vv \
| tee evidence/haproxy-version.txt
grep -Fq 'HAProxy version 3.4.3' evidence/haproxy-version.txt
bash scripts/verify-haproxy-runtime "$SERVICE_IMAGE" | tee evidence/haproxy-version.txt
test "$(docker image inspect --format '{{.Config.User}}' "$SERVICE_IMAGE")" = '10001:10001'

- name: Scan binary and runtime image
Expand All @@ -119,6 +117,7 @@ jobs:
-v "$PWD/evidence:/evidence" -v "$cache:/root/.cache/trivy" "$TRIVY_IMAGE" image \
--skip-db-update --offline-scan --format cyclonedx \
--output /evidence/image.cdx.json "$SERVICE_IMAGE"
python3 scripts/record-haproxy-sbom.py "$SERVICE_IMAGE" evidence/image.cdx.json
python3 - <<'PY'
import json
from pathlib import Path
Expand Down
12 changes: 6 additions & 6 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ FROM docker:29.7.2-cli@sha256:000bb62ff495f986c9f5578eb67cc2cb98b91138eda81d7762
FROM ubuntu:26.04@sha256:2260313b31c8c011cd2eebe728008efac1b3982be73eb71348ea2648d2c0e09b

COPY ubuntu-apt.lock /licenses/ubuntu-apt.lock
ADD --checksum=sha256:5b6326f1932cfd7be57130561dc78192f09ed9f58bfbe6606ed0c50510c3b6cd https://archive.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.1_all.deb /tmp/ca-certificates.deb
ADD --checksum=sha256:a7e3bf769aec16ba21ca39cba180d6d311dafcbae68346a05f137c5cc26c9ca6 https://security.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.2_all.deb /tmp/ca-certificates.deb

ARG DAPPER_HOST_ARCH=amd64
ARG DOCKER_BUILDX_VERSION=0.36.1
ARG GO_VERSION=1.27.3
ARG GO_LINUX_AMD64_SHA256=65efbc80fdc1fa2cd2631cad5b481777a68e8725f34e89f50fc6ac714e379b40
ARG GO_LINUX_ARM64_SHA256=a06e99309dbcbdca1a8ccd2282c3ee146e55930886e26b4f1193269587165f49
ARG GO_VERSION=1.27.4
ARG GO_LINUX_AMD64_SHA256=7226736c2339719cda28fbf3a54d71aa63bcefe376e98cef00034268dab24840
ARG GO_LINUX_ARM64_SHA256=3392582988a273a87ab5043ee1b2c9c17a2c3c00580bf9326c47a2e0aaaeac92

ENV DEBIAN_FRONTEND=noninteractive
ENV HOST_ARCH=${DAPPER_HOST_ARCH} \
Expand All @@ -25,7 +25,7 @@ ADD --checksum=sha256:9d806b46f6dc429f156c5c53e6e2ec5bfc89302f9a441483b3249211e1
ADD --checksum=sha256:0a7ea8a52834f9b3de0f11758924f80f7a6ebcbb4b02a55ba4f457503569f55f https://security.ubuntu.com/ubuntu/pool/main/p/python3.14/python3.14-minimal_3.14.4-1ubuntu0.2_amd64.deb /opt/python-abi-security/python3.14-minimal.deb
ADD --checksum=sha256:cad2456bf3cb57cb18d2c82b48b549e5b4ac6eee9b3e14e65334209387e3d0ae https://security.ubuntu.com/ubuntu/pool/universe/p/python3.14/python3.14-venv_3.14.4-1ubuntu0.2_amd64.deb /opt/python-abi-security/python3.14-venv.deb
COPY scripts/install-python-abi-security /usr/local/bin/install-python-abi-security
ADD --checksum=sha256:5b6326f1932cfd7be57130561dc78192f09ed9f58bfbe6606ed0c50510c3b6cd https://archive.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.1_all.deb /opt/pasturestack-ca-certificates.deb
ADD --checksum=sha256:a7e3bf769aec16ba21ca39cba180d6d311dafcbae68346a05f137c5cc26c9ca6 https://security.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.2_all.deb /opt/pasturestack-ca-certificates.deb
RUN set -eux; \
. /licenses/ubuntu-apt.lock; \
rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; \
Expand Down Expand Up @@ -57,7 +57,7 @@ RUN set -eux; \
bash /usr/local/bin/install-python-abi-security && \
dpkg -i /opt/pasturestack-ca-certificates.deb && \
update-ca-certificates --fresh && \
test "$(dpkg-query -W -f='${Version}' ca-certificates)" = '20260816ubuntu0.26.04.1' && \
test "$(dpkg-query -W -f='${Version}' ca-certificates)" = '20260816ubuntu0.26.04.2' && \
test ! -e /usr/share/ca-certificates/mozilla/emSign_ECC_Root_CA_-_G3.crt && \
rm -f /opt/pasturestack-ca-certificates.deb && \
{ \
Expand Down
25 changes: 7 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,21 @@ This branch contains the compatibility runtime used by PastureStack Server to op

## Runtime image

The maintained runtime release for PastureStack HAProxy load-balancer services is `v0.9.33`:
The maintained runtime release for PastureStack HAProxy load-balancer services is `v0.9.34`. It uses HAProxy 3.4.7 with AWS-LC 5.14.0 and Lua 5.4.

```text
ghcr.io/pasturestack/load-balancer-service:v0.9.33
```

Pin deployments to its published manifest digest:

```text
ghcr.io/pasturestack/load-balancer-service@sha256:2c02ac4da2cab5308f68baca04a007b82cd192bccbd7bc38232bd210dc2c02ac
ghcr.io/pasturestack/load-balancer-service:v0.9.34
```

The image is intended to be managed by PastureStack Server, not started by itself:
the control plane supplies metadata, API credentials, service links, port rules,
and health-check configuration. Selecting this release does not itself upgrade
an existing Server installation or its load-balancer services.

[Release v0.9.33](https://github.com/PastureStack/load-balancer-controller/releases/tag/v0.9.33)
includes the controller archive, source and image SBOMs, checksums, and build
provenance. Protected CI, race tests, source contracts, image/version checks,
source/image vulnerability scans, and attestations passed for the published
artifact. The runtime uses Go 1.27.3 and zlib 1.3.2-r1.

Native PastureStack lifecycle and traffic acceptance, including dependent-service
state transitions, remains pending; the build and supply-chain checks are not a
claim that this platform-level acceptance has passed.
The [release page](https://github.com/PastureStack/load-balancer-controller/releases/tag/v0.9.34)
provides the manifest digest, controller archive, SBOMs, checksums, and build
provenance. HAProxy links AWS-LC statically. Runtime tools such as curl
use Alpine's OpenSSL packages.

## Compatibility

Expand Down Expand Up @@ -118,4 +107,4 @@ The root [`LICENSE`](LICENSE) remains authoritative. PastureStack does not claim

## October 2026 security maintenance

Maintained Go builds select the patched Go 1.27.3 compiler without raising the existing Go language requirement. Ubuntu build/runtime stages apply the checksum-pinned `ca-certificates 20260816ubuntu0.26.04.1` security package after their frozen APT baseline; the final trust store and installed version are verified. Release artifacts must pass the repository's existing checks before publication.
Maintained Go builds select the patched Go 1.27.4 compiler without raising the existing Go language requirement. Ubuntu build/runtime stages apply the checksum-pinned `ca-certificates 20260816ubuntu0.26.04.2` security package after their frozen APT baseline; the final trust store and installed version are verified. Release artifacts must pass the repository's existing checks before publication.
49 changes: 44 additions & 5 deletions package/haproxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,62 @@
ARG ALPINE_IMAGE=docker.io/library/alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b
ARG HAPROXY_VERSION=3.4.7
ARG HAPROXY_SHA256=ccfd342f3724c2cd659574044d788f44e20b212467c6bd5edbbfc517a2775dca
ARG AWS_LC_VERSION=5.14.0
ARG AWS_LC_SHA256=8895a9d2434e875e009e652a1015f9c2c275261634c7132253ca5aa60d266888

FROM ${ALPINE_IMAGE} AS haproxy-builder

COPY alpine-apk.lock /licenses/alpine-apk.lock

ARG HAPROXY_VERSION=3.4.3
ARG HAPROXY_VERSION
ARG HAPROXY_SHA256
ARG HAPROXY_SERIES=3.4
ARG HAPROXY_SHA256=7fa666d36d198275999e2a68dda44d3d37960f2f7aed3a595fb811f4fd0515b5
ARG AWS_LC_VERSION
ARG AWS_LC_SHA256

RUN set -eux; \
. /licenses/alpine-apk.lock; \
apk add --no-cache \
"musl=${ALPINE_MUSL_VERSION}" \
"musl-utils=${ALPINE_MUSL_VERSION}" \
"build-base=${ALPINE_BUILD_BASE_VERSION}" \
"cmake=${ALPINE_CMAKE_VERSION}" \
"ca-certificates=${ALPINE_CA_CERTIFICATES_VERSION}" \
"curl=${ALPINE_CURL_VERSION}" \
"linux-headers=${ALPINE_LINUX_HEADERS_VERSION}" \
"lua5.4-dev=${ALPINE_LUA5_4_DEV_VERSION}" \
"openssl-dev=${ALPINE_OPENSSL_DEV_VERSION}" \
"pcre2-dev=${ALPINE_PCRE2_DEV_VERSION}" \
"zlib-dev=${ALPINE_ZLIB_DEV_VERSION}"; \
"zlib-dev=${ALPINE_ZLIB_DEV_VERSION}"

# Use the upstream generated assembly from the verified release archive.
# A private static link leaves the distribution TLS libraries available to curl.
RUN set -eux; \
curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 --connect-timeout 10 --max-time 300 \
-o /tmp/aws-lc.tar.gz "https://codeload.github.com/aws/aws-lc/tar.gz/refs/tags/v${AWS_LC_VERSION}"; \
echo "${AWS_LC_SHA256} /tmp/aws-lc.tar.gz" | sha256sum -c -; \
mkdir /tmp/aws-lc; \
tar xzf /tmp/aws-lc.tar.gz -C /tmp/aws-lc --strip-components=1; \
cmake -S /tmp/aws-lc -B /tmp/aws-lc-build \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/opt/aws-lc -DCMAKE_INSTALL_LIBDIR=lib \
-DBUILD_SHARED_LIBS=OFF -DBUILD_TESTING=OFF -DBUILD_TOOL=OFF -DDISABLE_GO=ON -DDISABLE_PERL=ON; \
cmake --build /tmp/aws-lc-build --parallel "$(nproc)"; \
cmake --install /tmp/aws-lc-build; \
test -s /opt/aws-lc/lib/libssl.a; \
test -s /opt/aws-lc/lib/libcrypto.a; \
install -D -m 0644 /tmp/aws-lc/LICENSE /native-licenses/aws-lc/LICENSE; \
rm -rf /tmp/aws-lc /tmp/aws-lc-build /tmp/aws-lc.tar.gz

RUN set -eux; \
curl -fsSL --retry 5 --retry-all-errors --retry-delay 2 --connect-timeout 10 --max-time 300 \
-o /tmp/haproxy.tar.gz "https://www.haproxy.org/download/${HAPROXY_SERIES}/src/haproxy-${HAPROXY_VERSION}.tar.gz"; \
echo "${HAPROXY_SHA256} /tmp/haproxy.tar.gz" | sha256sum -c -; \
tar xzf /tmp/haproxy.tar.gz -C /tmp; \
make -C "/tmp/haproxy-${HAPROXY_VERSION}" -j"$(nproc)" \
TARGET=linux-musl \
USE_OPENSSL=1 \
USE_OPENSSL_AWSLC=1 \
SSL_INC=/opt/aws-lc/include \
SSL_LIB=/opt/aws-lc/lib \
USE_PCRE2=1 \
USE_PCRE2_JIT=1 \
USE_ZLIB=1 \
Expand All @@ -36,6 +65,7 @@ RUN set -eux; \
LUA_INC=/usr/include/lua5.4 \
LUA_LIB=/usr/lib/lua5.4; \
make -C "/tmp/haproxy-${HAPROXY_VERSION}" install-bin; \
install -D -m 0644 "/tmp/haproxy-${HAPROXY_VERSION}/LICENSE" /native-licenses/haproxy/LICENSE; \
mkdir -p /usr/local/share/haproxy/errors; \
cp -a "/tmp/haproxy-${HAPROXY_VERSION}"/examples/errorfiles/*.http /usr/local/share/haproxy/errors/

Expand All @@ -45,12 +75,20 @@ COPY alpine-apk.lock /licenses/alpine-apk.lock

ARG PASTURESTACK_IMAGE_VERSION=dev
ARG SOURCE_REVISION=unknown
ARG HAPROXY_VERSION
ARG HAPROXY_SHA256
ARG AWS_LC_VERSION
ARG AWS_LC_SHA256

LABEL org.opencontainers.image.source="https://github.com/PastureStack/load-balancer-controller" \
org.opencontainers.image.description="PastureStack HAProxy load-balancer service compatibility image." \
org.opencontainers.image.licenses="Apache-2.0" \
org.opencontainers.image.version="${PASTURESTACK_IMAGE_VERSION}" \
org.opencontainers.image.revision="${SOURCE_REVISION}"
org.opencontainers.image.revision="${SOURCE_REVISION}" \
org.pasturestack.haproxy.version="${HAPROXY_VERSION}" \
org.pasturestack.haproxy.source-sha256="${HAPROXY_SHA256}" \
org.pasturestack.aws-lc.version="${AWS_LC_VERSION}" \
org.pasturestack.aws-lc.source-sha256="${AWS_LC_SHA256}"

RUN set -eux; \
. /licenses/alpine-apk.lock; \
Expand All @@ -77,6 +115,7 @@ RUN set -eux; \

COPY --from=haproxy-builder /usr/local/sbin/haproxy /usr/sbin/haproxy
COPY --from=haproxy-builder /usr/local/share/haproxy/errors /etc/haproxy/errors
COPY --from=haproxy-builder /native-licenses/ /usr/share/licenses/

RUN set -eux; \
addgroup -g 10001 -S haproxy; \
Expand Down
10 changes: 5 additions & 5 deletions package/haproxy/alpine-apk.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ ALPINE_BASH_VERSION='5.3.9-r1'
ALPINE_BUILD_BASE_VERSION='0.5-r4'
ALPINE_MUSL_VERSION='1.2.6-r3'
ALPINE_CA_CERTIFICATES_VERSION='20261020-r0'
ALPINE_CURL_VERSION='8.22.0-r0'
ALPINE_CMAKE_VERSION='4.2.3-r0'
ALPINE_CURL_VERSION='8.23.0-r0'
ALPINE_LIBCRYPTO3_VERSION='3.5.9-r0'
ALPINE_LIBCAP_UTILS_VERSION='2.78-r0'
ALPINE_LIBSSL3_VERSION='3.5.9-r0'
ALPINE_LINUX_HEADERS_VERSION='7.0.0-r1'
ALPINE_LUA5_4_DEV_VERSION='5.4.8-r0'
ALPINE_LUA5_4_LIBS_VERSION='5.4.8-r0'
ALPINE_OPENSSL_DEV_VERSION='3.5.9-r0'
ALPINE_PCRE2_DEV_VERSION='10.49-r0'
ALPINE_PCRE2_VERSION='10.49-r0'
ALPINE_PROCPS_NG_VERSION='4.0.6-r0'
ALPINE_RSYSLOG_VERSION='8.2604.0-r0'
ALPINE_RSYSLOG_VERSION='8.2608.0-r0'
ALPINE_SU_EXEC_VERSION='0.3-r0'
ALPINE_TINI_VERSION='0.19.0-r3'
ALPINE_ZLIB_VERSION='1.3.2-r1'
ALPINE_ZLIB_DEV_VERSION='1.3.2-r1'
ALPINE_ZLIB_VERSION='1.4-r0'
ALPINE_ZLIB_DEV_VERSION='1.4-r0'
43 changes: 43 additions & 0 deletions scripts/record-haproxy-sbom.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
"""Record the source-built HAProxy and its statically linked AWS-LC."""
import json
from pathlib import Path
import re
import subprocess
import sys
from tempfile import TemporaryDirectory

image, filename = sys.argv[1:]
labels = json.loads(subprocess.check_output(['docker', 'image', 'inspect', '-f', '{{json .Config.Labels}}', image]))
path = Path(filename)
bom = json.loads(path.read_text(encoding='utf-8'))
root = bom['metadata']['component']['bom-ref']
components = bom['components']
dependencies = bom['dependencies']
references = []
for name, kind, purl, source in (
('haproxy', 'application', 'pkg:generic/haproxy', 'https://www.haproxy.org/download/3.4/src/haproxy-{version}.tar.gz'),
('aws-lc', 'library', 'pkg:github/aws/aws-lc', 'https://codeload.github.com/aws/aws-lc/tar.gz/refs/tags/v{version}'),
):
version = labels[f'org.pasturestack.{name}.version']
digest = labels[f'org.pasturestack.{name}.source-sha256']
assert re.fullmatch(r'\d+\.\d+\.\d+', version) and re.fullmatch(r'[0-9a-f]{64}', digest)
reference = f'{purl}@{version}'
references.append(reference)
assert all(component.get('bom-ref') != reference for component in components)
components.append({'type': kind, 'name': name, 'version': version, 'purl': reference,
'bom-ref': reference, 'externalReferences': [{
'type': 'distribution', 'url': source.format(version=version),
'hashes': [{'alg': 'SHA-256', 'content': digest}],
}]})
haproxy, aws_lc = references
root_dependency = next((entry for entry in dependencies if entry['ref'] == root), None)
if root_dependency is None:
root_dependency = {'ref': root, 'dependsOn': []}
dependencies.append(root_dependency)
root_dependency.setdefault('dependsOn', []).append(haproxy)
dependencies.extend([{'ref': haproxy, 'dependsOn': [aws_lc]}, {'ref': aws_lc, 'dependsOn': []}])
# Trivy runs in Docker and owns the file. The runner owns its parent directory.
with TemporaryDirectory(dir=path.parent) as workdir:
updated = Path(workdir) / path.name
updated.write_text(json.dumps(bom, indent=2, ensure_ascii=False) + '\n', encoding='utf-8')
updated.replace(path)
Loading
Loading