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 @@ -3857,6 +3857,50 @@
"officialSourcePackage": "libheif",
"reason": "Official Ubuntu CVE tracker resolute_libheif: needed; no official fixed version. Exact existing disposable-builder package only; no general severity exemption.",
"checkedAt": "2026-11-05"
},
{
"id": "CVE-2026-82560",
"package": "libperl5.40",
"version": "5.40.1-7ubuntu0.3",
"purl": "pkg:deb/ubuntu/libperl5.40@5.40.1-7ubuntu0.3?arch=amd64&distro=ubuntu-26.04",
"severity": "MEDIUM",
"status": "no_official_fix",
"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"
},
{
"id": "CVE-2026-82560",
"package": "perl",
"version": "5.40.1-7ubuntu0.3",
"purl": "pkg:deb/ubuntu/perl@5.40.1-7ubuntu0.3?arch=amd64&distro=ubuntu-26.04",
"severity": "MEDIUM",
"status": "no_official_fix",
"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"
},
{
"id": "CVE-2026-82560",
"package": "perl-base",
"version": "5.40.1-7ubuntu0.3",
"purl": "pkg:deb/ubuntu/perl-base@5.40.1-7ubuntu0.3?arch=amd64&distro=ubuntu-26.04",
"severity": "MEDIUM",
"status": "no_official_fix",
"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"
},
{
"id": "CVE-2026-82560",
"package": "perl-modules-5.40",
"version": "5.40.1-7ubuntu0.3",
"purl": "pkg:deb/ubuntu/perl-modules-5.40@5.40.1-7ubuntu0.3?arch=all&distro=ubuntu-26.04",
"severity": "MEDIUM",
"status": "no_official_fix",
"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"
}
]
}
6 changes: 3 additions & 3 deletions .github/workflows/security-release-gate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
env:
DAPPER_IMAGE: pasturestack/compose-cli-dapper:${{ github.sha }}
TRIVY_IMAGE: aquasec/trivy:0.74.0@sha256:62b1e65e8869bc4b4c6aa4fa2b21595256c7c2f6018a9d9ad61caf87187c1969
VERSION_OVERRIDE: 0.14.42
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
PLATFORM_COMPAT_JAR_SHA256: da2a8a51562ed16e296f7e29e99482bb44042ff0834cca679bbe01d951ba1682

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

run_ci
artifact="dist/artifacts/compose-executor-0.14.42-linux-amd64.gz"
artifact="dist/artifacts/compose-executor-0.14.43-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.42' >/dev/null
evidence/product/compose-executor --version | grep -F '0.14.43' >/dev/null
cp "$artifact" evidence/
(
cd evidence
Expand Down
31 changes: 31 additions & 0 deletions docs/releases/compose-executor-0.14.43.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Compose Executor v0.14.43 — release candidate

This candidate is not published. The current published release remains
[v0.14.42](https://github.com/PastureStack/compose-cli/releases/tag/v0.14.42).

Catalog preview and delegated creation now share one hash owner. It projects
only typed SDK response envelopes before hashing and hashes the owned Stack
binding symbolically, while the actual request retains its exact bound Stack.
This keeps the approved body stable across the native transform response and
Stack creation. The Engine's exact-body checks and authorization are unchanged.

Business metadata, labels, environment, ports, volumes and security settings
remain intact. Empty hash-output maps are restored without changing user data.

Ordinary and legacy Compose hash and serialization paths remain unchanged.
An explicit ordinary Compose `up` or `upgrade` that later takes over a service
created with the Catalog hash may detect one initial hash difference. This
does not trigger an automatic update or relax any permission check.

Local focused source tests are not matching Server/Catalog runtime acceptance.
Publication requires the original CI artifact and component-bound security
qualification; no runtime result is claimed by this note.

The disposable builder also records four exact Perl-package findings for
[CVE-2026-82560](https://ubuntu.com/security/CVE-2026-82560) at
`5.40.1-7ubuntu0.3`. Canonical still lists Ubuntu 26.04 as vulnerable without
a released package fix. Canonical priority and Ubuntu-sourced Trivy severity
are MEDIUM; the upstream CVSS 7.5
High assessment remains disclosed. This build-only tracking is not a runtime
clean claim. Available fixes, severity increases and identity changes still
fail the existing security policy.
2 changes: 1 addition & 1 deletion platformapi/catalog_finalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,6 @@ func CatalogFinalizeService(primary CatalogLaunchPart, secondaries []CatalogLaun
if err := populateLbFields(&PlatformService{name: primary.Name, serviceConfig: primary.Config}, &launch, body); err != nil {
return "", nil, err
}
_, body, err = serviceConfigAndHash(body, &launch, secondaryLaunches)
_, body, err = catalogServiceConfigAndHash(body, &launch, secondaryLaunches)
return typeName, body, err
}
63 changes: 63 additions & 0 deletions platformapi/catalog_service_hash.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
package platformapi

import (
"bytes"
"encoding/json"

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

// Catalog hashes describe the approved typed request, before the owned Stack
// slot is bound. Native transform response envelopes and deployment-assigned
// Stack IDs must not change those hashes. Ordinary/legacy hashing is unchanged.
func catalogServiceConfigAndHash(service *CompositeService, launch *client.LaunchConfig, secondaries []client.SecondaryLaunchConfig) (digest.ServiceHash, *CompositeService, error) {
if service == nil || launch == nil {
return digest.ServiceHash{}, nil, errCatalogGraph
}
input := *service
input.LaunchConfig = launch
input.SecondaryLaunchConfigs = secondaries
wire, err := client.CatalogMutationRequest(&input)
if err != nil {
return digest.ServiceHash{}, nil, err
}
raw, err := json.Marshal(wire)
if err != nil {
return digest.ServiceHash{}, nil, err
}
var canonical CompositeService
decoder := json.NewDecoder(bytes.NewReader(raw))
decoder.UseNumber()
if err := decoder.Decode(&canonical); err != nil {
return digest.ServiceHash{}, nil, err
}
launch = canonical.LaunchConfig
secondaries = canonical.SecondaryLaunchConfigs
if launch == nil {
return digest.ServiceHash{}, nil, errCatalogGraph
}
// JSON omitempty can drop empty maps. Restore only the maps this existing
// hash owner writes; business entries and numeric values remain unchanged.
if canonical.Metadata == nil {
canonical.Metadata = map[string]interface{}{}
}
if launch.Labels == nil {
launch.Labels = map[string]interface{}{}
}
for index := range secondaries {
if secondaries[index].Labels == nil {
secondaries[index].Labels = map[string]interface{}{}
}
}
canonical.LaunchConfig = nil
canonical.SecondaryLaunchConfigs = nil
boundStackID := canonical.StackId
canonical.StackId = "$createdStack"
hash, body, err := serviceConfigAndHash(&canonical, launch, secondaries)
if err != nil {
return digest.ServiceHash{}, nil, err
}
body.StackId = boundStackID
return hash, body, nil
}
154 changes: 154 additions & 0 deletions platformapi/catalog_service_hash_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
package platformapi

import (
"bytes"
"crypto/sha256"
"encoding/hex"
"encoding/json"
"fmt"
"io"
"net/http"
"net/http/httptest"
"reflect"
"testing"

"github.com/PastureStack/compose-cli/config"
"github.com/PastureStack/compose-cli/digest"
client "github.com/PastureStack/compose-cli/internal/rancherclient/v2"
"github.com/PastureStack/compose-cli/project"
"github.com/PastureStack/compose-cli/yaml"
)

func TestCatalogHashEmptyMapsAndInvalidInputs(t *testing.T) {
for _, empty := range []bool{false, true} {
t.Run(fmt.Sprintf("explicitEmpty=%v", empty), func(t *testing.T) {
body := &CompositeService{Service: client.Service{Name: "app", StackId: "1st1600"}}
launch := &client.LaunchConfig{ImageUuid: "docker:busybox:1.37.0"}
secondaries := []client.SecondaryLaunchConfig{{Name: "side", ImageUuid: "docker:busybox:1.37.0"}}
if empty {
body.Metadata = map[string]interface{}{}
launch.Labels = map[string]interface{}{}
secondaries[0].Labels = map[string]interface{}{}
}
hash, result, err := catalogServiceConfigAndHash(body, launch, secondaries)
if err != nil || hash.Service == "" || hash.LaunchConfig == "" || result.StackId != "1st1600" ||
result.Metadata[digest.ServiceHashKey] != hash.Service || result.LaunchConfig.Labels[digest.ServiceHashKey] != hash.LaunchConfig ||
result.SecondaryLaunchConfigs[0].Labels[digest.ServiceHashKey] != hash.SecondaryLaunchConfigs["side"] {
t.Fatal("empty-map roundtrip did not produce writable owned hash slots")
}
if len(body.Metadata) != 0 || len(launch.Labels) != 0 || len(secondaries[0].Labels) != 0 {
t.Fatal("hash completion mutated the caller's empty business maps")
}
})
}
for _, input := range []struct {
body *CompositeService
launch *client.LaunchConfig
}{
{nil, &client.LaunchConfig{}}, {&CompositeService{}, nil},
} {
if _, _, err := catalogServiceConfigAndHash(input.body, input.launch, nil); err == nil {
t.Fatal("missing typed service/launch input was accepted")
}
}
}

func TestCatalogHashPreservesTypedBusinessMapsNumbersAndSource(t *testing.T) {
business := map[string]interface{}{"id": "business-id", "type": "business-type", "links": nil,
"actions": []interface{}{"business-action"}, "large": json.Number("9007199254740993"), "fraction": json.Number("1.25")}
header := client.Resource{Id: "response-id", Type: "container", Links: map[string]string{"self": "response-link"}, Actions: map[string]string{"act": "response-action"}}
body := &CompositeService{Service: client.Service{Name: "app", StackId: "1st1600", Metadata: business}}
launch := &client.LaunchConfig{Resource: header, ImageUuid: "docker:busybox:1.37.0", Labels: business, Environment: business,
Ports: []string{"8080:80/tcp"}, DataVolumes: []string{"/data"}, CapAdd: []string{"NET_BIND_SERVICE"}, SecurityOpt: []string{"no-new-privileges"},
LogConfig: &client.LogConfig{Resource: header, Driver: "json-file", Config: business}}
secondaries := []client.SecondaryLaunchConfig{{Resource: header, Name: "side", ImageUuid: "docker:busybox:1.37.0", Labels: business}}
input := *body
input.LaunchConfig, input.SecondaryLaunchConfigs = launch, secondaries
before, _ := json.Marshal(&input)
want, err := client.CatalogMutationRequest(&input)
if err != nil {
t.Fatal("typed business fixture failed")
}
_, result, err := catalogServiceConfigAndHash(body, launch, secondaries)
if err != nil {
t.Fatal("Catalog hash rejected valid typed business fields")
}
got, err := client.CatalogMutationRequest(result)
if err != nil {
t.Fatal("hashed body is not a typed mutation")
}
delete(got["metadata"].(map[string]interface{}), digest.ServiceHashKey)
delete(got["launchConfig"].(map[string]interface{})["labels"].(map[string]interface{}), digest.ServiceHashKey)
for _, item := range got["secondaryLaunchConfigs"].([]interface{}) {
delete(item.(map[string]interface{})["labels"].(map[string]interface{}), digest.ServiceHashKey)
}
if !reflect.DeepEqual(want, got) {
t.Fatal("business keys, numbers or typed configuration changed beyond the owned hash slots")
}
after, _ := json.Marshal(&input)
if !bytes.Equal(before, after) {
t.Fatal("Catalog hash projection mutated the source DTO or business maps")
}
}

// This golden is captured from the published 0.14.42 source with the same
// synthetic native transform. It covers both legacy/no-proof SDK callers.
func TestNonDelegatedFactoryKeeps042HashAndRequestBytes(t *testing.T) {
const expected042SHA256 = "50f022028ee449288ae7ffe5bf8600b01e5a3417141c8005e225c960ed853135"
var actual []byte
var server *httptest.Server
server = httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
if r.Header.Get(client.CatalogLaunchDelegationHeader) != "" {
t.Error("nondelegated caller acquired delegation authority")
}
w.Header().Set("Content-Type", "application/json")
switch r.URL.Path {
case "/schemas":
w.Header().Set("X-API-Schemas", server.URL+"/schemas")
fmt.Fprintf(w, `{"links":{"self":%q},"data":[{"id":"service","collectionMethods":["POST"],"links":{"collection":%q}}]}`, server.URL+"/schemas", server.URL+"/services")
case "/scripts/transform":
fmt.Fprint(w, `{"type":"container","links":{"self":"response-link"},"actions":{"act":"response-action"},"imageUuid":"docker:busybox:1.37.0","labels":{"id":"business-id"},"environment":{"type":"business-type"}}`)
case "/services":
actual, _ = io.ReadAll(io.LimitReader(r.Body, 1<<20))
fmt.Fprint(w, `{}`)
default:
t.Error("nondelegated fixture received an unexpected route")
w.WriteHeader(http.StatusNotFound)
}
}))
defer server.Close()
c, err := client.NewRancherClient(&client.ClientOpts{Url: server.URL + "/schemas"})
if err != nil {
t.Fatal("synthetic ordinary bootstrap failed")
}
cfg := &config.ServiceConfig{Image: "busybox:1.37.0", Labels: yaml.SliceorMap{}}
cfg.Metadata = map[string]interface{}{"type": "business-type"}
ctx := &Context{Client: c, Stack: &client.Stack{Resource: client.Resource{Id: "1st1600"}}}
p := project.NewProject(&ctx.Context)
ctx.Project = p
p.ServiceConfigs.Add("app", cfg)
ctx.SidekickInfo, err = NewSidekickInfo(p)
if err != nil {
t.Fatal("ordinary sidekick fixture failed")
}
worker := NewService("app", cfg, ctx)
factory := &NormalFactory{}
hash, err := factory.Hash(worker)
if err != nil || factory.Create(worker) != nil {
t.Fatal("ordinary factory path failed")
}
var posted client.Service
if json.Unmarshal(actual, &posted) != nil {
t.Fatal("ordinary SDK emitted invalid JSON")
}
stored, complete := digest.LookupHash(&posted)
if !complete || !hash.Equals(stored) || posted.LaunchConfig.Type != "container" || posted.LaunchConfig.Links["self"] != "response-link" {
t.Fatal("ordinary hash/update or original resource-envelope behavior changed")
}
sum := sha256.Sum256(actual)
gotSHA := hex.EncodeToString(sum[:])
t.Logf("synthetic ordinary request SHA256 only: %s", gotSHA)
if gotSHA != expected042SHA256 {
t.Fatal("nondelegated request bytes differ from the published042 worker baseline")
}
}
Loading
Loading