GeezerVison is showing github.com — build: qualify Host API 0.38.6 with Go 1.27.3 (#4) · PastureStack/host-api@67d1e58
File treeExpand file treeCollapse file tree Open diff view settings Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: .github/workflows/security-release-gate.yml +23-5Lines changed: 23 additions & 5 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 16 | 16 | runs-on: ubuntu-24.04 | 17 | 17 | timeout-minutes: 120 | 18 | 18 | env: | 19 | | - CANDIDATE_VERSION: 0.38.5 | | 19 | + CANDIDATE_VERSION: 0.38.6 | 20 | 20 | DAPPER_IMAGE: pasturestack-host-api-dapper:security-gate | 21 | 21 | TRIVY_IMAGE: ghcr.io/aquasecurity/trivy:0.73.0@sha256:7cced7cae583819fc7806d4cbc0dbbc7cad18b99f7d3e235192e6da8c091045c | 22 | 22 | COSIGN_IMAGE: ghcr.io/sigstore/cosign/cosign:v3.1.3@sha256:9e5c2f2edc34351160407ca3416c61855bdf9403c3c5936e0f0be7fc261611b8 | | 35 | 35 | set -euo pipefail | 36 | 36 | test -z "$(git status --porcelain)" | 37 | 37 | test "$(git rev-parse HEAD)" = "$GITHUB_SHA" | 38 | | - test "$(git rev-list --count d56f3d0..HEAD)" = 1 | 39 | | - test "$(git rev-list --count --merges d56f3d0..HEAD)" = 0 | | 38 | + # Exactly one reviewed maintenance commit after the existing published main. | | 39 | + test "$(git rev-list --count b124a9cce56cc3e1082d2f72434592bccb15f6ef..HEAD)" = 1 | | 40 | + test "$(git rev-list --count --merges b124a9cce56cc3e1082d2f72434592bccb15f6ef..HEAD)" = 0 | 40 | 41 | private_pattern=$(printf '%s|%s|%s' 'chen''21019' '10\.0\.0\.''125' 'C:\\''Users\\') | 41 | 42 | if git grep -n -E "$private_pattern" -- .; then | 42 | 43 | echo 'Private operator data is present in the public source tree.' >&2 | | 67 | 68 | "$DAPPER_IMAGE" bash -lc \ | 68 | 69 | 'go version -m /go/src/github.com/PastureStack/host-api/bin/host-api' \ | 69 | 70 | > evidence/host-api-go-version.txt | | 71 | + test "$(awk 'NR == 1 {print $2}' evidence/host-api-go-version.txt)" = go1.27.3 | | 72 | + grep -F 'CGO_ENABLED=0' evidence/host-api-go-version.txt | | 73 | + grep -F "vcs.revision=$GITHUB_SHA" evidence/host-api-go-version.txt | | 74 | + grep -F 'vcs.modified=false' evidence/host-api-go-version.txt | 70 | 75 | awk '$1 == "#" && ($3 ~ /^v/ || $3 ~ /^[0-9]/) { print $2 "\t" $3 }' \ | 71 | 76 | vendor/modules.txt > evidence/go-modules.tsv | 72 | 77 | test -s evidence/go-modules.tsv | @@ -140,6 +145,16 @@ jobs: | 140 | 145 | --output /evidence/source-secret-scan.json /workspace | 141 | 146 | rm -rf -- "$source_snapshot" | 142 | 147 |
| | 148 | + # Scan the delivered executable, not only the compressed outer package. | | 149 | + product_snapshot=$(mktemp -d "${RUNNER_TEMP}/host-api-product.XXXXXX") | | 150 | + tar --no-same-owner -xzf "dist/artifacts/host-api-${CANDIDATE_VERSION}.tar.gz" -C "$product_snapshot" | | 151 | + product_binary=$(find "$product_snapshot" -type f -path '*/bin/host-api') | | 152 | + test -n "$product_binary" | | 153 | + test "$(find "$product_snapshot" -type f -path '*/bin/host-api' | wc -l)" = 1 | | 154 | + cmp evidence/host-api-linux-amd64 "$product_binary" | | 155 | + (cd "$product_snapshot"; sha256sum -c */SHA256SUMSSUM; sha256sum -c */SHA256SUMS) | | 156 | + test "$("$product_binary" --version)" = "$CANDIDATE_VERSION" | | 157 | +
| 143 | 158 | docker run --rm \ | 144 | 159 | -v "$TRIVY_CACHE:/root/.cache/trivy" \ | 145 | 160 | "$TRIVY_IMAGE" image --cache-dir /root/.cache/trivy --download-db-only | @@ -152,11 +167,14 @@ jobs: | 152 | 167 | --output /evidence/source-vulnerability-scan.json /workspace | 153 | 168 | docker run --rm --network none \ | 154 | 169 | -v "$TRIVY_CACHE:/root/.cache/trivy" \ | 155 | | - -v "$GITHUB_WORKSPACE/dist/artifacts:/artifacts:ro" \ | | 170 | + -v "$product_snapshot:/artifacts:ro" \ | 156 | 171 | -v "$GITHUB_WORKSPACE/evidence:/evidence" \ | 157 | | - "$TRIVY_IMAGE" fs --cache-dir /root/.cache/trivy --skip-db-update --offline-scan \ | | 172 | + "$TRIVY_IMAGE" rootfs --cache-dir /root/.cache/trivy --skip-db-update --offline-scan \ | 158 | 173 | --scanners vuln,secret --severity CRITICAL,HIGH --format json \ | 159 | 174 | --output /evidence/artifact-scan.json /artifacts | | 175 | + jq -e '[.Results[]? | select(.Type == "gobinary" and (.Target | endswith("/bin/host-api")))] | length == 1' \ | | 176 | + evidence/artifact-scan.json >/dev/null | | 177 | + rm -rf -- "$product_snapshot" | 160 | 178 | docker run --rm --network none \ | 161 | 179 | -v /var/run/docker.sock:/var/run/docker.sock \ | 162 | 180 | -v "$TRIVY_CACHE:/root/.cache/trivy" \ | |
Collapse file Copy file name to clipboardExpand all lines: .gitignore +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
| 2 | 2 | /bin/ | 3 | 3 | /host-api | 4 | 4 | /dist/ | | 5 | +/evidence/ | 5 | 6 | /gopath/ | 6 | 7 |
| 7 | 8 | *.sw[mnop] | |
Collapse file Copy file name to clipboardExpand all lines: COMPATIBILITY.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ Preferred settings use `platform-*` names. Historical `cattle-*` flags, legacy D | 6 | 6 |
| 7 | 7 | Operator lifecycle messages support `en-US` and `zh-TW`. HTTP response bodies, log streams, statistics payloads, Docker output, identifiers, and protocol errors are not translated. | 8 | 8 |
| 9 | | -The current candidate is `0.38.5`, built with Go 1.27.2 on a digest-pinned Ubuntu 26.04 image and an exact Ubuntu package snapshot. Server packaging consumes `host-api-0.38.5.tar.gz`; its filename, executable layout, architecture, legacy SHA-1 compatibility files, and SHA-256 integrity files are release contracts. Product versions must remain pure numeric `MAJOR.MINOR.PATCH` values without branding or maintenance suffixes. | | 9 | +The source package version is `0.38.6`, built with Go 1.27.3 on a digest-pinned Ubuntu 26.04 image, a frozen bootstrap package snapshot, and checksum-pinned official security fixes. The final builder inventory records installed versions separately from the bootstrap lock. A published package must retain its reviewed producer revision, byte-identical packaging evidence, and successful security checks of the unpacked binary. Server packaging consumes `host-api-0.38.6.tar.gz`; its filename, executable layout, architecture, legacy SHA-1 compatibility files, and SHA-256 integrity files are release contracts. Product versions must remain pure numeric `MAJOR.MINOR.PATCH` values without branding or maintenance suffixes. | 10 | 10 |
| 11 | 11 | Before release, validate token acquisition, event forwarding, logs, stats, exec, console, Docker socket proxy, container proxy, disabled-proxy behavior, key parsing, and restart behavior. | 12 | 12 |
| |
Collapse file Copy file name to clipboardExpand all lines: Dockerfile.dapper +34-3Lines changed: 34 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -6,9 +6,9 @@ COPY --from=snapshot-ca-certificates /etc/ssl/certs/ca-certificates.crt /etc/ssl | 6 | 6 | COPY package/ubuntu-apt.lock /licenses/ubuntu-apt.lock | 7 | 7 |
| 8 | 8 | ARG DAPPER_HOST_ARCH=amd64 | 9 | | -ARG GO_VERSION=1.27.2 | 10 | | -ARG GO_SHA256_amd64=ecbadb99091a3f46e31f5f934b068b1864eafa7995211b39eaddf76996045fe5 | 11 | | -ARG GO_SHA256_arm=e25a174051d8675f87ac720aedcd25bf89ac652c4b82f26aa47919524725ed95 | | 9 | +ARG GO_VERSION=1.27.3 | | 10 | +ARG GO_SHA256_amd64=65efbc80fdc1fa2cd2631cad5b481777a68e8725f34e89f50fc6ac714e379b40 | | 11 | +ARG GO_SHA256_arm=d6f4e11dd7157030d7ac11c51c8f73201a2db932d593c3106b1da11cc32bfdf8 | 12 | 12 |
| 13 | 13 | ENV DEBIAN_FRONTEND=noninteractive | 14 | 14 | ENV HOST_ARCH=${DAPPER_HOST_ARCH} \ | @@ -25,6 +25,16 @@ ENV HOST_ARCH=${DAPPER_HOST_ARCH} \ | 25 | 25 |
| 26 | 26 | SHELL ["/bin/bash", "-o", "pipefail", "-c"] | 27 | 27 |
| | 28 | +# Official fixed packages overlay the frozen bootstrap snapshot at build time. | | 29 | +# Keep both original bootstrap locks and the final installed inventory. | | 30 | +ADD --checksum=sha256:2c418a61d7165d0cde01d9cb05ae025cc41fc75ef6d3f095996bd045ba0945dc https://security.ubuntu.com/ubuntu/pool/main/c/curl/curl_8.18.0-1ubuntu2.8_amd64.deb /tmp/curl.deb | | 31 | +ADD --checksum=sha256:8db913e1fa5a694ca6ba7b828bd18c5204e6853ac07fe7ed9c6e1f94e3444d8e https://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl3t64-gnutls_8.18.0-1ubuntu2.8_amd64.deb /tmp/libcurl3t64-gnutls.deb | | 32 | +ADD --checksum=sha256:7c0b37592f83a629cc22f0c98effa176da9edbd6d77b3f38184a9d0ddc5e0266 https://security.ubuntu.com/ubuntu/pool/main/c/curl/libcurl4t64_8.18.0-1ubuntu2.8_amd64.deb /tmp/libcurl4t64.deb | | 33 | +ADD --checksum=sha256:3ff73e121f6cd4f19e80ab4329dfd914108b3936c9db3708200203a9b245b34d https://security.ubuntu.com/ubuntu/pool/main/o/openssl/libssl3t64_3.5.5-1ubuntu3.7_amd64.deb /tmp/libssl3t64.deb | | 34 | +ADD --checksum=sha256:6965aafe69e0a49ef34d2e26f8e83d09d1c6037b7e9ee37f19b292a3c6851621 https://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl_3.5.5-1ubuntu3.7_amd64.deb /tmp/openssl.deb | | 35 | +ADD --checksum=sha256:51cf418571059831096abd40e0bd5debaa1ae48a6f8d87d9e4e5f7f12aa4db52 https://security.ubuntu.com/ubuntu/pool/main/o/openssl/openssl-provider-legacy_3.5.5-1ubuntu3.7_amd64.deb /tmp/openssl-provider-legacy.deb | | 36 | +ADD --checksum=sha256:0498bc9510149ef06abd6c09b8932e43c5bc71b68634b4b8f84488b2e0a20e82 https://security.ubuntu.com/ubuntu/pool/main/l/linux/linux-libc-dev_7.0.0-38.38_amd64.deb /tmp/linux-libc-dev.deb | | 37 | + | 28 | 38 | RUN set -eux; \ | 29 | 39 | . /licenses/ubuntu-apt.lock; \ | 30 | 40 | find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) -exec sed -i \ | @@ -50,6 +60,27 @@ RUN set -eux; \ | 50 | 60 | runc="${UBUNTU_APT_RUNC_VERSION}" \ | 51 | 61 | tar="${UBUNTU_APT_TAR_VERSION}" \ | 52 | 62 | xz-utils="${UBUNTU_APT_XZ_UTILS_VERSION}"; \ | | 63 | + for package in curl libcurl3t64-gnutls libcurl4t64 libssl3t64 openssl openssl-provider-legacy linux-libc-dev; do \ | | 64 | + case "$package" in \ | | 65 | + curl|libcurl*) expected=8.18.0-1ubuntu2.8 ;; \ | | 66 | + linux-libc-dev) expected=7.0.0-38.38 ;; \ | | 67 | + *) expected=3.5.5-1ubuntu3.7 ;; \ | | 68 | + esac; \ | | 69 | + test "$(dpkg-deb -f "/tmp/${package}.deb" Package)" = "$package"; \ | | 70 | + test "$(dpkg-deb -f "/tmp/${package}.deb" Version)" = "$expected"; \ | | 71 | + test "$(dpkg-deb -f "/tmp/${package}.deb" Architecture)" = amd64; \ | | 72 | + done; \ | | 73 | + dpkg -i /tmp/curl.deb /tmp/libcurl3t64-gnutls.deb /tmp/libcurl4t64.deb \ | | 74 | + /tmp/libssl3t64.deb /tmp/openssl.deb /tmp/openssl-provider-legacy.deb /tmp/linux-libc-dev.deb; \ | | 75 | + for package in curl libcurl3t64-gnutls libcurl4t64 libssl3t64 openssl openssl-provider-legacy linux-libc-dev; do \ | | 76 | + case "$package" in \ | | 77 | + curl|libcurl*) expected=8.18.0-1ubuntu2.8 ;; \ | | 78 | + linux-libc-dev) expected=7.0.0-38.38 ;; \ | | 79 | + *) expected=3.5.5-1ubuntu3.7 ;; \ | | 80 | + esac; \ | | 81 | + test "$(dpkg-query -W -f='${Version}' "$package")" = "$expected"; \ | | 82 | + rm -f "/tmp/${package}.deb"; \ | | 83 | + done; \ | 53 | 84 | { \ | 54 | 85 | printf 'snapshot\t%s\n' "${UBUNTU_APT_SNAPSHOT}"; \ | 55 | 86 | dpkg-query -W -f='${binary:Package}\t${Version}\n' | LC_ALL=C sort; \ | |
Collapse file Copy file name to clipboardExpand all lines: README.md +1-1Lines changed: 1 addition & 1 deletion - Display the source diff
- Display the rich diff
| Original file line number | Diff line number | Diff line change |
|---|
@@ -6,7 +6,7 @@ PastureStack is an independent community effort to preserve, audit, and moderniz | 6 | 6 |
| 7 | 7 | ## Capabilities | 8 | 8 |
| 9 | | -The source package version is `0.38.5`. Target-bound API Key tickets require matching Engine introspection at handshake and during logs, exec, and statistics streams. Revocation or expiry closes the stream; it does not stop its container or kill an already started exec process. Legacy and full-without-expiry tokens retain their authentication contract. | | 9 | +The source package version is `0.38.6`, built with Go 1.27.3. Use a published release only after its source, reproducibility, vulnerability, and packaged-binary checks pass; a source version is not publication evidence. Target-bound API Key tickets require matching Engine introspection at handshake and during logs, exec, and statistics streams. Revocation or expiry closes the stream; it does not stop its container or kill an already started exec process. Legacy and full-without-expiry tokens retain their authentication contract. | 10 | 10 |
| 11 | 11 | The authenticated backend connection declares the exact `key-audit-v1,key-delegation-v1` capabilities. A compatible Proxy requires that declaration for every verified API Key stream, including full keys, so an older embedded backend cannot bypass terminal audit. Ordinary non-Key streams retain their existing backend compatibility. | 12 | 12 |
| |
Collapse file Copy file name to clipboardExpand all lines: go.mod +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -2,7 +2,7 @@ module github.com/PastureStack/host-api | 2 | 2 |
| 3 | 3 | go 1.26.0 | 4 | 4 |
| 5 | | -toolchain go1.27.2 | | 5 | +toolchain go1.27.3 | 6 | 6 |
| 7 | 7 | require ( | 8 | 8 | github.com/PastureStack/websocket-proxy v0.23.13-0.20260809214500-903576e1d20a | @@ -15,6 +15,7 @@ require ( | 15 | 15 | github.com/sirupsen/logrus v1.10.2 | 16 | 16 | github.com/vishvananda/netlink v1.3.1 | 17 | 17 | github.com/vishvananda/netns v0.0.5 | | 18 | + golang.org/x/sys v0.47.0 | 18 | 19 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c | 19 | 20 | ) | 20 | 21 |
| @@ -59,6 +60,5 @@ require ( | 59 | 60 | go.opentelemetry.io/otel v1.45.0 // indirect | 60 | 61 | go.opentelemetry.io/otel/metric v1.45.0 // indirect | 61 | 62 | go.opentelemetry.io/otel/trace v1.45.0 // indirect | 62 | | - golang.org/x/sys v0.47.0 // indirect | 63 | 63 | pgregory.net/rapid v1.3.0 // indirect | 64 | 64 | ) |
Collapse file Copy file name to clipboardExpand all lines: scripts/build +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ if [ -f ./build/bootstrap.envs ];then | 8 | 8 | . ./build/bootstrap.envs | 9 | 9 | fi | 10 | 10 |
| 11 | | -BUILD_VERSION=${VERSION_OVERRIDE:-0.38.5} | | 11 | +BUILD_VERSION=${VERSION_OVERRIDE:-0.38.6} | 12 | 12 | BUILD_VERSION=${BUILD_VERSION#v} | 13 | 13 | if [[ ! "$BUILD_VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then | 14 | 14 | echo 'VERSION_OVERRIDE must use MAJOR.MINOR.PATCH with no suffix' >&2 | |
Collapse file Copy file name to clipboardExpand all lines: scripts/package +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -8,7 +8,7 @@ cd "$(dirname "$0")/.." | 8 | 8 | ARCH=${ARCH:?"ARCH not set"} | 9 | 9 | SUFFIX="" | 10 | 10 | [ "${ARCH}" != "amd64" ] && SUFFIX="_${ARCH}" | 11 | | -RELEASE_VERSION=${VERSION_OVERRIDE:-v0.38.5} | | 11 | +RELEASE_VERSION=${VERSION_OVERRIDE:-v0.38.6} | 12 | 12 | RELEASE_VERSION=${RELEASE_VERSION#v} | 13 | 13 | CONTENT=${PASTURESTACK_PACKAGE_ID:-$(git rev-parse --short=32 HEAD)} | 14 | 14 | SOURCE_DATE_EPOCH=${SOURCE_DATE_EPOCH:-$(git show -s --format=%ct HEAD)} | |
|