René's URL Explorer Experiment


Title: fix(sandbox): mask the session's CLI capability in returned sandbox output by waleedlatif1 · Pull Request #8498 · simstudioai/sim · GitHub

Open Graph Title: fix(sandbox): mask the session's CLI capability in returned sandbox output by waleedlatif1 · Pull Request #8498 · simstudioai/sim

X Title: fix(sandbox): mask the session's CLI capability in returned sandbox output by waleedlatif1 · Pull Request #8498 · simstudioai/sim

Description: Summary Addresses the release review finding on apps/sim/lib/execution/remote-sandbox/index.ts (the provenance check ignores the session's environment): code running in a Chat sandbox session could print SIM_API_KEY and the token-bearing SIM_ENDPOINT, and the values came back unmasked to the model and the transcript. Root cause buildMothershipSandboxSession exported the per-call CLI capability (SIM_API_KEY and the scoped SIM_ENDPOINT) through session.envs, which executeInSandbox / executeShellInSandbox spread into the process environment. Nothing in the output path knew those values were sensitive, so env, echo $SIM_API_KEY, a traceback, or a returned result carried them verbatim. This is pre-existing (it predates the previous release), not a regression from the release diff. Fix SandboxSessionRequest gains secretEnvs: variables present on every execution whose values are masked in its output. The Chat session builder puts SIM_API_KEY and SIM_ENDPOINT in secretEnvs; SIM_WORKSPACE / SIM_ORGANIZATION_ID stay in envs. Both sandbox entry points mask those values (plus their URI/form-encoded forms, via the existing redactKnownSensitiveValues) in stdout, stderr, the __SIM_RESULT__ payload and error text, before anything is parsed or returned. Exported files are masked too: declared text exports like stdout, and binary declared files plus everything harvested from SIM_OUTPUT_DIR over their raw bytes (latin1 round trip, so every other byte survives unchanged; byteLength is recomputed). Non-session executions skip this entirely. Behaviour changes Sandbox output that contains the session capability now shows [REDACTED] in its place. Programs still receive the real values in their environment, so the CLI works unchanged. Secret provenance recording is unchanged: the capability is not a user secret, so it does not taint the machine. Severity context The capability is short-lived: a fresh key per tool call, only its hash stored, accepted only while the tool call's Redis scope and the run's ownership lease are both live, and revoked in the scope's finally before the result reaches the model. This change is defense in depth so a printed copy never lands in the transcript or logs at all. Not changed Moving the key out of the process environment into a SIM_API_KEY_FILE was considered and left out: it changes the CLI contract, and masking already covers what is returned. Test plan New session-sandbox.test.ts case, for code and shell, completing and failing: the program receives the real values, and the returned result contains neither the key, the endpoint, nor its URI-encoded form, while non-secret session envs stay visible New file-export case, for code and shell: a declared text file, a declared binary file and a harvested file carrying the key and the URI-encoded endpoint come back masked, with non-UTF-8 bytes intact Confirmed each masking branch goes red when reverted on its own, and green with it sandbox-session.test.ts updated for the envs / secretEnvs split vitest run lib/execution lib/mothership/tools and lib/function-execution bun run lint, bun run type-check, bun run check:audits

Open Graph Description: Summary Addresses the release review finding on apps/sim/lib/execution/remote-sandbox/index.ts (the provenance check ignores the session's environment): code running in a Chat sandbox session c...

X Description: Summary Addresses the release review finding on apps/sim/lib/execution/remote-sandbox/index.ts (the provenance check ignores the session's environment): code running in a Chat sandbox sessi...

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

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:8e0a67eb-cd8d-4f14-a613-915937426635
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idEBC8:3743C5:277A34:36493E:6AFB927E
html-safe-nonce456d69f5b1450bf57b9ca1b24222de3b55b92c35f944cbb17662e7b7c94f6cbf
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFQkM4OjM3NDNDNToyNzdBMzQ6MzY0OTNFOjZBRkI5MjdFIiwidmlzaXRvcl9pZCI6IjUyODcyMTg3NDc3NTY3NTUxOCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb7bf40ac2f69fd3469acfbd0920658cd8a5676d5ef95342b1e80820f5ac77c27
hovercard-subject-tagpull_request:4697979829
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/8498/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 Addresses the release review finding on apps/sim/lib/execution/remote-sandbox/index.ts (the provenance check ignores the session's environment): code running in a Chat sandbox session c...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None4f01efe06174a5ba6342fd58e42d02295e0675bedbb465d6bef2dbaec8e46556
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
releasea52db8866b6543b4e83730cd6a6b1360f1a9e4dc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/8498/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F8498%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%2F8498%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/8498/files
Reloadhttps://github.com/simstudioai/sim/pull/8498/files
Reloadhttps://github.com/simstudioai/sim/pull/8498/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests198 (198)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/sandbox-redact-session-capabilityhttps://github.com/simstudioai/sim/tree/fix/sandbox-redact-session-capability
Conversation 22 https://github.com/simstudioai/sim/pull/8498
Commits 2 https://github.com/simstudioai/sim/pull/8498/commits
Checks 32 https://github.com/simstudioai/sim/pull/8498/checks
Files changed https://github.com/simstudioai/sim/pull/8498/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/files
fix(sandbox): mask the session's CLI capability in returned sandbox output https://github.com/simstudioai/sim/pull/8498/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/8498/files
919b566 fix(sandbox): mask the session's CLI capability in returned sandbox o… waleedlatif1 Oct 1, 2026 https://github.com/simstudioai/sim/pull/8498/commits/919b56688a3fae3b1b0c5a86220839132fdb2637
6cc8341 fix(sandbox): mask the session's capability in exported and harvested… waleedlatif1 Oct 1, 2026 https://github.com/simstudioai/sim/pull/8498/commits/6cc8341cca96514097f30497fbb98f24c969304d
Clear filters https://github.com/simstudioai/sim/pull/8498/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/files
index.ts https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
session-sandbox.test.ts https://github.com/simstudioai/sim/pull/8498/files#diff-93993881944d4232c1cecf96599ad647e51ea63369e46347edab5f349eb6cfd2
types.ts https://github.com/simstudioai/sim/pull/8498/files#diff-a956fe3fea088fe237d431cb20fe73201f4c5feb647827ce7021cc35a4eda2d8
sandbox-session.test.ts https://github.com/simstudioai/sim/pull/8498/files#diff-ad7205ceb3a5104195b13a1f8e5dca623497e0b5264af3e95edfe47ddca52839
sandbox-session.ts https://github.com/simstudioai/sim/pull/8498/files#diff-4b9c2e4e25e141b646e54bf5c8b3ed8abbed88806106ec31166718acedb3871d
apps/sim/lib/execution/remote-sandbox/index.tshttps://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
View file https://github.com/simstudioai/sim/blob/6cc8341cca96514097f30497fbb98f24c969304d/apps/sim/lib/execution/remote-sandbox/index.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8498/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
greptile-appshttps://github.com/apps/greptile-apps
Oct 1, 2026https://github.com/simstudioai/sim/pull/8498/files#r4151094334
Learn morehttps://docs.github.com/articles/managing-disruptive-comments/#hiding-a-comment
https://github.com/simstudioai/sim/pull/8498/files
https://github.com/simstudioai/sim/pull/8498/files
Agent execution and sandbox taskshttps://app.greptile.com/sim/-/custom-context/knowledge-base/simstudioai/sim/-/docs/agent-execution.md
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/files
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/files
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/files
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
https://github.com/simstudioai/sim/pull/8498/files#diff-45bb4d66958fbda0e750b34264c092e3ed4f472e7bff507cee5875a58b2d3ef4
apps/sim/lib/execution/remote-sandbox/session-sandbox.test.tshttps://github.com/simstudioai/sim/pull/8498/files#diff-93993881944d4232c1cecf96599ad647e51ea63369e46347edab5f349eb6cfd2
View file https://github.com/simstudioai/sim/blob/6cc8341cca96514097f30497fbb98f24c969304d/apps/sim/lib/execution/remote-sandbox/session-sandbox.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8498/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8498/files#diff-93993881944d4232c1cecf96599ad647e51ea63369e46347edab5f349eb6cfd2
https://github.com/simstudioai/sim/pull/8498/files#diff-93993881944d4232c1cecf96599ad647e51ea63369e46347edab5f349eb6cfd2
apps/sim/lib/execution/remote-sandbox/types.tshttps://github.com/simstudioai/sim/pull/8498/files#diff-a956fe3fea088fe237d431cb20fe73201f4c5feb647827ce7021cc35a4eda2d8
View file https://github.com/simstudioai/sim/blob/6cc8341cca96514097f30497fbb98f24c969304d/apps/sim/lib/execution/remote-sandbox/types.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8498/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8498/files#diff-a956fe3fea088fe237d431cb20fe73201f4c5feb647827ce7021cc35a4eda2d8
https://github.com/simstudioai/sim/pull/8498/files#diff-a956fe3fea088fe237d431cb20fe73201f4c5feb647827ce7021cc35a4eda2d8
apps/sim/lib/mothership/tools/sandbox-session.test.tshttps://github.com/simstudioai/sim/pull/8498/files#diff-ad7205ceb3a5104195b13a1f8e5dca623497e0b5264af3e95edfe47ddca52839
View file https://github.com/simstudioai/sim/blob/6cc8341cca96514097f30497fbb98f24c969304d/apps/sim/lib/mothership/tools/sandbox-session.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8498/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8498/files#diff-ad7205ceb3a5104195b13a1f8e5dca623497e0b5264af3e95edfe47ddca52839
https://github.com/simstudioai/sim/pull/8498/files#diff-ad7205ceb3a5104195b13a1f8e5dca623497e0b5264af3e95edfe47ddca52839
https://github.com/simstudioai/sim/pull/8498/files#diff-ad7205ceb3a5104195b13a1f8e5dca623497e0b5264af3e95edfe47ddca52839
apps/sim/lib/mothership/tools/sandbox-session.tshttps://github.com/simstudioai/sim/pull/8498/files#diff-4b9c2e4e25e141b646e54bf5c8b3ed8abbed88806106ec31166718acedb3871d
View file https://github.com/simstudioai/sim/blob/6cc8341cca96514097f30497fbb98f24c969304d/apps/sim/lib/mothership/tools/sandbox-session.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/8498/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/8498/files#diff-4b9c2e4e25e141b646e54bf5c8b3ed8abbed88806106ec31166718acedb3871d
https://github.com/simstudioai/sim/pull/8498/files#diff-4b9c2e4e25e141b646e54bf5c8b3ed8abbed88806106ec31166718acedb3871d
Please reload this pagehttps://github.com/simstudioai/sim/pull/8498/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.