René's URL Explorer Experiment


Title: improvement(secrets): gate Copilot code mounting at use level by icecrasher321 · Pull Request #7004 · simstudioai/sim · GitHub

Open Graph Title: improvement(secrets): gate Copilot code mounting at use level by icecrasher321 · Pull Request #7004 · simstudioai/sim

X Title: improvement(secrets): gate Copilot code mounting at use level by icecrasher321 · Pull Request #7004 · simstudioai/sim

Description: What Mounting a saved secret into Copilot code required credential-admin on that key. A workflow Function block resolves the same secret for the same person at use level, via getPersonalAndWorkspaceEnv. This aligns the two. Why the admin bar wasn't buying anything Copilot can reach the workflow path itself — edit_workflow (lib/copilot/tools/handlers/workflow/mutations.ts) plus run_workflow (lib/copilot/tools/workflow-tools.ts:11-16). "Add a Function block containing {{KEY}}, run it, remove the block" reads the value using tools with no view gate. So the gate only redirected a Credential Member through a detour that mutates a persisted workflow, while the direct path is ephemeral and files a usage row. The inconsistency was also internal to Copilot. The secret names advertised to the model come from getAccessibleEnvCredentials (chat/workspace-context.ts:524) and getPersonalAndWorkspaceEnv (vfs/workspace-vfs.ts:3091), both role-agnostic — so Copilot listed every secret the caller could use, then refused to mount all but the admin ones. Change activeAdmin (role === 'admin' && status === 'active') → activeGrant (status === 'active'), applied to both the workspace and shared-personal predicates, with the matching eq(credentialMember.role, 'admin') removed from the query. Shared-personal is relaxed too, not just workspace: getPersonalAndWorkspaceEnv already resolves a member-level grant on someone else's personal secret, so leaving that strict would reproduce the same half-consistency one level down. Unchanged: workspace write is still required; revoked and pending grants still refused; no grant still gets nothing; model-egress projection untouched; usage rows still filed (function-execute.ts:801). What still holds the line The view gate stays where Copilot cannot route around it — values stay masked under Settings → Secrets (maskWorkspaceEnvForViewer), and See usage stays admin-only (lib/secrets/application/use-cases.ts:370-409). A member using a secret in code is recorded for whoever can rotate it. Verified no redaction anywhere is conditional on view rights, so this cannot open a masking hole. Behaviour Member with write + role=member on STRIPE_SECRET_KEY Before After Settings → Secrets "" "" Ask Sim to run code CopilotCodeSecretAccessError mounts, usage row filed Function block on canvas mounts mounts Revoked / pending / no grant denied denied See usage trail admin-only admin-only One behavioural note: selectDistinctOn now picks among member-granted shared-personal rows too, so for a name shared by two people the most-recently-updated credential wins — converging on the updatedAt desc rule getPersonalAndWorkspaceEnv already uses. Docs platform/credentials.mdx — the Copilot section now states the use-level rule and why it differs from the read gate. Also corrected two pre-existing inaccuracies in the Workspace vs. Personal table: "Visibility → All workspace members" implied values were visible to all members (only names are), and "Who can edit → Workspace admins" omitted per-secret Credential Admins. Not in scope Inbox keeps its own, tighter actor resolution (resolveInboxExecutionActor: sender-match or null) and is deliberately untouched — an unmatched sender still mounts nothing. Separately, an allowlisted external sender executes as ws.ownerId with autoExecuteTools: true and no permission gating (tool permissions are interactive-only, lifecycle/run.ts:205-215); whether the headless toolset exposes edit_workflow/run_workflow there is untraced and worth its own issue. Test plan secret-mount-materializer.server.test.ts — 26 passed. Added a member/active mount case, added member/revoked + member/pending to the denial matrix, extended the shared-personal case over both roles, and added a revoked shared-personal denial. The two "unauthorized workspace value" precedence tests now use a revoked grant so they keep testing precedence-on-denial. function-execute + resolved-secret-result + environment/utils — 90 passed. bun run type-check clean, biome clean. 🤖 Generated with Claude Code

Open Graph Description: What Mounting a saved secret into Copilot code required credential-admin on that key. A workflow Function block resolves the same secret for the same person at use level, via getPersonalAndWorkspac...

X Description: What Mounting a saved secret into Copilot code required credential-admin on that key. A workflow Function block resolves the same secret for the same person at use level, via getPersonalAndWorkspac...

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

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:16d7cf4e-10d4-7d6e-f40b-f89b3c94cb6b
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-idC9C6:375283:116604:18640B:6AFB4C82
html-safe-nonce85441316b72c472333dedfbf3ebcc16294e84d98c453b16f1ed50461076a7856
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUM2OjM3NTI4MzoxMTY2MDQ6MTg2NDBCOjZBRkI0QzgyIiwidmlzaXRvcl9pZCI6Ijc2NDI3NDU0NDczNTIyMzA2IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacb356b591669f73fb5f33302a5ce0416acebdb520dd2fc1462d59bd7f27f6fbe6
hovercard-subject-tagpull_request:4340430043
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/7004/files
twitter:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/17950982?s=400&v=4
og:image:altWhat Mounting a saved secret into Copilot code required credential-admin on that key. A workflow Function block resolves the same secret for the same person at use level, via getPersonalAndWorkspac...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
Noneacf7616d06cc051644705b379878c9bb13dc5e70ecf4ffd9b34140f8ac01d7e1
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
release26504db649b58525278f77a52b80ba5f10d5f4de
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/simstudioai/sim/pull/7004/files#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fsimstudioai%2Fsim%2Fpull%2F7004%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%2F7004%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/7004/files
Reloadhttps://github.com/simstudioai/sim/pull/7004/files
Reloadhttps://github.com/simstudioai/sim/pull/7004/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
icecrasher321https://github.com/icecrasher321
staginghttps://github.com/simstudioai/sim/tree/staging
improvement/copilot-secret-mount-use-levelhttps://github.com/simstudioai/sim/tree/improvement/copilot-secret-mount-use-level
Conversation 7 https://github.com/simstudioai/sim/pull/7004
Commits 2 https://github.com/simstudioai/sim/pull/7004/commits
Checks 30 https://github.com/simstudioai/sim/pull/7004/checks
Files changed https://github.com/simstudioai/sim/pull/7004/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7004/files
improvement(secrets): gate Copilot code mounting at use level https://github.com/simstudioai/sim/pull/7004/files#top
Show all changes 2 commits https://github.com/simstudioai/sim/pull/7004/files
e16f36d improvement(secrets): gate Copilot code mounting at use level Aug 23, 2026 https://github.com/simstudioai/sim/pull/7004/commits/e16f36dda89f624f6727fbd8d2f062c5289dc583
3ea842f docs(secrets): stop implying Personal secrets are shareable Aug 23, 2026 https://github.com/simstudioai/sim/pull/7004/commits/3ea842f8bd05d77cc233836c510d422725328297
Clear filters https://github.com/simstudioai/sim/pull/7004/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7004/files
Please reload this pagehttps://github.com/simstudioai/sim/pull/7004/files
credentials.mdx https://github.com/simstudioai/sim/pull/7004/files#diff-892f3f197f358b219eb964af5832495d841a2985a5bdd07135d69233a7c07286
secret-mount-materializer.server.test.ts https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
secret-mount-materializer.server.ts https://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
apps/docs/content/docs/en/platform/credentials.mdxhttps://github.com/simstudioai/sim/pull/7004/files#diff-892f3f197f358b219eb964af5832495d841a2985a5bdd07135d69233a7c07286
View file https://github.com/simstudioai/sim/blob/3ea842f8bd05d77cc233836c510d422725328297/apps/docs/content/docs/en/platform/credentials.mdx
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7004/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7004/files#diff-892f3f197f358b219eb964af5832495d841a2985a5bdd07135d69233a7c07286
https://github.com/simstudioai/sim/pull/7004/files#diff-892f3f197f358b219eb964af5832495d841a2985a5bdd07135d69233a7c07286
https://github.com/simstudioai/sim/pull/7004/files#diff-892f3f197f358b219eb964af5832495d841a2985a5bdd07135d69233a7c07286
Please reload this pagehttps://github.com/simstudioai/sim/pull/7004/files
https://github.com/simstudioai/sim/pull/7004/files#diff-892f3f197f358b219eb964af5832495d841a2985a5bdd07135d69233a7c07286
apps/sim/lib/copilot/tools/secret-mount-materializer.server.test.tshttps://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
View file https://github.com/simstudioai/sim/blob/3ea842f8bd05d77cc233836c510d422725328297/apps/sim/lib/copilot/tools/secret-mount-materializer.server.test.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7004/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
https://github.com/simstudioai/sim/pull/7004/files#diff-2473dc051521328c19bfc8422b1969c5d7464b76dc109f3c6696bb67d0f5425a
apps/sim/lib/copilot/tools/secret-mount-materializer.server.tshttps://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
View file https://github.com/simstudioai/sim/blob/3ea842f8bd05d77cc233836c510d422725328297/apps/sim/lib/copilot/tools/secret-mount-materializer.server.ts
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/simstudioai/sim/pull/7004/{{ revealButtonHref }}
https://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
https://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
https://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
https://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
https://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
https://github.com/simstudioai/sim/pull/7004/files#diff-37b0a1db66cd4ef9f8fa54131c77bd348bb03547d5d8a7f98acebc93fec1ec72
Please reload this pagehttps://github.com/simstudioai/sim/pull/7004/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.