Skip to content

fix(cli): resolve CodeQL and Go codegen CI failures blocking #5874 - #5957

Merged
Coly010 merged 3 commits into
developfrom
fix/pr-5874-ci
Jul 27, 2026
Merged

fix(cli): resolve CodeQL and Go codegen CI failures blocking #5874#5957
Coly010 merged 3 commits into
developfrom
fix/pr-5874-ci

Conversation

@Coly010

@Coly010 Coly010 commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Bug fix / CI fix.

What is the current behavior?

Two checks are failing on #5874 (the developmain production-deploy rollup PR, which tracks whatever's on develop and can't be fixed directly):

  • CodeQL flags js/incomplete-url-substring-sanitization on a test assertion in start.integration.test.ts that uses .includes("registry.example.com") to check a spawned docker arg — a false positive, but a real CodeQL pattern match.
  • Codegen (apps/cli-go) fails outright: kin-openapi v0.135.0 can't parse the live Management API spec anymore (one schema now uses OpenAPI-3.1-style numeric exclusiveMinimum instead of the 3.0 boolean form), and separately api/overlay.yaml has drifted from the current spec shape (several oneOfanyOf renames, dropped discriminators, a couple of new null-typed deprecated fields, and a query param union oapi-codegen can't represent).

What is the new behavior?

  • Tightened the test assertion to .startsWith("registry.example.com/supabase/"), which resolves the CodeQL pattern and is also a stricter, more correct check.
  • Bumped kin-openapi to v0.136.0 (pulls go.mod's go directive to 1.26) and updated api/overlay.yaml's selectors/actions to match the current live spec. Regenerated pkg/api/{types,client}.gen.go and updated the handful of call sites affected by resulting type/name changes (a few query params flipped bool→string upstream; the SMS provider enum lost a per-schema prefix after oapi-codegen deduped it).
  • Replaced deprecated ecdsa.PublicKey.X/Y/PrivateKey.D field access in the JWT signing-key code with the new Bytes()/ParseUncompressedPublicKey APIs, since Go 1.26 flags the old fields and would otherwise have regressed the (currently passing) Lint check.

Once merged, #5874 should pick these fixes up automatically since it tracks develop's HEAD.

Coly010 added 2 commits July 27, 2026 13:55
…positive

Anchor the check with a path-separated prefix (.startsWith("registry.example.com/supabase/"))
instead of a bare substring match, since CodeQL's incomplete-url-substring-sanitization
query otherwise flags .includes() as an incomplete host check.
…I spec

kin-openapi v0.135.0 can't parse the live spec anymore: one schema now uses
OpenAPI 3.1-style numeric exclusiveMinimum instead of the 3.0 boolean form.
Bump to v0.136.0 (requires go 1.26) which handles both.

api/overlay.yaml had also drifted from the current spec shape: several
unions moved from oneOf to anyOf, some schemas dropped their discriminator
entirely, two new null-typed deprecated fields appeared on
V1CreateProjectBody, and the `services` query param gained a
comma-string-or-array union oapi-codegen can't represent. Update the
overlay's selectors and actions to match.

Regenerate pkg/api/{types,client}.gen.go and fix call sites for the
resulting renamed/retyped generated fields: several boolean query params
(force, reveal, verify_jwt, bundleOnly) flipped to string upstream, and the
SMS provider enum lost its per-schema prefix on UpdateAuthConfigBody after
oapi-codegen deduped it against an identical enum on AuthConfigResponse.

Also replace deprecated ecdsa.PublicKey.X/Y and PrivateKey.D field access
with PublicKey.Bytes()/PrivateKey.Bytes()/ParseUncompressedPublicKey, since
Go 1.26 flags the old fields (SA1019) and the go.mod bump above would
otherwise regress the Lint check.
@Coly010
Coly010 requested a review from a team as a code owner July 27, 2026 12:55

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: b2bb0db54e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread apps/cli-go/go.mod
@github-actions

github-actions Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

npx --yes https://pkg.pr.new/supabase/cli/supabase@3211530cefd203f8d38b1c6c9b2b7a283e8ab539

Preview package for commit 3211530.

apps/cli-go/go.mod's `go` directive was bumped to 1.26 (kin-openapi fix), but
mise.toml still pinned 1.25.11 — mise-managed setup/lint/release jobs would
fall back to an implicit secondary toolchain download, which fails outright
in restricted/offline environments or under GOTOOLCHAIN=local. Pin mise to
1.26.5 (latest patch) and refresh mise.lock checksums/URLs for all platforms.

review: PRRT_kwDOErm0O86UDpTD
@Coly010
Coly010 added this pull request to the merge queue Jul 27, 2026
Merged via the queue into develop with commit 71ecf66 Jul 27, 2026
36 checks passed
@Coly010
Coly010 deleted the fix/pr-5874-ci branch July 27, 2026 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants