Skip to content

chore(codeql): resolve deploy scan findings - #6326

Open
7ttp wants to merge 6 commits into
developfrom
chore/deploy-scan-findings
Open

chore(codeql): resolve deploy scan findings#6326
7ttp wants to merge 6 commits into
developfrom
chore/deploy-scan-findings

Conversation

@7ttp

@7ttp 7ttp commented Aug 25, 2026

Copy link
Copy Markdown
Member

TL;DR

Unblocks the production deploy: fixes the three new CodeQL alerts gating it and the container leak codex flagged on the same PR....

ref:

@7ttp
7ttp requested a review from a team as a code owner August 25, 2026 09:28
@7ttp 7ttp changed the title chore(cli): resolve deploy scan findings chore(codeql): resolve deploy scan findings Aug 25, 2026

@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: 90e219a6e5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/shared/functions/serve.ts
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor

Supabase CLI preview

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

Preview package for commit a98a272.

@7ttp 7ttp self-assigned this Aug 25, 2026

@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: 1ee316d4c5

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment thread apps/cli/src/shared/functions/serve.ts Outdated
Comment thread apps/cli/src/shared/functions/serve.ts
@7ttp

7ttp commented Aug 25, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: a98a27296d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically 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 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@avallete avallete left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approving — the ownership fix is careful and well-tested, CI is green, and I verified the affected suites locally (serve integration, shadow-cache unit/integration). Non-blocking notes:

  1. Shadow-cache key change invalidates every existing cached baseline. legacyShadowCacheKey now produces different values for identical inputs, so every existing shadow-baseline-<key>.tar (including the shared main-db tar pool) goes cold once — one full re-export per settings combination, with old tars lingering until the retention sweep ages them out. Fine, but worth a line in the PR description so nobody debugs the post-upgrade cache miss as a regression.

  2. Fixed-salt scrypt is rate-limiting, not real KDF protection. With a public constant salt and the deterministic requirement, offline brute-force stays possible — scrypt just makes each guess ~10⁴–10⁵× slower (~23 ms per call measured, so runtime cost per shadow acquire is negligible). Legitimate mitigation for low-entropy inputs like db_password, and the comment explains the tradeoff honestly; just noting the alert is mitigated, not eliminated, if the filename ever gets exposed more broadly.

  3. Residual leak window on interrupt mid-docker create. If the fiber is interrupted after the daemon creates the container but before the CLI observes the process exit, onContainerCreated never fires and the container survives unowned. Inherent to the subprocess boundary, strictly better than the old failure modes, and self-healing — the next functions serve run's bestEffortRemoveContainer reclaims the fixed-name container.

  4. onContainerCreated?: () => void is a non-Effect side channel on an otherwise Effect-native API — defensible here since it must fire inside the shared core's uninterruptible window and the state is per-invocation; a scoped/acquireRelease restructure would touch start's bring-up core for little gain.

  5. codeSafeJson duplicated across two test files (deploy.live.test.ts, createStack.e2e.test.ts) — different workspaces with no shared test-helper package, so the 2-line local copy is the right call; noting only so nobody "fixes" it with a cross-package util.

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