Apply lockdown check to issue_read get_labels#2882
Open
kerobbi wants to merge 1 commit into
Open
Conversation
GetIssueLabelsissue_read get_labels
Contributor
There was a problem hiding this comment.
Pull request overview
This PR brings issue_read’s get_labels method in line with the rest of the issue read paths by enforcing the shared lockdown-mode author verification (introduced in the stacked PR #2881). Under lockdown mode, label results are now withheld unless the issue author can be verified as “safe content” (e.g., has push access), matching the behavior of GetIssue.
Changes:
- Routed
issue_read.get_labelsthrough the updatedGetIssueLabelssignature that acceptsdeps. - Extended the GraphQL query used by
GetIssueLabelsto fetchauthor { login }and appliedauthorLockdownResult(...)gating whenLockdownModeis enabled. - Updated unit tests to mock the author login and validate lockdown allow/deny behavior.
Show a summary per file
| File | Description |
|---|---|
| pkg/github/issues.go | Passes deps into GetIssueLabels, fetches issue author login via GraphQL, and gates label results with authorLockdownResult in lockdown mode. |
| pkg/github/issues_test.go | Adds a parameterized GraphQL mock that includes author login and introduces lockdown-mode tests for allowed/denied label access. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Low
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Note
Stacked on #2881.
Summary
Applies the shared lockdown author check to
issue_read'sget_labels.Why
Part of https://github.com/github/copilot-mcp-core/issues/1798 -
get_labelswas the oneissue_readbranch not applying the lockdown check, this makes the tool uniform.What changed
GetIssueLabelsnow takesdeps, fetches the issueauthor{ login }in the same GraphQL query, and gates the result viaauthorLockdownResultunder lockdown mode.MCP impact
GetIssue).Prompts tested (tool changes only)
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testDocs