Repository navigation
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.
Fix OAuth scope satisfaction to AND-of-ORs (required means required) #2778
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.
Fix OAuth scope satisfaction to AND-of-ORs (required means required) #2778
Changes from 1 commit
0de95e0e10fbfe02e9ccf447ede0daad4fd7c1d249ac8566bFile 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.
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>Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.