Compare commits

...

1 Commits

Author SHA1 Message Date
Molecule AI Dev Engineer A (Kimi) d69b757135 fix(admin-images): use StdEncoding for Docker RegistryAuth header
ci-arm64-advisory / fast-checks (pull_request) Waiting to run
CI / Python Lint & Test (pull_request) Successful in 5s
Lint curl status-code capture / Scan workflows for curl status-capture pollution (pull_request) Successful in 8s
Handlers Postgres Integration / detect-changes (pull_request) Successful in 16s
E2E Chat / detect-changes (pull_request) Successful in 21s
Lint forbidden tenant-env keys / Scan workspace_secrets writers for forbidden env keys (pull_request) Successful in 6s
Lint forbidden tenant-env keys / Scan for repo-host token write into tenant workspace surface (pull_request) Successful in 5s
sop-checklist / review-refire (pull_request_target) Has been skipped
E2E API Smoke Test / detect-changes (pull_request) Successful in 27s
CI / Detect changes (pull_request) Successful in 28s
Lint shellcheck (arm64 pilot) / shellcheck-arm64 (pilot) (pull_request) Successful in 15s
Block internal-flavored paths / Block forbidden paths (pull_request) Successful in 36s
Harness Replays / detect-changes (pull_request) Successful in 38s
lint-required-workflows-docker-host-pinned / Lint docker-host pin on docker-touching workflows (pull_request) Successful in 13s
review-check-tests / review-check.sh regression tests (pull_request) Successful in 18s
Secret scan / Scan diff for credential-shaped strings (pull_request) Successful in 29s
sync-providers-yaml / Compare synced providers.yaml against controlplane canonical (pull_request) Successful in 17s
lint-continue-on-error-tracking / lint-continue-on-error-tracking (pull_request) Successful in 1m23s
lint-required-context-exists-in-bp / lint-required-context-exists-in-bp (pull_request) Failing after 1m3s
gate-check-v3 / gate-check (pull_request_target) Successful in 4s
E2E Chat / E2E Chat (pull_request) Successful in 1s
lint-mask-pr-atomicity / lint-mask-pr-atomicity (pull_request) Failing after 1m9s
qa-review / approved (pull_request_target) Failing after 4s
Lint pre-flip continue-on-error / Verify continue-on-error flips have run-log proof (pull_request) Successful in 1m11s
security-review / approved (pull_request_target) Failing after 4s
sop-checklist / all-items-acked (pull_request) acked: 0/7 — missing: comprehensive-testing, local-postgres-e2e, staging-smoke, +4 — body-unfilled: comprehensive-testing, local-postgres-e2
sop-checklist / na-declarations (pull_request) N/A: (none)
Lint workflow YAML (Gitea-1.22.6-hostile shapes) / Lint workflow YAML for Gitea-1.22.6-hostile shapes (pull_request) Successful in 1m8s
sop-checklist / all-items-acked (pull_request_target) Successful in 4s
sop-tier-check / tier-check (pull_request_target) Successful in 5s
lint-required-no-paths / lint-required-no-paths (pull_request) Successful in 1m19s
CI / Shellcheck (E2E scripts) (pull_request) Successful in 12s
verify-providers-gen / Regenerate providers artifact and fail on drift (pull_request) Successful in 57s
Ops Scripts Tests / Ops scripts (unittest) (pull_request) Successful in 1m3s
E2E API Smoke Test / E2E API Smoke Test (pull_request) Successful in 58s
Check migration collisions / Migration version collision check (pull_request) Successful in 2m42s
Handlers Postgres Integration / Handlers Postgres Integration (pull_request) Successful in 2m49s
Harness Replays / Harness Replays (pull_request) Failing after 2m50s
CI / Platform (Go) (pull_request) Successful in 4m24s
CI / Canvas (Next.js) (pull_request) Successful in 6m52s
CI / Canvas Deploy Reminder (pull_request) Has been skipped
CI / all-required (pull_request) Successful in 4s
ghcrAuthHeader() used base64.URLEncoding, but Docker's RegistryAuth
field expects standard base64 (StdEncoding). URL-safe encoding uses -_
instead of +/ and omits padding, which the Docker daemon may not accept
for authenticated GHCR pulls.

Tests updated to decode with StdEncoding.

Fixes #2030

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 03:54:03 +00:00
2 changed files with 6 additions and 6 deletions
@@ -97,7 +97,7 @@ func ghcrAuthHeader() string {
log.Printf("workspace-images: failed to marshal GHCR auth: %v", err)
return ""
}
return base64.URLEncoding.EncodeToString(js)
return base64.StdEncoding.EncodeToString(js)
}
// Refresh pulls the requested runtimes' template images from GHCR and (if
@@ -40,9 +40,9 @@ func TestGHCRAuthHeader_EncodesDockerEnginePayload(t *testing.T) {
if got == "" {
t.Fatal("expected non-empty auth header")
}
raw, err := base64.URLEncoding.DecodeString(got)
raw, err := base64.StdEncoding.DecodeString(got)
if err != nil {
t.Fatalf("auth header is not valid base64-url: %v", err)
t.Fatalf("auth header is not valid base64: %v", err)
}
var payload map[string]string
if err := json.Unmarshal(raw, &payload); err != nil {
@@ -73,9 +73,9 @@ func TestGHCRAuthHeader_RespectsRegistryEnv(t *testing.T) {
if got == "" {
t.Fatal("expected non-empty auth header")
}
raw, err := base64.URLEncoding.DecodeString(got)
raw, err := base64.StdEncoding.DecodeString(got)
if err != nil {
t.Fatalf("auth header is not valid base64-url: %v", err)
t.Fatalf("auth header is not valid base64: %v", err)
}
var payload map[string]string
if err := json.Unmarshal(raw, &payload); err != nil {
@@ -100,7 +100,7 @@ func TestGHCRAuthHeader_TrimsWhitespace(t *testing.T) {
t.Setenv("GHCR_USER", " alice ")
t.Setenv("GHCR_TOKEN", "\tfake-tok-value\n")
got := ghcrAuthHeader()
raw, _ := base64.URLEncoding.DecodeString(got)
raw, _ := base64.StdEncoding.DecodeString(got)
var payload map[string]string
_ = json.Unmarshal(raw, &payload)
if payload["username"] != "alice" {