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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
timeout-minutes: 150
env:
SERVICE_NAME: ghcr.io/pasturestack/load-balancer-service
TRIVY_IMAGE: ghcr.io/aquasecurity/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969
TRIVY_IMAGE: ghcr.io/aquasecurity/trivy:0.76.2@sha256:8f6bb947dbc528902e11f2f5be52f7b519f6a39d5d148f41166f2040499768fb
steps:
- name: Check out immutable tag
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-release-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
timeout-minutes: 120
env:
SERVICE_IMAGE: local/pasturestack/load-balancer-service:security-${{ github.sha }}
TRIVY_IMAGE: ghcr.io/aquasecurity/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969
TRIVY_IMAGE: ghcr.io/aquasecurity/trivy:0.76.2@sha256:8f6bb947dbc528902e11f2f5be52f7b519f6a39d5d148f41166f2040499768fb
VERSION_OVERRIDE: security-${{ github.sha }}
steps:
- name: Check out candidate
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,34 @@ 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.35`. It uses HAProxy 3.4.8 with AWS-LC 5.14.0 and Lua 5.4.8.
The maintained runtime release for PastureStack HAProxy load-balancer services is `v0.9.36`. It uses HAProxy 3.4.9 with AWS-LC 5.15.0 and Lua 5.4.8.

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

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.

The [release page](https://github.com/PastureStack/load-balancer-controller/releases/tag/v0.9.35)
The [release page](https://github.com/PastureStack/load-balancer-controller/releases/tag/v0.9.36)
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.

HAProxy 3.4.8 stays on the 3.4 LTS series. Its source archive is pinned to
SHA-256 `024bd521a6cbbe32b426853147e6bbd6a89b107c5a34144846193fee5b7c6ed1`,
as published in the [upstream checksum](https://www.haproxy.org/download/3.4/src/haproxy-3.4.8.tar.gz.sha256).
HAProxy 3.4.9 stays on the 3.4 LTS series. Its source archive is pinned to
SHA-256 `896c55b6029ec2a841617e92a327a335f36a8968e7d51a47eada159673c2f320`,
as published in the [upstream checksum](https://www.haproxy.org/download/3.4/src/haproxy-3.4.9.tar.gz.sha256).
The [upstream changelog](https://www.haproxy.org/download/3.4/src/CHANGELOG)
includes HTTP message handling, graceful-stop, TLS, and Lua fixes. The
AWS-LC and Lua versions, controller behavior, and startup interface are unchanged.
includes HTTP message handling, graceful-stop, TLS, and Lua fixes. AWS-LC is updated to 5.15.0 from its checksum-pinned upstream archive.
Lua 5.4.8, controller behavior, startup arguments and distribution OpenSSL remain
compatible; the private AWS-LC static link does not replace system TLS libraries.

Gorilla WebSocket uses the upstream crypto/rand mask-key fix at
`v1.5.4-0.20240701034025-d67f41855da4` (GO-2026-6278). The signed Alpine
rsyslog packages are updated to 8.2610.0-r1; logging startup and TLS remain
covered by the runtime checks.

## Compatibility

Expand Down
7 changes: 5 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,12 @@ module github.com/PastureStack/load-balancer-controller
go 1.27

require (
github.com/gorilla/websocket v1.5.3
github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4
github.com/sirupsen/logrus v1.10.2
github.com/urfave/cli/v3 v3.11.0
)

require golang.org/x/sys v0.47.0 // indirect
require (
golang.org/x/net v0.63.0 // indirect
golang.org/x/sys v0.50.0 // indirect
)
10 changes: 6 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4 h1:PYKzliEgITjLJoJqbV90S0YRaG8LNAsICH6fp6MApC0=
github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA=
github.com/sirupsen/logrus v1.10.2 h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBBo=
github.com/sirupsen/logrus v1.10.2/go.mod h1:SLEg8TqYulVKKfIGHldVp2K2aYz2DKSVBq4g/H5bR7Q=
github.com/stretchr/testify v1.12.1 h1:EuwCh5fleGS7H32xRwO3wRGT7DxrDhLAT6FF8MpWDWE=
Expand All @@ -8,5 +8,7 @@ github.com/urfave/cli/v3 v3.11.0 h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q=
github.com/urfave/cli/v3 v3.11.0/go.mod h1:ysVLtOEmg2tOy6PknnYVhDoouyC/6N42TMeoMzskhso=
go.yaml.in/yaml/v3 v3.0.5 h1:N6y/pJk8buWs9NY5ERU2HSMfm+IuD/OtfdAnq6kESPw=
go.yaml.in/yaml/v3 v3.0.5/go.mod h1:HVTZu1O7/Vkt2N+BFy8Zza+lnLsABggaTM2ZpNIGuKg=
golang.org/x/sys v0.47.0 h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs=
golang.org/x/sys v0.47.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw=
golang.org/x/net v0.63.0 h1:HCoTmNh9EpD1PpK8gBNFY4gcTY4N+KQEO8ylfIKqFJ0=
golang.org/x/net v0.63.0/go.mod h1:15JLg3IX1bLjHK264EZQEbIpTiR/KVLuo9CTRWd0pig=
golang.org/x/sys v0.50.0 h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs=
golang.org/x/sys v0.50.0/go.mod h1:hNLxWAXmnKAxqDtdwIYC4bM9oQPEecfsnNMuSxOs3og=
8 changes: 4 additions & 4 deletions package/haproxy/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG ALPINE_IMAGE=docker.io/library/alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b
ARG HAPROXY_VERSION=3.4.8
ARG HAPROXY_SHA256=024bd521a6cbbe32b426853147e6bbd6a89b107c5a34144846193fee5b7c6ed1
ARG AWS_LC_VERSION=5.14.0
ARG AWS_LC_SHA256=8895a9d2434e875e009e652a1015f9c2c275261634c7132253ca5aa60d266888
ARG HAPROXY_VERSION=3.4.9
ARG HAPROXY_SHA256=896c55b6029ec2a841617e92a327a335f36a8968e7d51a47eada159673c2f320
ARG AWS_LC_VERSION=5.15.0
ARG AWS_LC_SHA256=66e7132566cf2356b16ae79a9b57ea7a75ad6d65a41408753b08569c7db02921

FROM ${ALPINE_IMAGE} AS haproxy-builder

Expand Down
2 changes: 1 addition & 1 deletion package/haproxy/alpine-apk.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ ALPINE_LUA5_4_LIBS_VERSION='5.4.8-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.2608.0-r0'
ALPINE_RSYSLOG_VERSION='8.2610.0-r1'
ALPINE_SU_EXEC_VERSION='0.3-r0'
ALPINE_TINI_VERSION='0.19.0-r3'
ALPINE_ZLIB_VERSION='1.4-r0'
Expand Down
16 changes: 9 additions & 7 deletions scripts/supply-chain-check
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -euo pipefail
root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
cd "${root_dir}"

python3 scripts/verify-supply-chain-lock.py

require_text() {
grep -Fq -- "$2" "$1" || { printf 'Missing required pin in %s: %s\n' "$1" "$2" >&2; exit 1; }
}
Expand All @@ -12,16 +14,16 @@ require_text() {
go mod verify
go list -mod=vendor ./... >/dev/null
require_text go.mod 'go 1.27'
require_text go.mod 'github.com/gorilla/websocket v1.5.3'
require_text go.mod 'github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4'
require_text go.mod 'github.com/sirupsen/logrus v1.10.2'
require_text go.mod 'github.com/urfave/cli/v3 v3.11.0'
require_text go.mod 'golang.org/x/sys v0.47.0'
require_text go.mod 'golang.org/x/sys v0.50.0'
require_text Dockerfile.dapper 'ARG GO_VERSION=1.27.4'
require_text Dockerfile.dapper 'FROM docker:29.7.2-cli@sha256:000bb62ff495f986c9f5578eb67cc2cb98b91138eda81d7762d5371eb8a497fe AS docker-cli'
require_text package/haproxy/Dockerfile 'ARG HAPROXY_VERSION=3.4.8'
require_text package/haproxy/Dockerfile 'ARG HAPROXY_SHA256=024bd521a6cbbe32b426853147e6bbd6a89b107c5a34144846193fee5b7c6ed1'
require_text package/haproxy/Dockerfile 'ARG AWS_LC_VERSION=5.14.0'
require_text package/haproxy/Dockerfile 'ARG AWS_LC_SHA256=8895a9d2434e875e009e652a1015f9c2c275261634c7132253ca5aa60d266888'
require_text package/haproxy/Dockerfile 'ARG HAPROXY_VERSION=3.4.9'
require_text package/haproxy/Dockerfile 'ARG HAPROXY_SHA256=896c55b6029ec2a841617e92a327a335f36a8968e7d51a47eada159673c2f320'
require_text package/haproxy/Dockerfile 'ARG AWS_LC_VERSION=5.15.0'
require_text package/haproxy/Dockerfile 'ARG AWS_LC_SHA256=66e7132566cf2356b16ae79a9b57ea7a75ad6d65a41408753b08569c7db02921'
require_text package/haproxy/Dockerfile 'USE_OPENSSL_AWSLC=1'
require_text package/haproxy/Dockerfile 'LUA_INC=/usr/include/lua5.4'
require_text package/haproxy/Dockerfile 'ARG ALPINE_IMAGE=docker.io/library/alpine:3.24@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b'
Expand All @@ -33,7 +35,7 @@ require_text package/haproxy/Dockerfile '"zlib=${ALPINE_ZLIB_VERSION}"'
require_text package/haproxy/alpine-apk.lock "ALPINE_ZLIB_VERSION='1.4-r0'"
require_text package/haproxy/Dockerfile 'TARGET=linux-musl'
require_text package/haproxy/Dockerfile '"tini=${ALPINE_TINI_VERSION}"'
require_text .github/workflows/security-release-gate.yml 'TRIVY_IMAGE: ghcr.io/aquasecurity/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969'
require_text .github/workflows/security-release-gate.yml 'TRIVY_IMAGE: ghcr.io/aquasecurity/trivy:0.76.2@sha256:8f6bb947dbc528902e11f2f5be52f7b519f6a39d5d148f41166f2040499768fb'

for obsolete in controller/kubernetes controller/rancherglb provider/rancher package/rancher examples trash.conf vendor.lock; do
[[ ! -e "${obsolete}" ]] || { printf 'Obsolete compatibility surface remains: %s\n' "${obsolete}" >&2; exit 1; }
Expand Down
7 changes: 5 additions & 2 deletions scripts/vendor-licenses
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ mkdir -p "${output_dir}"

manifest="${output_dir}/manifest.tsv"
printf 'module\tversion\tlicense_path\tsha256\n' > "${manifest}"
module_count=0
while IFS=$'\t' read -r module version; do
source_dir="${root_dir}/vendor/${module}"
[[ -d "${source_dir}" && ! -L "${source_dir}" ]]
Expand All @@ -23,7 +24,9 @@ while IFS=$'\t' read -r module version; do
found=$((found + 1))
done < <(find "${source_dir}" -maxdepth 1 -type f \( -iname 'LICENSE*' -o -iname 'NOTICE*' -o -iname 'COPYING*' \) -print0 | LC_ALL=C sort -z)
[[ "${found}" -gt 0 ]] || { printf 'No vendored license for %s\n' "${module}" >&2; exit 1; }
module_count=$((module_count + 1))
done < <(awk '/^# [^=]/ { print $2 "\t" $3 }' "${root_dir}/vendor/modules.txt")

[[ "$(wc -l < "${manifest}")" -eq 5 ]]
printf 'Vendored license bundle created for 4 modules.\n'
[[ "${module_count}" -gt 0 ]]
[[ "$(awk -F '\t' 'NR > 1 { seen[$1]=1 } END { print length(seen) }' "${manifest}")" -eq "${module_count}" ]]
printf 'Vendored license bundle created for %s modules.\n' "${module_count}"
35 changes: 35 additions & 0 deletions scripts/verify-supply-chain-lock.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
"""Reject a lock manifest that disagrees with the actual build inputs."""
import csv
from pathlib import Path
import re


def verify(root):
rows = {r['name']: r for r in csv.DictReader((root / 'supply-chain.lock').open(), delimiter='\t')}
dockerfile = (root / 'package/haproxy/Dockerfile').read_text()
builder = (root / 'Dockerfile.dapper').read_text()
for name, prefix in (('haproxy', 'HAPROXY'), ('aws-lc', 'AWS_LC')):
version = re.search(r'^ARG ' + prefix + r'_VERSION=(\S+)$', dockerfile, re.M)[1]
sha = re.search(r'^ARG ' + prefix + r'_SHA256=([0-9a-f]{64})$', dockerfile, re.M)[1]
row = rows[name]
assert row['version'] == version, name + ' lock version drift'
assert row['integrity'] == 'sha256:' + sha, name + ' lock checksum drift'
assert version in row['locator'], name + ' source URL drift'
go_version = re.search(r'^ARG GO_VERSION=(\S+)$', builder, re.M)[1]
for arch in ('amd64', 'arm64'):
row = rows['go-linux-' + arch]
sha = re.search(r'^ARG GO_LINUX_' + arch.upper() + r'_SHA256=(\S+)$', builder, re.M)[1]
assert row['version'] == go_version and row['integrity'] == 'sha256:' + sha, 'Go lock drift: ' + arch
scanner = rows['trivy']
reference = 'ghcr.io/aquasecurity/trivy:' + scanner['version'] + '@' + scanner['integrity']
for workflow in ('release.yml', 'security-release-gate.yml'):
assert 'TRIVY_IMAGE: ' + reference in (root / '.github/workflows' / workflow).read_text(), 'Scanner lock drift'
sums = set((root / 'go.sum').read_text().splitlines())
for module, version in re.findall(r'^\s*((?:github\.com|golang\.org)/\S+)\s+(v\S+)', (root / 'go.mod').read_text(), re.M):
row = rows[module]
assert row['version'] == version and module + ' ' + version + ' ' + row['integrity'] in sums, 'Module lock drift: ' + module


if __name__ == '__main__':
verify(Path(__file__).resolve().parents[1])
print('SUPPLY_CHAIN_LOCK_MATCHES_BUILD_INPUTS')
16 changes: 9 additions & 7 deletions supply-chain.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
kind name version locator integrity usage
archive go-linux-amd64 1.27.3 https://go.dev/dl/go1.27.3.linux-amd64.tar.gz sha256:65efbc80fdc1fa2cd2631cad5b481777a68e8725f34e89f50fc6ac714e379b40 dapper
archive go-linux-arm64 1.27.3 https://go.dev/dl/go1.27.3.linux-arm64.tar.gz sha256:a06e99309dbcbdca1a8ccd2282c3ee146e55930886e26b4f1193269587165f49 dapper
archive haproxy 3.4.3 https://www.haproxy.org/download/3.4/src/haproxy-3.4.3.tar.gz sha256:7fa666d36d198275999e2a68dda44d3d37960f2f7aed3a595fb811f4fd0515b5 load-balancer-service
archive go-linux-amd64 1.27.4 https://go.dev/dl/go1.27.4.linux-amd64.tar.gz sha256:7226736c2339719cda28fbf3a54d71aa63bcefe376e98cef00034268dab24840 dapper
archive go-linux-arm64 1.27.4 https://go.dev/dl/go1.27.4.linux-arm64.tar.gz sha256:3392582988a273a87ab5043ee1b2c9c17a2c3c00580bf9326c47a2e0aaaeac92 dapper
archive haproxy 3.4.9 https://www.haproxy.org/download/3.4/src/haproxy-3.4.9.tar.gz sha256:896c55b6029ec2a841617e92a327a335f36a8968e7d51a47eada159673c2f320 load-balancer-service
archive ubuntu-ca-certificates-deb 20260816ubuntu0.26.04.1 https://archive.ubuntu.com/ubuntu/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.1_all.deb sha256:5b6326f1932cfd7be57130561dc78192f09ed9f58bfbe6606ed0c50510c3b6cd dapper,load-balancer-service
module github.com/gorilla/websocket v1.5.3 https://github.com/gorilla/websocket h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg= vendor
module github.com/sirupsen/logrus v1.10.1 https://github.com/sirupsen/logrus h1:xi4336Zh11WpU14fXR6I67V3yaTPQYwRx2WEtHbRg4Q= vendor
module github.com/gorilla/websocket v1.5.4-0.20240701034025-d67f41855da4 https://github.com/gorilla/websocket h1:PYKzliEgITjLJoJqbV90S0YRaG8LNAsICH6fp6MApC0= vendor
module github.com/sirupsen/logrus v1.10.2 https://github.com/sirupsen/logrus h1:G2SED73/qrAu6YwbdxOD6peLkCBI3z7L+ykJFTXJBBo= vendor
module github.com/urfave/cli/v3 v3.11.0 https://github.com/urfave/cli h1:P/euJp99kb9p0tlVY+iYTLYYTAQlfl0hR2gUO1Img1Q= vendor
module golang.org/x/sys v0.47.0 https://go.googlesource.com/sys h1:o7XGOvZQCADBQQ4Y7VNq2dRWQR7JmOUW8Kxx4ZsNgWs= vendor
module golang.org/x/sys v0.50.0 https://go.googlesource.com/sys h1:dkKZEFTEKaLr1sjhs0WiKqoi8Jj5nHbS3Njmx1UoMJs= vendor
oci docker-cli 29.7.2-cli docker.io/library/docker sha256:000bb62ff495f986c9f5578eb67cc2cb98b91138eda81d7762d5371eb8a497fe dapper
oci nginx 1.30.4-alpine docker.io/library/nginx sha256:97d490c12ba55b4946b01546d1c3ed324e8d41ab1c9fcb2a616aa470620e5b46 examples
oci ubuntu 26.04 docker.io/library/ubuntu sha256:2260313b31c8c011cd2eebe728008efac1b3982be73eb71348ea2648d2c0e09b dapper,load-balancer-service
Expand All @@ -17,4 +17,6 @@ action actions-checkout 7.0.1 https://github.com/actions/checkout commit:3d3c42e
action actions-upload-artifact 7.0.1 https://github.com/actions/upload-artifact commit:043fb46d1a93c77aae656e7c1c64a875d1fc6a0a ci
action github-codeql-action 4.37.8 https://github.com/github/codeql-action commit:db488ddef3bf6cb639b32c2e9a7c0a7ea8271d28 security-gate
action actions-attest-build-provenance 4.2.2 https://github.com/actions/attest-build-provenance commit:4d101475d8b20a2381f78447822ac1eab6504dd8 release
oci trivy 0.74.0 ghcr.io/aquasecurity/trivy sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969 security-gate
oci trivy 0.76.2 ghcr.io/aquasecurity/trivy sha256:8f6bb947dbc528902e11f2f5be52f7b519f6a39d5d148f41166f2040499768fb security-gate
archive aws-lc 5.15.0 https://codeload.github.com/aws/aws-lc/tar.gz/refs/tags/v5.15.0 sha256:66e7132566cf2356b16ae79a9b57ea7a75ad6d65a41408753b08569c7db02921 load-balancer-service
module golang.org/x/net v0.63.0 https://pkg.go.dev/golang.org/x/net h1:HCoTmNh9EpD1PpK8gBNFY4gcTY4N+KQEO8ylfIKqFJ0= vendor
11 changes: 5 additions & 6 deletions vendor/github.com/gorilla/websocket/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading