Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Disable forcePublicRepos for enclave-only GitHub MCP backends #60016
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Disable forcePublicRepos for enclave-only GitHub MCP backends #60016
Changes from all commits
bc400b81679a3a900c0e0b54d5a2a15abd4File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L363: shrink: 7-line explanatory warning prose in code comments. Move rationale to docs and keep a 1-line function comment plus concise warning string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[/codebase-design] Good targeted fix — this warning correctly names the discarded config path instead of failing silently, consistent with the codebase's existing pattern (see
console.FormatWarningMessageStderrinagent_validation.go,compiler.go). One gap worth flagging for a follow-up: the dynamic-enclave delegation path (githubBackendIsDynamicDelegationOnly) shares the sameforcePublicRepos-clobbers-enclave-scope risk as the static path fixed here, but neitherbuildMCPGatewayConfignor this warning covers it — combining a dynamic GitHub enclave with primarytools.githubwould silently rewrite the delegated identity's allow-only scope the same way. Not blocking this PR (out of its stated scope), but worth a tracking issue so the dynamic path isn't left with the same silent-failure gap this PR just closed for static enclaves.@copilot please address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning is a false positive for the documented
tools.github.private-to-public-flows: allowopt-out, becausebuildMCPGatewayConfigalready emitsforcePublicRepos: falsefor that configuration and the enclave keeps its declared scope.💡 Why this blocks the change
staticEnclaveGitHubScopeOverrideWarningonly checks "static enclave + primary tools.github". It never checks whether the workflow has already disabled the runtime override viaprivate-to-public-flows: allow, so the compiler will still print "the enclave reads nothing" and tell authors to removetools.githubeven when the chosen configuration is the supported escape hatch.Please key this warning off the effective
forcePublicReposstate instead of the raw tool combination, and add a regression test fortools.github+ static enclave +private-to-public-flows: allowso the warning only appears when the override really stays enabled.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This warning is emitted unconditionally for any static-enclave-plus-primary-
tools.githubworkflow, but the breakage you describe only occurs in public repositories, so private-repo compiles now get a false alarm too.💡 Why this blocks the change
The warning text says the gateway rewrites the scope to
repos="public"and leaves the enclave reading nothing, but that runtime override only does that on public repositories. On a private repository, this exact configuration does not hit the stated failure mode, so emitting the warning at compile time as a guaranteed problem is inaccurate and trains users to ignore it.Please either gate the diagnostic on a public-repository context when that is knowable, or weaken the message so it clearly states this is a public-repo-only hazard instead of a universal failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
L221: yagni: long policy narrative embedded in runtime builder comment. Keep intent in docs/spec and reduce to a short guard comment next to the condition.
Uh oh!
There was an error while loading. Please reload this page.