Title: fix(security): prefer IPv4 when pinning DB and 1Password connections by waleedlatif1 · Pull Request #5799 · simstudioai/sim · GitHub
Open Graph Title: fix(security): prefer IPv4 when pinning DB and 1Password connections by waleedlatif1 · Pull Request #5799 · simstudioai/sim
X Title: fix(security): prefer IPv4 when pinning DB and 1Password connections by waleedlatif1 · Pull Request #5799 · simstudioai/sim
Description: Summary Same class of bug fixed for MCP in #5798, applied to the other two pinned-resolution sites (flagged by both review passes on that PR). SSRF pinning forces each outbound connection to a single resolved IP, which strips Happy Eyeballs' IPv4 fallback. dns.lookup(verbatim) returns the IPv6 address first for dual-stack hosts, so a dual-stack database host or 1Password Connect server gets pinned to IPv6 — unreachable on IPv4-only egress (AWS NAT gateways) and hangs until timeout. validateDatabaseHost and validateConnectServerUrl now resolve all addresses ({ all: true, verbatim: true }) and prefer IPv4; IPv6-only hosts still pin their sole address. Safety SSRF unchanged: the selected (IPv4-preferred) address is the exact one that gets validated (isPrivateOrReservedIP / assertConnectIpAllowed) and pinned — never a "validate A, connect B" split. Equal-or-stricter than before (a private IPv4 is now caught where it was previously masked by an IPv6 pick). No signature/threading changes. Type of Change Bug fix Testing lib/core/security + all DB tool utils (postgresql/clickhouse/mysql) + onepassword suites green (617); tsc + biome clean. Added tests: dual-stack host prefers IPv4; IPv6-only host pins its sole address (onepassword). validateDatabaseHost uses the identical expression, covered by the domain-check test in #5798. 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 Same class of bug fixed for MCP in #5798, applied to the other two pinned-resolution sites (flagged by both review passes on that PR). SSRF pinning forces each outbound connection to a sin...
X Description: Summary Same class of bug fixed for MCP in #5798, applied to the other two pinned-resolution sites (flagged by both review passes on that PR). SSRF pinning forces each outbound connection to a sin...
Opengraph URL: https://github.com/simstudioai/sim/pull/5799
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:158df732-6b2c-1b2e-adde-4756b8b69d1d |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 8F2A:235A9F:89E4C6:C4B78B:6A631AD3 |
| html-safe-nonce | 23997a14f43a68fd12c6ef96f5013dae6ca276f1dc985c855bccb2e76b5cf917 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4RjJBOjIzNUE5Rjo4OUU0QzY6QzRCNzhCOjZBNjMxQUQzIiwidmlzaXRvcl9pZCI6Ijg4Mzc3ODU1NjQzMjAzMDc5MjMiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 5d4b8623523054574ddbb76b21e3bd3b7e22733039e200f76ce3ea28e938e0fc |
| hovercard-subject-tag | pull_request:4096827706 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/5799/files |
| twitter:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/40672544?s=400&v=4 |
| og:image:alt | Summary Same class of bug fixed for MCP in #5798, applied to the other two pinned-resolution sites (flagged by both review passes on that PR). SSRF pinning forces each outbound connection to a sin... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 1a6c056e02f174fffc096c521ec0ff6fb83e40a2ec8cb8875466ec1524872dd6 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 6a93e25585f487ddff9e3996c06d5b869d6e1828 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width