Skip to content

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

Description

@github-actions

Summary

The GitHub guard does not fully cover 3 operation(s) from the github-mcp-server and/or GitHub CLI. This may allow write operations to bypass DIFC classification or leave repo-scoped mutations without explicit secrecy/integrity labeling.

  • MCP tools scanned: 114
  • CLI write commands scanned: 79
  • Guard-covered write tools (tools.rs): 117
  • Tools with explicit DIFC rules (tool_rules.rs): 118
  • New gaps found this run: 3

MCP Tool Classification Gaps (tools.rs)

These MCP tools perform write or mutating operations but are missing from WRITE_OPERATIONS or READ_WRITE_OPERATIONS in guards/github-guard/rust-guard/src/tools.rs:

Tool Name Operation Type Suggested Classification Notes
add_issue_reaction write WRITE_OPERATIONS Upstream tool: "Add a reaction to an issue or pull request." Mutates repo discussion state.
add_issue_comment_reaction write WRITE_OPERATIONS Upstream tool: "Add a reaction to an issue or pull request comment." Mutates repo discussion state.
add_pull_request_review_comment_reaction write WRITE_OPERATIONS Upstream tool: "Add a reaction to a pull request review comment." Mutates repo discussion state.

Suggested fix for tools.rs

// Add to WRITE_OPERATIONS (keep sorted for binary_search correctness):
pub const WRITE_OPERATIONS: &[&str] = &[
    // ... existing entries ...
    "add_issue_comment_reaction", // POST reaction on issue/PR comment
    "add_issue_reaction",         // POST reaction on issue or PR
    "add_pull_request_review_comment_reaction", // POST reaction on PR review comment
];

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 currently fall through to default handling even though they are repo-scoped writes:

Tool Name Data Scope Suggested Labels Risk
add_issue_reaction repo-scoped secrecy: S(repo), integrity: writer(repo) Medium
add_issue_comment_reaction repo-scoped secrecy: S(repo), integrity: writer(repo) Medium
add_pull_request_review_comment_reaction repo-scoped secrecy: S(repo), integrity: writer(repo) Medium

Suggested fix for tool_rules.rs

Add an explicit repo-scoped write rule alongside the existing issue / PR write cases:

"add_issue_reaction"
| "add_issue_comment_reaction"
| "add_pull_request_review_comment_reaction" => {
    secrecy = apply_repo_visibility_secrecy(&owner, &repo, repo_id, secrecy, ctx);
    integrity = writer_integrity(repo_id, ctx);
}

GitHub CLI-Only Gaps

No new CLI-only gaps were identified in this run beyond operations already modeled in the guard or already tracked in cache.


Stale Guard Entries (bonus)

No stale guard entries were identified in this run.


References

Generated by GitHub Guard Coverage Checker (MCP + CLI) · 238.1 AIC · ⊞ 30.8K ·

  • expires on Jul 12, 2026, 3:26 AM UTC

Metadata

Metadata

Assignees

No one assigned

    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