Skip to content

[guard-coverage] Guard coverage gap: 2 operations from github-mcp-server not fully covered #6382

@github-actions

Description

@github-actions

Summary

The GitHub guard does not fully cover 2 operation(s) from the github-mcp-server. Both are newly-observed read tools with repo-scoped data that lack explicit DIFC labeling rules, causing them to fall through to default handling. There are no classification gaps — all 53 write/mutating operations in the upstream tool list are covered by WRITE_OPERATIONS, READ_WRITE_OPERATIONS, or prefix patterns.

  • MCP tools scanned: 107 (up from 102 last run — 5 new tools added)
  • CLI write commands scanned: 42 (unchanged)
  • Guard-covered write tools (tools.rs): 53 explicit + pattern coverage (create_*, delete_*, merge_*, lock_*, unlock_*, update_*)
  • Tools with explicit DIFC rules (tool_rules.rs): 43 match arms
  • New gaps found this run: 2

MCP Tool Classification Gaps (tools.rs)

None. All 53 write/mutating operations in the upstream tool list are accounted for in WRITE_OPERATIONS, READ_WRITE_OPERATIONS, or prefix pattern functions.


MCP Tool DIFC Labeling Gaps (tool_rules.rs)

These MCP tools exist in the upstream server but have no explicit match arm in apply_tool_labels in guards/github-guard/rust-guard/src/labels/tool_rules.rs. They fall through to default label handling, which does not apply repo-scoped secrecy tags or appropriate integrity levels:

Tool Name Data Scope Suggested Labels Risk
search_commits repo-scoped (commit content, messages, diffs across public/private repos) secrecy: S(repo via search scope), integrity: writer Medium
list_issues_ff_remote_mcp_issue_fields repo-scoped (issues + custom fields) same as list_issues Medium

Details

search_commits — Searches commit history across GitHub repositories. Can expose commit messages, author details, and code changes in private repos. The existing list_commits and search_code tools both have explicit labeling; search_commits should follow the same pattern.

list_issues_ff_remote_mcp_issue_fields — Feature-flag variant of list_issues that supports filtering by custom issue field values. Returns the same repo-scoped issue data as list_issues (which has an explicit match arm), but this variant bypasses that arm and falls through to defaults.

Suggested fix for tool_rules.rs

// In apply_tool_labels, add these match arms alongside the existing list_issues / search_code arms:

// search_commits — mirrors search_code scoping logic
"search_commits" => {
    // Commit search can expose private commit history
    // S(commits) = inherits from repo secrecy
    // I(commits) = approved - commits reachable from default branch
    let (s_owner, s_repo, s_repo_id) = resolve_search_scope(tool_args, &owner, &repo);
    if !s_repo_id.is_empty() {
        desc = format!("search_commits:{}", s_repo_id);
        secrecy =
            apply_repo_visibility_secrecy(&s_owner, &s_repo, &s_repo_id, secrecy, ctx);
        integrity = writer_integrity(&s_repo_id, ctx);
        baseline_scope = Cow::Owned(s_repo_id);
    } else {
        secrecy =
            apply_repo_visibility_secrecy(&owner, &repo, repo_id, secrecy, ctx);
        integrity = writer_integrity(repo_id, ctx);
    }
}

// list_issues_ff_remote_mcp_issue_fields — feature-flag variant of list_issues; same labeling
// Extend the existing arm:
"get_issue" | "issue_read" | "list_issues" | "list_issues_ff_remote_mcp_issue_fields" => {
    // (same body as existing list_issues arm)
}

GitHub CLI-Only Gaps

None. The guard already contains comprehensive pre-emptive entries for all known CLI write operations (workflow runs, secrets, variables, releases, gist deletion, issue/comment edits, etc.). No new CLI write commands were detected since the last run.


Stale Guard Entries (bonus)

create_pull_request_with_copilot is listed in WRITE_OPERATIONS but does not appear in the current upstream toolsnaps. This may be a pre-emptive entry for a tool not yet publicly available, or it may be stale. No action required unless the tool has been permanently removed from the server.


References

Generated by GitHub Guard Coverage Checker (MCP + CLI) · ● 1.3M ·

  • expires on Jun 7, 2026, 3:26 AM UTC

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions