René's URL Explorer Experiment


Title: fix(connectors): allow self-hosted private DB hosts via opt-in flag by waleedlatif1 · Pull Request #5322 · simstudioai/sim · GitHub

Open Graph Title: fix(connectors): allow self-hosted private DB hosts via opt-in flag by waleedlatif1 · Pull Request #5322 · simstudioai/sim

X Title: fix(connectors): allow self-hosted private DB hosts via opt-in flag by waleedlatif1 · Pull Request #5322 · simstudioai/sim

Description: Summary Database/connector tools (PostgreSQL, MySQL, MongoDB, Redis, SSH, SFTP, SMTP, IMAP, Neo4j, ClickHouse) all route through validateDatabaseHost, which unconditionally rejected any host resolving to a private/reserved/loopback IP. This blocks the common self-hosted topology where the DB is reached by a Docker/K8s/Swarm service name (e.g. db → internal IP). Reported in #4319. Added opt-in ALLOW_PRIVATE_DATABASE_HOSTS env flag. When set on a self-hosted deployment, validateDatabaseHost bypasses the private/reserved/loopback block but still resolves and pins DNS (DNS-rebind protection preserved). Flag is hard-blocked on the hosted platform (&& !isHosted) regardless of the env var, and logs a warn/error on startup — same shape as DISABLE_AUTH. Default behavior is unchanged when the flag is unset. One shared fix covers all 10 connectors. Documented in .env.example; added 9 regression tests (hosted-blocked, self-host default-blocked, self-host opt-in allowed, IP pinning, unresolvable host). Type of Change Bug fix Testing Tested manually — input-validation suite passes (435 tests), tsc and biome clean. Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing No new warnings introduced I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Open Graph Description: Summary Database/connector tools (PostgreSQL, MySQL, MongoDB, Redis, SSH, SFTP, SMTP, IMAP, Neo4j, ClickHouse) all route through validateDatabaseHost, which unconditionally rejected any host resol...

X Description: Summary Database/connector tools (PostgreSQL, MySQL, MongoDB, Redis, SSH, SFTP, SMTP, IMAP, Neo4j, ClickHouse) all route through validateDatabaseHost, which unconditionally rejected any host resol...

Opengraph URL: https://github.com/simstudioai/sim/pull/5322

X: @github

direct link

Domain: github.com

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf
route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:9d591f05-c06e-5c4e-c8ff-2aebb41703bf
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id9792:5A71D:84C926:B694B3:6AFB4675
html-safe-nonce01e8dc498bce2ebe8a3a644dabd13ac8c80b91f98a43a8a77b89006f458d4426
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NzkyOjVBNzFEOjg0QzkyNjpCNjk0QjM6NkFGQjQ2NzUiLCJ2aXNpdG9yX2lkIjoiNjgyMDM0Mzc2MzU5MjQ5Njc1NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmac6b06d9e6ef0f1c5eb3530e30505cda383873af58081b9644e96c23380d0c7059
hovercard-subject-tagpull_request:3972832707
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5322/files
twitter:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/40672544?s=400&v=4
og:image:altSummary Database/connector tools (PostgreSQL, MySQL, MongoDB, Redis, SSH, SFTP, SMTP, IMAP, Neo4j, ClickHouse) all route through validateDatabaseHost, which unconditionally rejected any host resol...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noned849b928f455c800985398e7f1b659425adb312a5fa14fba5d9a14e62e9fe5dd
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/simstudioai/sim git https://github.com/simstudioai/sim.git
octolytics-dimension-user_id199344406
octolytics-dimension-user_loginsimstudioai
octolytics-dimension-repository_id912559512
octolytics-dimension-repository_nwosimstudioai/sim
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id912559512
octolytics-dimension-repository_network_root_nwosimstudioai/sim
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releasea6c2f87cbcb6414452377b4967858ed6a66f1109
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/5322/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5322%2Ffiles
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F5322%2Ffiles
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=simstudioai%2Fsim
Reloadhttps://github.com/simstudioai/sim/pull/5322/files
Reloadhttps://github.com/simstudioai/sim/pull/5322/files
Reloadhttps://github.com/simstudioai/sim/pull/5322/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests199 (199)https://github.com/simstudioai/sim/pulls
Actionshttps://github.com/simstudioai/sim/actions
Projectshttps://github.com/simstudioai/sim/projects
Security and qualityhttps://github.com/simstudioai/sim/security
Insightshttps://github.com/simstudioai/sim/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fsimstudioai%2Fsim%2Fissues%2Fnew%2Fchoose
waleedlatif1https://github.com/waleedlatif1
staginghttps://github.com/simstudioai/sim/tree/staging
worktree-postgres-host-ssrf-selfhosthttps://github.com/simstudioai/sim/tree/worktree-postgres-host-ssrf-selfhost
Conversation 11 https://github.com/simstudioai/sim/pull/5322
Commits 3 https://github.com/simstudioai/sim/pull/5322/commits
Checks 16 https://github.com/simstudioai/sim/pull/5322/checks
Files changed https://github.com/simstudioai/sim/pull/5322/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5322/files
fix(connectors): allow self-hosted private DB hosts via opt-in flag https://github.com/simstudioai/sim/pull/5322/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/5322/files
30816e2 fix(connectors): allow self-hosted private DB hosts via opt-in flag waleedlatif1 Jul 1, 2026 https://github.com/simstudioai/sim/pull/5322/commits/30816e2ef2bdb45430d37d630ded665b5703a754
90f6e6f fix(connectors): pin postgres IP in all ssl modes; strip IPv6 brackets waleedlatif1 Jul 1, 2026 https://github.com/simstudioai/sim/pull/5322/commits/90f6e6f9507f06e30b7ea5cf3945af8bc7a36add
0eeff7a fix(connectors): rename flag to isPrivateDatabaseHostsAllowed; trim c… waleedlatif1 Jul 1, 2026 https://github.com/simstudioai/sim/pull/5322/commits/0eeff7af68f8fe72282099a6804e608333dd61ef
Clear filters https://github.com/simstudioai/sim/pull/5322/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5322/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/5322/files
.env.example https://github.com/simstudioai/sim/pull/5322/files#diff-4a29ce2c9471f5720a7b21936c0716a37c648ef653d7563bfa140153bb045284
utils.test.ts https://github.com/simstudioai/sim/pull/5322/files#diff-ba0fc45e28dfb9164c881e7eaf476c6dd8cda33e022a1e0b0d2f9c4692716f22
utils.ts https://github.com/simstudioai/sim/pull/5322/files#diff-52de8f52e951900471a3bf7c0f25c0844cf3d84cd7ef5b1dd218c9c8f41b341e
env-flags.ts https://github.com/simstudioai/sim/pull/5322/files#diff-38137f5948bf96f0793885f9d45e5ec1297c519b23392dbe94986eb6eeff234c
env.ts https://github.com/simstudioai/sim/pull/5322/files#diff-7db3fc610ff89cf819c4eb69b43ec37ae18530e1861f6c322faeb62f8f48f298
input-validation.server.ts https://github.com/simstudioai/sim/pull/5322/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
input-validation.test.ts https://github.com/simstudioai/sim/pull/5322/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
env-flags.mock.ts https://github.com/simstudioai/sim/pull/5322/files#diff-e42c906d4e4480808f0dc807c9ab61d7f463c023445e88cf1ee840857b5d183e
apps/sim/.env.examplehttps://github.com/simstudioai/sim/pull/5322/files#diff-4a29ce2c9471f5720a7b21936c0716a37c648ef653d7563bfa140153bb045284
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/apps/sim/.env.example
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5322/files#diff-4a29ce2c9471f5720a7b21936c0716a37c648ef653d7563bfa140153bb045284
https://github.com/simstudioai/sim/pull/5322/files#diff-4a29ce2c9471f5720a7b21936c0716a37c648ef653d7563bfa140153bb045284
apps/sim/app/api/tools/postgresql/utils.test.tshttps://github.com/simstudioai/sim/pull/5322/files#diff-ba0fc45e28dfb9164c881e7eaf476c6dd8cda33e022a1e0b0d2f9c4692716f22
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/apps/sim/app/api/tools/postgresql/utils.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
apps/sim/app/api/tools/postgresql/utils.tshttps://github.com/simstudioai/sim/pull/5322/files#diff-52de8f52e951900471a3bf7c0f25c0844cf3d84cd7ef5b1dd218c9c8f41b341e
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/apps/sim/app/api/tools/postgresql/utils.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5322/files#diff-52de8f52e951900471a3bf7c0f25c0844cf3d84cd7ef5b1dd218c9c8f41b341e
https://github.com/simstudioai/sim/pull/5322/files#diff-52de8f52e951900471a3bf7c0f25c0844cf3d84cd7ef5b1dd218c9c8f41b341e
https://github.com/simstudioai/sim/pull/5322/files#diff-52de8f52e951900471a3bf7c0f25c0844cf3d84cd7ef5b1dd218c9c8f41b341e
apps/sim/lib/core/config/env-flags.tshttps://github.com/simstudioai/sim/pull/5322/files#diff-38137f5948bf96f0793885f9d45e5ec1297c519b23392dbe94986eb6eeff234c
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/apps/sim/lib/core/config/env-flags.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5322/files#diff-38137f5948bf96f0793885f9d45e5ec1297c519b23392dbe94986eb6eeff234c
https://github.com/simstudioai/sim/pull/5322/files#diff-38137f5948bf96f0793885f9d45e5ec1297c519b23392dbe94986eb6eeff234c
apps/sim/lib/core/config/env.tshttps://github.com/simstudioai/sim/pull/5322/files#diff-7db3fc610ff89cf819c4eb69b43ec37ae18530e1861f6c322faeb62f8f48f298
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/apps/sim/lib/core/config/env.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5322/files#diff-7db3fc610ff89cf819c4eb69b43ec37ae18530e1861f6c322faeb62f8f48f298
https://github.com/simstudioai/sim/pull/5322/files#diff-7db3fc610ff89cf819c4eb69b43ec37ae18530e1861f6c322faeb62f8f48f298
apps/sim/lib/core/security/input-validation.server.tshttps://github.com/simstudioai/sim/pull/5322/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/apps/sim/lib/core/security/input-validation.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5322/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
https://github.com/simstudioai/sim/pull/5322/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
https://github.com/simstudioai/sim/pull/5322/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
https://github.com/simstudioai/sim/pull/5322/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
https://github.com/simstudioai/sim/pull/5322/files#diff-6aff011dd9656fc3e2283ce7a33580a51622749a977dcacb0b75050284426798
apps/sim/lib/core/security/input-validation.test.tshttps://github.com/simstudioai/sim/pull/5322/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/apps/sim/lib/core/security/input-validation.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5322/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/5322/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/5322/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/5322/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
packages/testing/src/mocks/env-flags.mock.tshttps://github.com/simstudioai/sim/pull/5322/files#diff-e42c906d4e4480808f0dc807c9ab61d7f463c023445e88cf1ee840857b5d183e
View file https://github.com/simstudioai/sim/blob/0eeff7af68f8fe72282099a6804e608333dd61ef/packages/testing/src/mocks/env-flags.mock.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/5322/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/5322/files#diff-e42c906d4e4480808f0dc807c9ab61d7f463c023445e88cf1ee840857b5d183e
https://github.com/simstudioai/sim/pull/5322/files#diff-e42c906d4e4480808f0dc807c9ab61d7f463c023445e88cf1ee840857b5d183e
Please reload this pagehttps://github.com/simstudioai/sim/pull/5322/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.