Repository navigation
Complete DIFC labeling for get_file_blame - #16346
Merged
Merged
Conversation
Co-authored-by: lpcox <[email protected]>
Copilot
AI
changed the title
[WIP] Fix guard coverage for get_file_blame operation
Complete DIFC labeling for get_file_blame
Nov 11, 2026
lpcox
marked this pull request as ready for review
November 11, 2026 18:54
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A critical regression leaves sensitive-path blame responses in public repositories without private labels, potentially allowing restricted data through response filtering and omitting those labels during propagation.
1 open issue
What changed in this PR
Extends the GitHub guard’s DIFC labeling for get_file_blame, routing responses through existing file-content rules to address the coverage gap tracked in #16314.
Changes:
- Adds a canonical blame tool-name constant and uses it in request labeling.
- Applies repository-visibility secrecy and revision-based integrity to blame response items and paths.
- Extends response-label regression coverage across refs.
| File | Description |
|---|---|
guards/github-guard/rust-guard/src/labels/tool_rules.rs |
Uses the canonical blame constant in the existing request rule. |
guards/github-guard/rust-guard/src/labels/response_paths.rs |
Adds blame to file-content path labeling. |
guards/github-guard/rust-guard/src/labels/response_items.rs |
Adds blame to file-content item labeling. |
guards/github-guard/rust-guard/src/labels/mod.rs |
Extends response-label tests to blame and replaces tool-name literals. |
guards/github-guard/rust-guard/src/labels/constants.rs |
Defines GET_FILE_BLAME. |
Review effort: Max (auto)
| // === File Contents - repo-scoped secrecy === | ||
| tool_names::GET_FILE_CONTENTS | tool_names::GET_FILE_CONTENTS_FF_FIELDS_PARAM => { | ||
| tool_names::GET_FILE_CONTENTS | ||
| | tool_names::GET_FILE_BLAME |
Collaborator
|
@copilot address review feedback |
Co-authored-by: lpcox <[email protected]>
Contributor
Author
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.

get_file_blamelacked a canonical tool-name entry and explicit response labeling, leaving returned blame data outside the repository-scoped file-content rules.GET_FILE_BLAMEand use it in the existing request-label rule.