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
44 changes: 44 additions & 0 deletions .github/dapper-unfixed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3901,6 +3901,50 @@
"officialEvidence": "https://ubuntu.com/security/CVE-2026-82560",
"reason": "Ubuntu26.04 remains vulnerable without a released fix. Exact Dapper build-only package; Trivy Ubuntu severity MEDIUM. Upstream CVSS7.5 remains disclosed.",
"checkedAt": "2026-11-05"
},
{
"package": "libpython3.14-minimal",
"purl": "pkg:deb/ubuntu/libpython3.14-minimal@3.14.4-1ubuntu0.2?arch=amd64&distro=ubuntu-26.04",
"checkedAt": "2026-11-08",
"status": "no_official_fix",
"id": "CVE-2026-7210",
"severity": "MEDIUM",
"reason": "Canonical Ubuntu 26.04 Python 3.14 status is Vulnerable with no official fixed resolute package (official page updated 2026-11-06, verified by the release owner on 2026-11-08). Upstream repair depends on libexpat; no unpublished cherry-pick or not-affected claim is used. Retain this exact Medium raw finding; any FixedVersion, severity increase or changed package identity remains rejected.",
"version": "3.14.4-1ubuntu0.2",
"officialEvidence": "https://ubuntu.com/security/CVE-2026-7210"
},
{
"package": "libpython3.14-stdlib",
"purl": "pkg:deb/ubuntu/libpython3.14-stdlib@3.14.4-1ubuntu0.2?arch=amd64&distro=ubuntu-26.04",
"checkedAt": "2026-11-08",
"status": "no_official_fix",
"id": "CVE-2026-7210",
"severity": "MEDIUM",
"reason": "Canonical Ubuntu 26.04 Python 3.14 status is Vulnerable with no official fixed resolute package (official page updated 2026-11-06, verified by the release owner on 2026-11-08). Upstream repair depends on libexpat; no unpublished cherry-pick or not-affected claim is used. Retain this exact Medium raw finding; any FixedVersion, severity increase or changed package identity remains rejected.",
"version": "3.14.4-1ubuntu0.2",
"officialEvidence": "https://ubuntu.com/security/CVE-2026-7210"
},
{
"package": "python3.14",
"purl": "pkg:deb/ubuntu/python3.14@3.14.4-1ubuntu0.2?arch=amd64&distro=ubuntu-26.04",
"checkedAt": "2026-11-08",
"status": "no_official_fix",
"id": "CVE-2026-7210",
"severity": "MEDIUM",
"reason": "Canonical Ubuntu 26.04 Python 3.14 status is Vulnerable with no official fixed resolute package (official page updated 2026-11-06, verified by the release owner on 2026-11-08). Upstream repair depends on libexpat; no unpublished cherry-pick or not-affected claim is used. Retain this exact Medium raw finding; any FixedVersion, severity increase or changed package identity remains rejected.",
"version": "3.14.4-1ubuntu0.2",
"officialEvidence": "https://ubuntu.com/security/CVE-2026-7210"
},
{
"package": "python3.14-minimal",
"purl": "pkg:deb/ubuntu/python3.14-minimal@3.14.4-1ubuntu0.2?arch=amd64&distro=ubuntu-26.04",
"checkedAt": "2026-11-08",
"status": "no_official_fix",
"id": "CVE-2026-7210",
"severity": "MEDIUM",
"reason": "Canonical Ubuntu 26.04 Python 3.14 status is Vulnerable with no official fixed resolute package (official page updated 2026-11-06, verified by the release owner on 2026-11-08). Upstream repair depends on libexpat; no unpublished cherry-pick or not-affected claim is used. Retain this exact Medium raw finding; any FixedVersion, severity increase or changed package identity remains rejected.",
"version": "3.14.4-1ubuntu0.2",
"officialEvidence": "https://ubuntu.com/security/CVE-2026-7210"
}
]
}
16 changes: 16 additions & 0 deletions .github/scripts/test_builder_vulnerability_policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,22 @@ def test_kernel_runtime_present_rejected(self):
def test_repository_mismatch_rejected(self):
self.ledger["repository"] = "other"
with self.assertRaises(ValueError): self.check()
def test_python_7210_exact_nofix_does_not_allow_a_fix_or_identity_drift(self):
self.ledger = json.loads((Path(__file__).resolve().parents[1] / "dapper-unfixed.json").read_text())
rows = [r for r in self.ledger["unfixed"] if r["id"] == "CVE-2026-7210"]
self.assertEqual({r["package"] for r in rows}, {"libpython3.14-minimal", "libpython3.14-stdlib", "python3.14", "python3.14-minimal"})
self.assertEqual(len(rows), 4)
for row in rows:
finding = {"VulnerabilityID": row["id"], "PkgName": row["package"],
"InstalledVersion": row["version"], "PkgIdentifier": {"PURL": row["purl"]},
"Severity": "MEDIUM", "FixedVersion": ""}
self.report["Results"][0]["Vulnerabilities"] = [finding]
self.assertEqual(self.check(), [])
for field, value in [("FixedVersion", "3.14.4-1ubuntu0.3"), ("Severity", "HIGH"),
("PkgIdentifier", {"PURL": row["purl"] + "&changed=1"})]:
self.report["Results"][0]["Vulnerabilities"] = [dict(finding, **{field: value})]
self.assertTrue(self.check(), (row["package"], field))

def test_malformed_report_rejected(self):
self.report["Results"][0]["Vulnerabilities"] = "not-a-list"
with self.assertRaises(ValueError): self.check()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/builder-security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,15 +61,15 @@ jobs:
case "$path" in
*.whl)
if test -e "$path"; then
printf "%s %s\n" be5f63d537bbe611dc422fabb6740a44b5997888b592888df5091727f023802a "$path" | sha256sum -c -
printf "%s %s\n" 2aef7c341eef310645ab56455f5789de2819463b25fa70151954e1d208d2db36 "$path" | sha256sum -c -
else
printf "REMOVED_OLD_DISTRO_WHEEL %s\n" "$path"
fi ;;
esac
done
test "$(find /usr/share/python-wheels -maxdepth 1 -name "pip-*.whl" | wc -l)" -eq 1
printf "%s %s\n" be5f63d537bbe611dc422fabb6740a44b5997888b592888df5091727f023802a \
/usr/share/python-wheels/pip-26.2.2+pasturestack.1-py3-none-any.whl | sha256sum -c -
printf "%s %s\n" 2aef7c341eef310645ab56455f5789de2819463b25fa70151954e1d208d2db36 \
/usr/share/python-wheels/pip-26.2.2+pasturestack.2-py3-none-any.whl | sha256sum -c -
' > evidence/distro-pip-seed-paths.txt
- name: Retain raw scan and apply exact pip and builder policies
run: |
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/security-release-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ jobs:
env:
DAPPER_IMAGE: pasturestack/compose-cli-dapper:${{ github.sha }}
TRIVY_IMAGE: aquasec/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969
VERSION_OVERRIDE: 0.14.43
PLATFORM_COMPAT_JAR_URL: https://github.com/PastureStack/orchestration-engine/releases/download/v0.183.281/orchestration-engine-0.183.281.jar
VERSION_OVERRIDE: 0.14.44
PLATFORM_COMPAT_JAR_URL: https://api.github.com/repos/PastureStack/orchestration-engine/releases/assets/503322721
PLATFORM_COMPAT_JAR_SHA256: da2a8a51562ed16e296f7e29e99482bb44042ff0834cca679bbe01d951ba1682

steps:
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
}

run_ci
artifact="dist/artifacts/compose-executor-0.14.43-linux-amd64.gz"
artifact="dist/artifacts/compose-executor-0.14.44-linux-amd64.gz"
test -s "$artifact"
cp "$artifact" /tmp/compose-executor-first.gz

Expand All @@ -83,7 +83,7 @@ jobs:
mkdir -p evidence/product
gzip -cd "$artifact" > evidence/product/compose-executor
chmod +x evidence/product/compose-executor
evidence/product/compose-executor --version | grep -F '0.14.43' >/dev/null
evidence/product/compose-executor --version | grep -F '0.14.44' >/dev/null
cp "$artifact" evidence/
(
cd evidence
Expand Down
10 changes: 10 additions & 0 deletions COMPATIBILITY.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Compatibility Contract

## 0.14.44 candidate: cancelled Stack service rollback

The native Compose Stack rollback handler recognizes `canceled-upgrade` instead
of the nonexistent `cancel` state. Existing upgraded-service rollback, native
waiting and active-service behavior remain unchanged. A real HTTP-client
regression covers these states; original CI and publication are still pending.
Stack-level child-generation consistency is enforced by the matching Engine
owner, not by extra requests or configuration repairs in the AI layer.


## 0.14.43 published: stable approved Catalog service hashes

Private preview and delegated service creation share one typed request and
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile.dapper
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ FROM ubuntu:26.04@sha256:2260313b31c8c011cd2eebe728008efac1b3982be73eb71348ea264
COPY ubuntu-apt.lock /licenses/ubuntu-apt.lock
COPY ubuntu-security-packages.lock /licenses/ubuntu-security-packages.lock
COPY ubuntu-apt-security.lock /licenses/ubuntu-apt-security.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:5b6326f1932cfd7be57130561dc78192f09ed9f58bfbe6606ed0c50510c3b6cd https://snapshot.ubuntu.com/ubuntu/20261104T000000Z/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.1_all.deb /tmp/ca-certificates.deb

ARG GO_VERSION=1.27.3
ARG GO_SHA256_amd64=65efbc80fdc1fa2cd2631cad5b481777a68e8725f34e89f50fc6ac714e379b40
Expand Down Expand Up @@ -48,7 +48,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
XDG_CONFIG_HOME=/tmp/go-config \
PATH=/go/bin:/usr/local/go/bin:${PATH}

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:5b6326f1932cfd7be57130561dc78192f09ed9f58bfbe6606ed0c50510c3b6cd https://snapshot.ubuntu.com/ubuntu/20261104T000000Z/pool/main/c/ca-certificates/ca-certificates_20260816ubuntu0.26.04.1_all.deb /opt/pasturestack-ca-certificates.deb
RUN set -eux; \
. /licenses/ubuntu-apt.lock; \
bootstrap_snapshot=${UBUNTU_APT_SNAPSHOT}; \
Expand Down Expand Up @@ -115,7 +115,7 @@ RUN python3 /opt/python-security/scripts/build-pip-overlay.py --work /tmp/pip-ov
rm -rf /tmp/pip-overlay-build
ADD --checksum=sha256:42d35340cc5b9ba78e818ddbff0c5b1c2b779de448a340fd1b989f5fa8670e1b https://files.pythonhosted.org/packages/c4/51/29046e48f693c54e5b7412216d447a1d8362c9653148d98c02cdf65fa733/certifi-2026.10.19-py3-none-any.whl /opt/python-security/certifi-2026.10.19-py3-none-any.whl
COPY scripts/install-python-security-tools /usr/local/bin/install-python-security-tools
ENV VIRTUALENV_PIP=26.2.2+pasturestack.1 VIRTUALENV_EXTRA_SEARCH_DIR=/usr/share/python-wheels VIRTUALENV_NO_PERIODIC_UPDATE=1
ENV VIRTUALENV_PIP=26.2.2+pasturestack.2 VIRTUALENV_EXTRA_SEARCH_DIR=/usr/share/python-wheels VIRTUALENV_NO_PERIODIC_UPDATE=1
RUN PYTHON_SECURITY_VIRTUALENV_PYTHON=python3 bash /usr/local/bin/install-python-security-tools

RUN case "${DAPPER_HOST_ARCH}" in \
Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,13 @@ PastureStack is an independent community effort to preserve, audit, and moderniz

**Upstream:** [`rancher/rancher-compose-executor`](https://github.com/rancher/rancher-compose-executor). This GitHub fork preserves upstream history, authorship, dates, tags, licenses, and bundled dependency notices; PastureStack maintenance is consolidated into one commit after the preserved upstream boundary.

## Development candidate

The 0.14.44 source candidate repairs native rollback of a Stack service in
`canceled-upgrade`. It preserves the existing wait and per-service native action
contract. This source change is not a published binary or deployed-workflow
acceptance; the current published version remains 0.14.43.

## Project status

The maintained source uses Ubuntu 26.04, Go 1.27.3, and Python 3.14.9 for integration-source verification. Ubuntu build packages, the base image, and Go archives are fixed by snapshot, exact version, and SHA-256. Go dependencies are managed by `go.mod` and a reproducible module vendor tree. AWS access uses AWS SDK for Go v2; container structures use the maintained Moby API module; the command parser uses urfave/cli v3. The abandoned AWS SDK v1, Rancher generated-client modules, event-subscriber module, `docker/libcompose`, and other GOPATH-era dependencies have been removed. The small Rancher 1.6 protocol boundary retained by this compatibility CLI is maintained and tested locally. The Dapper builder does not embed a Docker CLI or mount a Docker socket; Docker is required only on the host to create and run the isolated builder. The maintained binaries are `pasturestack-compose` and `compose-executor`; `platform-compose.yml` is the preferred companion file. Releases are built and verified from the preserved source history; this repository does not enable automated deployment.
Expand Down
2 changes: 1 addition & 1 deletion executor/handlers/upgrade_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ func RollbackStack(event *events.Event, apiClient *client.RancherClient) error {
if err := wait(apiClient, &service); err != nil {
return err
}
if service.State == "upgraded" || service.State == "cancel" {
if service.State == "upgraded" || service.State == "canceled-upgrade" {
service, err := apiClient.Service.ActionRollback(&service)
if err != nil {
return err
Expand Down
116 changes: 116 additions & 0 deletions executor/handlers/upgrade_handler_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
package handlers

import (
"encoding/json"
"net/http"
"net/http/httptest"
"reflect"
"sync"
"testing"

"github.com/PastureStack/compose-cli/internal/events"
client "github.com/PastureStack/compose-cli/internal/rancherclient/v2"
)

func TestRollbackStackCanceledUpgradeUsesNativeRollbackAndWait(t *testing.T) {
for _, state := range []string{"canceled-upgrade", "upgraded", "active", "upgrading"} {
t.Run(state, func(t *testing.T) {
var mu sync.Mutex
var trace []string
rolledBack := false
var server *httptest.Server
service := func(current string) map[string]interface{} {
return map[string]interface{}{
"id": "1s7", "type": "service", "state": current, "transitioning": "no",
"links": map[string]string{"self": server.URL + "/services/1s7"},
"actions": map[string]string{"rollback": server.URL + "/services/1s7?action=rollback"},
}
}
server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
mu.Lock()
defer mu.Unlock()
w.Header().Set("Content-Type", "application/json")
encode := func(value interface{}) {
if err := json.NewEncoder(w).Encode(value); err != nil {
t.Errorf("encode fixture response: %v", err)
}
}
switch {
case r.Method == http.MethodGet && r.URL.Path == "/schemas":
w.Header().Set("X-API-Schemas", server.URL+"/schemas")
encode(map[string]interface{}{"data": []interface{}{
map[string]interface{}{"id": "stack", "resourceMethods": []string{"GET"}, "links": map[string]string{"collection": server.URL + "/stacks"}},
map[string]interface{}{"id": "service", "resourceMethods": []string{"GET"}, "links": map[string]string{"collection": server.URL + "/services"}},
map[string]interface{}{"id": "publish", "collectionMethods": []string{"POST"}, "links": map[string]string{"collection": server.URL + "/publish"}},
}})
case r.Method == http.MethodGet && r.URL.Path == "/stacks/1st7":
encode(map[string]interface{}{
"id": "1st7", "externalId": "current-id", "previousExternalId": "previous-id",
"environment": map[string]string{"VALUE": "current"}, "previousEnvironment": map[string]string{"VALUE": "previous"},
"links": map[string]string{"services": server.URL + "/stacks/1st7/services"},
})
case r.Method == http.MethodGet && r.URL.Path == "/stacks/1st7/services":
listed := service(state)
if state == "upgrading" {
listed["transitioning"] = "yes"
}
encode(map[string]interface{}{"data": []interface{}{listed}})
case r.Method == http.MethodGet && r.URL.Path == "/services/1s7" && r.URL.RawQuery == "":
current := state
if rolledBack {
current = "active"
} else if state == "upgrading" {
current = "upgraded"
}
trace = append(trace, "GET "+current)
encode(service(current))
case r.Method == http.MethodPost && r.URL.Path == "/services/1s7" && r.URL.Query().Get("action") == "rollback":
trace = append(trace, "POST rollback")
if rolledBack || state == "active" {
t.Error("unexpected duplicate or active-child rollback")
}
rolledBack = true
pending := service("rolling-back")
pending["transitioning"] = "yes"
encode(pending)
case r.Method == http.MethodPost && r.URL.Path == "/publish":
trace = append(trace, "POST reply")
var result client.Publish
if err := json.NewDecoder(r.Body).Decode(&result); err != nil {
t.Errorf("decode original reply: %v", err)
} else if result.Name != "reply.one" || result.Data["externalId"] != "previous-id" || result.Data["previousExternalId"] != nil || result.Data["previousEnvironment"] != nil {
t.Errorf("original rollback reply changed: %#v", result)
} else if environment, ok := result.Data["environment"].(map[string]interface{}); !ok || environment["VALUE"] != "previous" {
t.Errorf("previous environment not restored: %#v", result.Data)
}
encode(map[string]interface{}{})
default:
t.Errorf("unexpected native route: %s %s", r.Method, r.URL.Path)
http.NotFound(w, r)
}
}))
defer server.Close()
c, err := client.NewRancherClient(&client.ClientOpts{Url: server.URL + "/schemas"})
if err != nil {
t.Fatal(err)
}
event := &events.Event{ID: "rollback-event", ResourceID: "1st7", ReplyTo: "reply.one"}
if err := RollbackStack(event, c); err != nil {
t.Fatal(err)
}
mu.Lock()
defer mu.Unlock()
first := state
if first == "upgrading" {
first = "upgraded"
}
want := []string{"GET " + first, "POST rollback", "GET active", "POST reply"}
if state == "active" {
want = []string{"GET active", "POST reply"}
}
if !reflect.DeepEqual(trace, want) {
t.Fatalf("native rollback/readiness order = %v, want %v", trace, want)
}
})
}
}
3 changes: 2 additions & 1 deletion scripts/check-pasturestack-source
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,8 @@ require_line Dockerfile.dapper ' openssl-provider-legacy="${UBUNTU_APT_OP
require_line .python-version '3.14.9'
require_line tests/integration/requirements.txt 'pytest==9.1.1'
require_line tests/integration/requirements.txt 'setuptools==84.1.0'
require_line .github/workflows/security-release-gate.yml ' PLATFORM_COMPAT_JAR_URL: https://github.com/PastureStack/orchestration-engine/releases/download/v0.183.281/orchestration-engine-0.183.281.jar'
require_line .github/workflows/security-release-gate.yml ' PLATFORM_COMPAT_JAR_URL: https://api.github.com/repos/PastureStack/orchestration-engine/releases/assets/503322721'
require_line scripts/run-platform-compat ' curl -fsSL -H '\''Accept: application/octet-stream'\'' --retry 3 --retry-delay 2 --retry-max-time 90 \'
require_line .github/workflows/security-release-gate.yml ' PLATFORM_COMPAT_JAR_SHA256: da2a8a51562ed16e296f7e29e99482bb44042ff0834cca679bbe01d951ba1682'
require_line lookup/file.go $'\t\troot, err := os.OpenRoot(allowedRoot)'
require_line lookup/file_test.go 'func TestConfiguredFileLookupRejectsEscapes(t *testing.T) {'
Expand Down
Loading
Loading