René's URL Explorer Experiment


Title: fix(copilot): re-derive the turn's secret authority on the in-band tool lane by waleedlatif1 · Pull Request #9180 · simstudioai/sim · GitHub

Open Graph Title: fix(copilot): re-derive the turn's secret authority on the in-band tool lane by waleedlatif1 · Pull Request #9180 · simstudioai/sim

X Title: fix(copilot): re-derive the turn's secret authority on the in-band tool lane by waleedlatif1 · Pull Request #9180 · simstudioai/sim

Description: Summary The in-band tool route (POST /api/copilot/tools/execute) rebuilt the tool context from Go's body, which never carries a secret mount policy or secret actor — so run_function/run_code read the absence as "every secret, acting as the body's user" for turns admitted with less (Assistant mode, an inbox email from a non-member, a Mothership block's selected secrets) Headless runs now record the authority their execution context runs under in requestContext.secretAuthority; one function (turnSecretAuthority) produces it for both the context and the record, replacing the three places that assembled it Interactive runs derive it from their saved request: every secret as the turn user, nothing in Assistant mode — the chat surface never narrows it otherwise The route resolves it via getRunSecretAuthority (stream id + user, then chat) alongside the per-turn egress registry, and passes it into the tool context; a call that can't be tied to a run mounts nothing No new write on the turn path (rides the existing headless run insert), no Go change, global default untouched (ordinary chat relies on it) Type of Change Bug fix Testing run-secret-authority.integration.ts against real Postgres (6 tests): recorded authority, interactive agent/build, interactive assistant, unrecorded headless row, malformed record, cross-user/cross-chat/unknown turn — reverting the chat check, the assistant check, or the recorded-scope check turns each red route.test.ts: the tool receives the run's authority, not the default — red without the fix Existing lifecycle/inbox/Mothership-route suites unchanged and passing (196 tests, incl. the assistant-override cases in run.test.ts) bun run lint; type-check and audits in CI Checklist Code follows project style guidelines Self-reviewed my changes Tests added/updated and passing (new tests pass the test-audit authoring gate) 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 The in-band tool route (POST /api/copilot/tools/execute) rebuilt the tool context from Go's body, which never carries a secret mount policy or secret actor — so run_function/run_code r...

X Description: Summary The in-band tool route (POST /api/copilot/tools/execute) rebuilt the tool context from Go's body, which never carries a secret mount policy or secret actor — so run_function/run_co...

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

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:aec6f19f-c8f7-ae2e-86d0-f0f0558ff37b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id80C0:305156:35EFA0:4B9FBB:6AFB56D8
html-safe-noncea9cbe12d55e2ef9644652414012ca2ced5670d9f69a5c07aa72bcde20012eaac
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MEMwOjMwNTE1NjozNUVGQTA6NEI5RkJCOjZBRkI1NkQ4IiwidmlzaXRvcl9pZCI6IjgwODkwOTcxNDc0NDMyNzEzODUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmacc18d166e62de6bb9daf4227878882bf0616e5ea8cf09a136dcc59e91116fbdfb
hovercard-subject-tagpull_request:4902884416
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/9180/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 The in-band tool route (POST /api/copilot/tools/execute) rebuilt the tool context from Go's body, which never carries a secret mount policy or secret actor — so run_function/run_code r...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None7122bb414b542dba14d71a3f0b9f6fd2abce715b9f5912d082800563e6c806d1
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
releasecbf66c024bb6d10e6955baa7413c54cf13a201bb
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/9180/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F9180%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%2F9180%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/9180/files
Reloadhttps://github.com/simstudioai/sim/pull/9180/files
Reloadhttps://github.com/simstudioai/sim/pull/9180/files
simstudioaihttps://github.com/simstudioai
simhttps://github.com/simstudioai/sim
Codehttps://github.com/simstudioai/sim
Issues129 (129)https://github.com/simstudioai/sim/issues
Pull requests197 (197)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/copilot-tools-execute-secret-mounthttps://github.com/simstudioai/sim/tree/fix/copilot-tools-execute-secret-mount
Conversation 19 https://github.com/simstudioai/sim/pull/9180
Commits 3 https://github.com/simstudioai/sim/pull/9180/commits
Checks 52 https://github.com/simstudioai/sim/pull/9180/checks
Files changed https://github.com/simstudioai/sim/pull/9180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9180/files
fix(copilot): re-derive the turn's secret authority on the in-band tool lane https://github.com/simstudioai/sim/pull/9180/files#top
Show all changes 3 commits https://github.com/simstudioai/sim/pull/9180/files
fcb3a8f fix(copilot): re-derive the turn's secret authority on the in-band to… waleedlatif1 Oct 17, 2026 https://github.com/simstudioai/sim/pull/9180/commits/fcb3a8fff98d8e6e810836061d74eb13c26ab0fd
c3d66f0 chore(copilot): shrink ratchets and re-record the tool-registry boundary waleedlatif1 Oct 17, 2026 https://github.com/simstudioai/sim/pull/9180/commits/c3d66f0753d2571fa554f6216752dd0693d6707a
330c278 improvement(copilot): hold the in-band turn context in an lru-cache waleedlatif1 Oct 17, 2026 https://github.com/simstudioai/sim/pull/9180/commits/330c2784530665f45aa0b5021b7ada6112541b66
Clear filters https://github.com/simstudioai/sim/pull/9180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9180/files
route.test.ts https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
route.ts https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
repository.ts https://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
run-secret-authority.integration.ts https://github.com/simstudioai/sim/pull/9180/files#diff-b2a5ab9d02b32886207447e638af774aaa86688b5599dd564198a703be693376
run.ts https://github.com/simstudioai/sim/pull/9180/files#diff-42286b1c13539c62ff83806b87ad5eb1669e4ce1e893862f952cf81cdc440573
secret-mount-policy.ts https://github.com/simstudioai/sim/pull/9180/files#diff-1f2b5979a0000cdf87ccc7874a6d61a11312bbc8b29b2d95cd9a3f8460706024
mothership-async-runs.mock.ts https://github.com/simstudioai/sim/pull/9180/files#diff-8b15894e3920a8efef35a647735b501a6f6965eba0fc36186d83414bd18b6edd
check-test-types.baseline.json https://github.com/simstudioai/sim/pull/9180/files#diff-3f0e52298332b82e821be5c9210ddb89bb43ab248c2db79c27e6a783dbfe9e36
check-tool-registry-boundary.baseline.json https://github.com/simstudioai/sim/pull/9180/files#diff-e7b820ce86615ed78dd6fbaf0b57b20a2ac350d700c3dc0fc6b71207a656e4b7
check-unused-exports.baseline.json https://github.com/simstudioai/sim/pull/9180/files#diff-4b59a8526a4f226dffb0fbf6b8ec25d3082ab45da697f584eaaca4bd483c928f
apps/sim/app/api/copilot/tools/execute/route.test.tshttps://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
View file https://github.com/simstudioai/sim/blob/330c2784530665f45aa0b5021b7ada6112541b66/apps/sim/app/api/copilot/tools/execute/route.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9180/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
https://github.com/simstudioai/sim/pull/9180/files#diff-9d1d04a4f240d4d5b43348f654f1f75b9a90bf4e5a41bcda209b2ae70507d4e4
Please reload this pagehttps://github.com/simstudioai/sim/pull/9180/files
apps/sim/app/api/copilot/tools/execute/route.tshttps://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
View file https://github.com/simstudioai/sim/blob/330c2784530665f45aa0b5021b7ada6112541b66/apps/sim/app/api/copilot/tools/execute/route.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9180/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
Please reload this pagehttps://github.com/simstudioai/sim/pull/9180/files
https://github.com/simstudioai/sim/pull/9180/files#diff-5e74357601221a722cea3b22961f55e2c7d786f2f2f137a54892d37a8d2eb397
apps/sim/lib/mothership/async-runs/repository.tshttps://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
View file https://github.com/simstudioai/sim/blob/330c2784530665f45aa0b5021b7ada6112541b66/apps/sim/lib/mothership/async-runs/repository.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/9180/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
https://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
https://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
https://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
https://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
https://github.com/simstudioai/sim/pull/9180/files#diff-bdd330821217c2b7b7e64b969c999f2d2d57e7cb2f0cd376efcdc1bea63f95fa
Please reload this pagehttps://github.com/simstudioai/sim/pull/9180/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/9180/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.