-
Notifications
You must be signed in to change notification settings - Fork 1
Add sslmode=require parameter to direct postgres connection string #46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
WalkthroughThe direct PostgreSQL connection string construction in create-db/index.js now appends ?sslmode=require when a direct host is used. This modifies the directConn value and its output (directConnectionString) without changing control flow, error handling, or exported/public entity signatures. Changes
Tip 🔌 Remote MCP (Model Context Protocol) integration is now available!Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats. ✨ Finishing Touches
🧪 Generate unit tests
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
Deploying with
|
Status | Name | Latest Commit | Preview URL | Updated (UTC) |
---|---|---|---|---|
✅ Deployment successful! View logs |
claim-db-worker | 961f64f | Commit Preview URL Branch Preview URL |
Aug 26 2025, 03:33 PM |
✅ Preview CLIs & Workers are live! Test the CLIs locally under tag npx create-db@pr46
npx create-pg@pr46
npx create-postgres@$pr46 Worker URLs
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
💡 Knowledge Base configuration:
- MCP integration is disabled by default for public repositories
- Jira integration is disabled by default for public repositories
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
📒 Files selected for processing (1)
create-db/index.js
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: Workers Builds: create-db-worker
- GitHub Check: Workers Builds: claim-db-worker
🔇 Additional comments (2)
create-db/index.js (2)
365-367
: Solid default: enforce TLS on direct connection stringsAppending
?sslmode=require
for the direct connection is a sensible baseline. It aligns with best practices (avoids accidental plaintext connections) and keeps the change tightly scoped with no control-flow impact. LGTM.
365-367
: Quick compatibility sweep
- Verified that Node
pg
(node-postgres) parses and honors?sslmode=require
in a connection URI (it enables TLS without certificate verification by mapping tossl.rejectUnauthorized = false
) (node-postgres.com, scaleway.com).- No other occurrences of
ssl=
orsslmode=
were found in the repo except at create-db/index.js:366, so there’s no duplicate or conflicting guidance.- All README snippets under
create-db
,create-postgres
, andcreate-pg
consistently use thepostgresql://
prefix (Nodepg
also supportspostgres://
, so either works) (npmjs.com).- If consumers require full server-certificate verification, they can pass a driver-specific SSL config object (e.g.
) rather than relying solely on the URI parameter.new Client({ connectionString: 'postgresql://…?sslmode=require', ssl: { rejectUnauthorized: true, ca: fs.readFileSync('root.crt') }, })Not a blocker—this string will work for Node
pg
users.
Summary by CodeRabbit