René's URL Explorer Experiment


Title: fix(security): validate cloud region/project inputs and bind vertex credentials to the executing workspace by waleedlatif1 · Pull Request #6167 · simstudioai/sim · GitHub

Open Graph Title: fix(security): validate cloud region/project inputs and bind vertex credentials to the executing workspace by waleedlatif1 · Pull Request #6167 · simstudioai/sim

X Title: fix(security): validate cloud region/project inputs and bind vertex credentials to the executing workspace by waleedlatif1 · Pull Request #6167 · simstudioai/sim

Description: Summary Validate vertexLocation before it reaches @google/genai. The SDK builds its base URL as `https://${location}-aiplatform.googleapis.com/` — a literal interpolation into the hostname — so attacker.tld/x terminates the authority and the auth client still attaches Authorization: Bearer to the attacker's host. Runtime-confirmed against production via POST /api/guardrails/validate, which needs only a session cookie. Same treatment for the two siblings in the same bug class: vertexProject (interpolated into the URL path) and the Bedrock region (interpolated into the endpoint hostname, now using the pre-existing validateAwsRegion). azureEndpoint was already routed through the DNS-pinning SSRF guard and needed no change. Bind Vertex credential resolution to the executing workspace. resolveVertexCredential enforced only the user↔credential predicate; authorizeCredentialUse also enforces workflow-workspace↔credential. A credential held in workspace B could be pasted into a workflow in workspace A and consumed by A's principals — including on deployed runs, where enforceCredentialAccess is false and ctx.userId is the workflow owner rather than the trigger caller. Service-account credentials mint a cloud-platform-scoped token, so this handed A the use of B's GCP identity. Details Chokepoint. Two new validators (validateGoogleCloudLocation, validateGoogleCloudProject) live next to the existing validateAwsRegion in the shared input-validation module and are applied in each provider's executeRequest. There is exactly one vertexai: true construction site in the repo, so every path — agent/router/evaluator/translate blocks, /api/providers, /api/guardrails/validate — goes through them. Nothing containing /, :, @, ?, #, or whitespace can pass. Credential binding. getCredentialActorContext resolves the workspace from the credential row itself, so it structurally cannot express the workflow-workspace predicate. resolveVertexCredential now takes the executing workspaceId (params object, since the arg list grew) and rejects a mismatch with the same message credential-access.ts uses. All four call sites pass ctx.workspaceId, already in scope at each. Routing through authorizeCredentialUse directly was the other option but it needs a NextRequest the executor does not have. Regression audit ExecutionContext.workspaceId is optional in the type, so the binding check is conditional — but execution-core.ts:356 throws when execution metadata lacks a workspace, so it is always present on real runs. No bypass by omission. credential.workspaceId is NOT NULL, so there is no personal/unscoped credential the new check could wrongly reject. Custom-block children deliberately run under the source workspace (childWorkspaceId = childWorkflow.workspaceId) with childUserId = loadUserId; the new check follows that boundary rather than fighting it. Regular child workflows already go through assertChildWorkflowInWorkspace. Mixed-case locations like US-Central1 work today (DNS is case-insensitive), so the provider lowercases before validating instead of rejecting input that currently succeeds. Second commit. Neither providers/vertex nor providers/bedrock is imported from any client module, so pulling in the validation module adds nothing to a client bundle. check:client-boundary passes. Legacy domain-scoped project ids (google.com:my-project) would be rejected by the project validator. They cannot be created anymore and none are expected here. Type of Change Bug fix Testing providers/vertex/index.test.ts (new) — malicious locations and projects throw and never construct the client; valid values pass through; mixed case normalizes; the us-central1 default still applies. executor/utils/vertex-credential.test.ts (new) — cross-workspace credential rejected before any token is minted; same-workspace still resolves; the user↔credential check still fires. lib/core/security/input-validation.test.ts — table-driven cases for both validators covering every authority-terminating character class. Each fix was reverted and the suites re-run to confirm they go red (7 failures) rather than passing vacuously. tsc -p apps/sim --noEmit clean, bun run lint clean, bun run check:api-validation passes, check:client-boundary passes. The one failing test in a wider run (executor/handlers/pi/cloud-review-tools.test.ts) fails identically on origin/staging and is unrelated. Not live-tested against a real Vertex deployment — verification is unit-level plus source trace. 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 Validate vertexLocation before it reaches @google/genai. The SDK builds its base URL as `https://${location}-aiplatform.googleapis.com/` — a literal interpolation into the hostname — so at...

X Description: Summary Validate vertexLocation before it reaches @google/genai. The SDK builds its base URL as `https://${location}-aiplatform.googleapis.com/` — a literal interpolation into the hostname — so at...

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

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:30f0e1a1-a1a2-9d71-8c22-a802326971fb
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idED4C:11DC7C:76377B:A24F5E:6AFB4373
html-safe-noncea7ccd2aa69185433efc2ebf5e677cbdf793b3e4edc4bc7e179231982ba1ec53f
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFRDRDOjExREM3Qzo3NjM3N0I6QTI0RjVFOjZBRkI0MzczIiwidmlzaXRvcl9pZCI6IjY0MDMwMTkzNzUwMzYyODU4MTEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmac44e7040bf3f5d98ae671944a9160185b61e12bb4fbdf269eb6d00461aeb53f07
hovercard-subject-tagpull_request:4185096168
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/6167/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 Validate vertexLocation before it reaches @google/genai. The SDK builds its base URL as `https://${location}-aiplatform.googleapis.com/` — a literal interpolation into the hostname — so at...
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/6167/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F6167%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%2F6167%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/6167/files
Reloadhttps://github.com/simstudioai/sim/pull/6167/files
Reloadhttps://github.com/simstudioai/sim/pull/6167/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests200 (200)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
fix/vertex-location-ssrf-and-credential-bindinghttps://github.com/simstudioai/sim/tree/fix/vertex-location-ssrf-and-credential-binding
Conversation 14 https://github.com/simstudioai/sim/pull/6167
Commits 3 https://github.com/simstudioai/sim/pull/6167/commits
Checks 27 https://github.com/simstudioai/sim/pull/6167/checks
Files changed https://github.com/simstudioai/sim/pull/6167/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6167/files
fix(security): validate cloud region/project inputs and bind vertex credentials to the executing workspace https://github.com/simstudioai/sim/pull/6167/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/6167/files
e0e7fb7 fix(security): validate cloud region/project inputs and bind vertex c… waleedlatif1 Aug 1, 2026 https://github.com/simstudioai/sim/pull/6167/commits/e0e7fb70a4da5e6475f245ae756ab815610302bf
95202a8 fix(providers): normalize vertex location case before validating waleedlatif1 Aug 1, 2026 https://github.com/simstudioai/sim/pull/6167/commits/95202a8acfc67f5e14199012373039d51e816f04
270ecbd fix(security): accept AWS European Sovereign Cloud regions in validat… waleedlatif1 Aug 2, 2026 https://github.com/simstudioai/sim/pull/6167/commits/270ecbd3bf7fddf3c74dfb58abf7870844528dd7
Clear filters https://github.com/simstudioai/sim/pull/6167/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6167/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6167/files
agent-handler.ts https://github.com/simstudioai/sim/pull/6167/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
evaluator-handler.ts https://github.com/simstudioai/sim/pull/6167/files#diff-7d18d10452826e76c1d19807f0b549c27e990eaa9388a3f7d8e40f7f3f02f00b
router-handler.ts https://github.com/simstudioai/sim/pull/6167/files#diff-d424ed355d5b10081a98438aef5cf0f41069330e59d34dc7fe67121b276cbc56
vertex-credential.test.ts https://github.com/simstudioai/sim/pull/6167/files#diff-b6dd1b2975377e38bbf07b837861c50ee2a7ffe57ecffa5699ea8e5f6b46ce82
vertex-credential.ts https://github.com/simstudioai/sim/pull/6167/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
input-validation.test.ts https://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
input-validation.ts https://github.com/simstudioai/sim/pull/6167/files#diff-69599ab9ede3d937e027206bfbbaef65edcfeae21ad92d8b3d69fd5d11f8adf6
index.ts https://github.com/simstudioai/sim/pull/6167/files#diff-430edca940fea52c2016798b697ebf99e67d20319f3f4ae0badc79a78db9b4a1
index.test.ts https://github.com/simstudioai/sim/pull/6167/files#diff-6315a0c5f0b457ca02d98fd79a5dec5d4ddc9911141245d65619daee92ebb8ee
index.ts https://github.com/simstudioai/sim/pull/6167/files#diff-92d0dca7d314fd7255af5fbbd81d3997f9d0c6bf9ac4d77f2ad2b806b515b9ec
apps/sim/executor/handlers/agent/agent-handler.tshttps://github.com/simstudioai/sim/pull/6167/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
View file https://github.com/simstudioai/sim/blob/270ecbd3bf7fddf3c74dfb58abf7870844528dd7/apps/sim/executor/handlers/agent/agent-handler.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6167/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6167/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
https://github.com/simstudioai/sim/pull/6167/files#diff-99cbd7f57b71719ca1561f15e7aecdc9f7a969ae5ea3589aee9fa64b3c9bf614
apps/sim/executor/handlers/evaluator/evaluator-handler.tshttps://github.com/simstudioai/sim/pull/6167/files#diff-7d18d10452826e76c1d19807f0b549c27e990eaa9388a3f7d8e40f7f3f02f00b
View file https://github.com/simstudioai/sim/blob/270ecbd3bf7fddf3c74dfb58abf7870844528dd7/apps/sim/executor/handlers/evaluator/evaluator-handler.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6167/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6167/files#diff-7d18d10452826e76c1d19807f0b549c27e990eaa9388a3f7d8e40f7f3f02f00b
https://github.com/simstudioai/sim/pull/6167/files#diff-7d18d10452826e76c1d19807f0b549c27e990eaa9388a3f7d8e40f7f3f02f00b
apps/sim/executor/handlers/router/router-handler.tshttps://github.com/simstudioai/sim/pull/6167/files#diff-d424ed355d5b10081a98438aef5cf0f41069330e59d34dc7fe67121b276cbc56
View file https://github.com/simstudioai/sim/blob/270ecbd3bf7fddf3c74dfb58abf7870844528dd7/apps/sim/executor/handlers/router/router-handler.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6167/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6167/files#diff-d424ed355d5b10081a98438aef5cf0f41069330e59d34dc7fe67121b276cbc56
https://github.com/simstudioai/sim/pull/6167/files#diff-d424ed355d5b10081a98438aef5cf0f41069330e59d34dc7fe67121b276cbc56
https://github.com/simstudioai/sim/pull/6167/files#diff-d424ed355d5b10081a98438aef5cf0f41069330e59d34dc7fe67121b276cbc56
https://github.com/simstudioai/sim/pull/6167/files#diff-d424ed355d5b10081a98438aef5cf0f41069330e59d34dc7fe67121b276cbc56
apps/sim/executor/utils/vertex-credential.test.tshttps://github.com/simstudioai/sim/pull/6167/files#diff-b6dd1b2975377e38bbf07b837861c50ee2a7ffe57ecffa5699ea8e5f6b46ce82
View file https://github.com/simstudioai/sim/blob/270ecbd3bf7fddf3c74dfb58abf7870844528dd7/apps/sim/executor/utils/vertex-credential.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6167/{{ revealButtonHref }}
apps/sim/executor/utils/vertex-credential.tshttps://github.com/simstudioai/sim/pull/6167/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
View file https://github.com/simstudioai/sim/blob/270ecbd3bf7fddf3c74dfb58abf7870844528dd7/apps/sim/executor/utils/vertex-credential.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/6167/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6167/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
https://github.com/simstudioai/sim/pull/6167/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
https://github.com/simstudioai/sim/pull/6167/files#diff-7dd7ca0e92cbc2acf3fa7f1fa8aa61012df7544105f5aa2e6215d5e0fc09e24f
apps/sim/lib/core/security/input-validation.test.tshttps://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
View file https://github.com/simstudioai/sim/blob/270ecbd3bf7fddf3c74dfb58abf7870844528dd7/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/6167/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
https://github.com/simstudioai/sim/pull/6167/files#diff-3fa161edf2857cae95d194e040ac32e0272691ebcbbd04c9776d9dc0465774b5
Please reload this pagehttps://github.com/simstudioai/sim/pull/6167/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/6167/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.