fix(cli): keep TLS under --debug - #5981
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34b6f68883
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e0ba327500
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99bbeea957
ℹ️ 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".
|
From Claude: apps/cli/src/legacy/commands/gen/types/types.handler.ts:429: Fix is small: drop the && !debug on line 429, and since debug (types.handler.ts:195, const debug = yield* LegacyDebugFlag;) is used nowhere else in the file, remove that binding and the now-unused LegacyDebugFlag import too. Worth double checking the validity of this claim |
…wngrade-5872 # Conflicts: # apps/cli-go/internal/debug/postgres.go
TL;DR
--debugsilently disabled TLS on every database connectionProblem
debug.SetupPGXnulledconfig.TLSConfigsoits wirelogging proxy could read plaintext frames. It runs after sslmode resolution, so
--debugoverrode an explicit?sslmode=requirewith no warning, sent the session unencrypted, and failed withno pg_hba.conf entry ... no encryptionon SSL-enforcing projects that worked fine without the flag.Still live on the TS shell:
which forwards
--debugto the Go binary formigration squash,db test,db remote commit|changesand bootstrap's push step.Sol:
The proxy now does libpq's SSLRequest handshake itself with the
tls.Configpgx resolved,then hands pgx an in-memory pipe. It has to own TLS because
DialFuncsits below it, which is why the original just nulled it.Frames decrypt in process, the socket stays encrypted, verification is unchanged, and a refusal fails the dial instead of continuing in plaintext....
Also drops the now false
SSL connection is not supported with --debug flaghint from both shells.It was never true in TS, where
--debughas never disabled TLS.Ref