Skip to content

Conversation

nurul3101
Copy link
Member

@nurul3101 nurul3101 commented Aug 26, 2025

Summary by CodeRabbit

  • Bug Fixes
    • Enforces SSL for direct database connections by default, improving connection security.
    • Applies only when a direct host is configured; other connection paths are unchanged.
    • No changes to public APIs or configuration formats; existing setups with SSL-ready databases continue to work without adjustments.

Copy link

coderabbitai bot commented Aug 26, 2025

Walkthrough

The 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

Cohort / File(s) Summary of Changes
Direct connection SSL enforcement
create-db/index.js
Appends ?sslmode=require to the direct PostgreSQL connection string when a direct host is present; affects directConn and resulting directConnectionString. No changes to exported/public signatures.

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 Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/add-sslmode

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

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

Copy link

Preview CLIs & Workers are live!

Test the CLIs locally under tag pr46-feat-add-sslmode-17243005030:

npx create-db@pr46
npx create-pg@pr46
npx create-postgres@$pr46

Worker URLs
• Create-DB Worker:
• Claim-DB Worker:

These will live as long as this PR exists under tag pr46-feat-add-sslmode-17243005030.

Copy link

@coderabbitai coderabbitai bot left a 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 1caa532 and 961f64f.

📒 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 strings

Appending ?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 to ssl.rejectUnauthorized = false) (node-postgres.com, scaleway.com).
  • No other occurrences of ssl= or sslmode= 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, and create-pg consistently use the postgresql:// prefix (Node pg also supports postgres://, so either works) (npmjs.com).
  • If consumers require full server-certificate verification, they can pass a driver-specific SSL config object (e.g.
    new Client({
      connectionString: 'postgresql://…?sslmode=require',
      ssl: { rejectUnauthorized: true, ca: fs.readFileSync('root.crt') },
    })
    ) rather than relying solely on the URI parameter.

Not a blocker—this string will work for Node pg users.

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.

1 participant