You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix OAuth scope satisfaction to AND-of-ORs (required means required)
Tool scope requirements conflate two relationships: conjunction (a tool needs
several different capabilities, AND) and hierarchy/substitution (a requirement
is met by itself or a higher scope, OR). Previously both collapsed into one OR
list checked against the expanded AcceptedScopes, so a token holding only repo
was treated as satisfying ui_get (which also needs read:org): the PAT filter
showed it and no scope challenge was issued, then it failed at runtime.
Make RequiredScopes the single source of truth and evaluate satisfaction as
AND-of-ORs: expand the token downward through the hierarchy and require every
declared scope to be present. AcceptedScopes becomes display-only metadata.
- HasRequiredScopes: AND semantics over requiredScopes.
- ToolScopeInfo.Satisfies (was HasAcceptedScope) + precise MissingScopes.
- scope_filter: filter on RequiredScopes; keep read-only repo-only special case.
- scope_challenge: challenge with only the missing required scopes.
- generate-docs: drop "(any of)" rendering; all required scopes are AND.
Affects ui_get, list_issue_types, and list_issue_fields (all {repo, read:org}).
Filtering stays gated to classic ghp_ PATs and fails open; fine-grained/OAuth/
app tokens are unaffected. Split out of the PR #2751 review discussion.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copy file name to clipboardExpand all lines: README.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -922,13 +922,13 @@ The following sets of tools are available:
922
922
-`type`: Type of this issue. Only use if issue types are enabled for this repository. Use list_issue_types tool to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string, optional)
-`owner`: The account owner of the repository or organization. The name is not case sensitive. (string, required)
928
928
-`repo`: The name of the repository. When provided, returns fields for this specific repository (inherited from its organization). When omitted, returns org-level fields directly. (string, optional)
929
929
930
930
-**list_issue_types** - List available issue types
-`owner`: The account owner of the repository or organization. (string, required)
934
934
-`repo`: The name of the repository. When provided, returns issue types for this specific repository. When omitted, returns org-level issue types directly. (string, optional)
// Clarify scope semantics for the rendered tools: every listed required
67
+
// scope is needed (AND), and a higher scope in the hierarchy also satisfies
68
+
// a required scope.
69
+
preamble:="> **OAuth scopes:** all listed required scopes are needed (AND). A higher scope in the hierarchy (e.g. `admin:org` for `read:org`, `repo` for `public_repo`) also satisfies a required scope.\n\n"
66
70
// Leading/trailing newlines around the body produce blank lines between
67
71
// our content and the surrounding marker comments, so the trailing comment
68
72
// doesn't get absorbed into the final list item by markdown renderers.
> **OAuth scopes:** all listed required scopes are needed (AND). A higher scope in the hierarchy (e.g. `admin:org` for `read:org`, `repo` for `public_repo`) also satisfies a required scope.
-`type`: Type of this issue. Only use if issue types are enabled for this repository. Use list_issue_types tool to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string, optional)
Copy file name to clipboardExpand all lines: docs/insiders-features.md
+3-1Lines changed: 3 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,8 @@ The list below is generated from the Go source. It covers tool **inventory and s
26
26
27
27
<!-- START AUTOMATED INSIDERS TOOLS -->
28
28
29
+
> **OAuth scopes:** all listed required scopes are needed (AND). A higher scope in the hierarchy (e.g. `admin:org` for `read:org`, `repo` for `public_repo`) also satisfies a required scope.
30
+
29
31
### `remote_mcp_ui_apps`
30
32
31
33
-**create_pull_request** - Open new pull request
@@ -68,7 +70,7 @@ The list below is generated from the Go source. It covers tool **inventory and s
68
70
-`type`: Type of this issue. Only use if issue types are enabled for this repository. Use list_issue_types tool to get valid type values for this repository or its owner organization. If the repository doesn't support issue types, omit this parameter. (string, optional)
0 commit comments