Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Repo Assist] fix(rust-guard): cover feature-flagged issue_dependency_write and find_duplicate tool variants - #13089

Draft
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/fix-issue-13077-guard-coverage-gap-1e7cf98e8aaf811b
Draft

[Repo Assist] fix(rust-guard): cover feature-flagged issue_dependency_write and find_duplicate tool variants#13089
github-actions[bot] wants to merge 1 commit into
mainfrom
repo-assist/fix-issue-13077-guard-coverage-gap-1e7cf98e8aaf811b

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

πŸ€– This PR was created by Repo Assist, an automated AI assistant.

Closes #13077

Root cause

The GitHub Guard Coverage Checker flagged that two current upstream feature-flagged tool names introduced by github-mcp-server are not classified by the rust-guard, even though their legacy/base names already are:

  • issue_dependency_write_ff_issue_dependencies β€” a feature-flagged variant of issue_dependency_write. It already had a DIFC labeling match arm in tool_rules.rs, but was missing from the READ_WRITE_OPERATIONS classification bucket in tools.rs, so the guard did not recognize it as a read/write operation at all.
  • find_duplicate_ff_duplicate_detection β€” a feature-flagged variant of find_duplicate. It had no DIFC labeling match arm in tool_rules.rs, so it fell through to the default (less specific) handler instead of inheriting the repo-scoped secrecy/writer-integrity labels applied to find_duplicate.

Fix

  • tools.rs: added issue_dependency_write_ff_issue_dependencies to READ_WRITE_OPERATIONS (kept alphabetically sorted, required for binary_search correctness).
  • labels/tool_rules.rs: extended the existing find_duplicate match arm to also match find_duplicate_ff_duplicate_detection, applying identical repo-scoped secrecy and private-writer integrity labels.

Trade-offs / scope

The issue also suggested removing two stale entries (create_pull_request_with_copilot from WRITE_OPERATIONS, and issue_dependency_write from READ_WRITE_OPERATIONS) as possibly no longer present upstream. I did not make these removals in this PR β€” I could not verify their current upstream status against a live github-mcp-server tool inventory in this sandboxed environment, and removing guard coverage for a tool that turns out to still exist upstream would be a security regression (a write operation the guard forgot to check). Leaving them in place is the safer default; a maintainer with access to the live upstream inventory can safely remove them in a follow-up if confirmed stale.

Test Status

  • cargo build --release: βœ… pass
  • cargo test (rust-guard): βœ… 668 passed, 0 failed
  • cargo clippy --release --all-targets -- -D warnings: βœ… clean
  • cargo fmt --check on the two touched files: βœ… no diff (pre-existing unrelated formatting drift exists elsewhere in labels/backend.rs and labels/mod.rs, not touched by this change)

Generated by Repo Assist Β· copilot Β· auto Β· 180.6 AIC Β· ⊞ 16.5K Β· β—·
Comment /repo-assist to run again

Add this agentic workflow to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@851905c06e905bf362a9f6cc54f912e3df747d55

…nd find_duplicate_ff_duplicate_detection

Closes #13077

Guard coverage checker flagged two current upstream feature-flagged
tool names missing from classification:
- issue_dependency_write_ff_issue_dependencies is now classified as a
  READ_WRITE_OPERATIONS bucket entry (tools.rs) alongside the legacy
  issue_dependency_write name.
- find_duplicate_ff_duplicate_detection now shares the same DIFC
  labeling arm as find_duplicate in tool_rules.rs (repo-scoped
  secrecy, private writer integrity).

The existing tool_rules.rs match arm for
issue_dependency_write_ff_issue_dependencies (added previously) is
unaffected; only the tools.rs classification bucket needed the entry.

Did not remove the two stale-entry suggestions from the issue
(create_pull_request_with_copilot, issue_dependency_write) since
their presence in upstream github-mcp-server could not be verified
against a live tool inventory in this environment; leaving them in
place is the safer default until a maintainer confirms removal.

Co-authored-by: Copilot <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[guard-coverage] Guard coverage gap: 4 operations from github-mcp-server / GitHub CLI not fully covered

0 participants