Summary
The GitHub guard does not fully cover 8 operation(s) from the github-mcp-server and/or GitHub CLI. This may allow write operations to bypass DIFC classification or leave read operations without proper secrecy/integrity labeling.
- MCP tools scanned: 97
- CLI write commands scanned: 41
- Guard-covered write tools (tools.rs): 94
- Tools with explicit DIFC rules (tool_rules.rs): 97+
- New gaps found this run: 8
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 |
create_release |
write |
WRITE_OPERATIONS |
Matches gh release create; creates a release via POST /repos/{owner}/{repo}/releases |
edit_release |
write |
WRITE_OPERATIONS |
Matches gh release edit; updates release metadata via PATCH /repos/{owner}/{repo}/releases/{id} |
delete_release |
write |
WRITE_OPERATIONS |
Matches gh release delete; deletes a release via DELETE /repos/{owner}/{repo}/releases/{id} |
upload_release_asset |
write |
WRITE_OPERATIONS |
Matches gh release upload; uploads release binaries/assets |
delete_issue |
write |
WRITE_OPERATIONS |
Matches gh issue delete; removes an issue via GraphQL deleteIssue |
update_issue_comment |
write |
WRITE_OPERATIONS |
Matches gh issue comment --edit-last; edits an issue comment via PATCH /repos/{owner}/{repo}/issues/comments/{id} |
delete_issue_comment |
write |
WRITE_OPERATIONS |
Matches gh issue comment --delete-last; deletes an issue comment via DELETE /repos/{owner}/{repo}/issues/comments/{id} |
delete_repository |
write |
WRITE_OPERATIONS |
Covers destructive repository deletion reachable via gh repo delete |
Suggested fix for tools.rs
pub const WRITE_OPERATIONS: &[&str] = &[
// ... existing entries ...
"create_release", // gh release create
"delete_issue", // gh issue delete
"delete_issue_comment", // gh issue comment --delete-last
"delete_release", // gh release delete
"delete_repository", // gh repo delete
"edit_release", // gh release edit
"update_issue_comment", // gh issue comment --edit-last
"upload_release_asset", // gh release upload
];
MCP Tool DIFC Labeling Gaps (tool_rules.rs)
These tools are also missing explicit apply_tool_labels match coverage today because they are absent from the repo-scoped write arm in practice:
| Tool Name |
Data Scope |
Suggested Labels |
Risk |
create_release |
repo-scoped |
secrecy: S(repo), integrity: writer |
Medium |
edit_release |
repo-scoped |
secrecy: S(repo), integrity: writer |
Medium |
delete_release |
repo-scoped |
secrecy: S(repo), integrity: writer |
Medium |
upload_release_asset |
repo-scoped |
secrecy: S(repo), integrity: writer |
Medium |
delete_issue |
repo-scoped |
secrecy: S(repo), integrity: writer |
Medium |
update_issue_comment |
repo-scoped |
secrecy: S(repo), integrity: writer |
Medium |
delete_issue_comment |
repo-scoped |
secrecy: S(repo), integrity: writer |
Medium |
delete_repository |
repo-scoped / destructive |
secrecy: S(repo), integrity: writer or blocked |
High |
Suggested fix for tool_rules.rs
Ensure these names are included in the repo-scoped write match arm in apply_tool_labels, following the existing pattern for issue, release, and repository writes.
GitHub CLI-Only Gaps
These write operations are reachable via the GitHub CLI and depend on the missing guard entries above:
| CLI Command |
REST Endpoint |
GitHub API Action |
Risk |
gh release create |
POST /repos/{owner}/{repo}/releases |
Creates a repository release |
Medium |
gh release edit |
PATCH /repos/{owner}/{repo}/releases/{id} |
Updates release metadata |
Medium |
gh release delete |
DELETE /repos/{owner}/{repo}/releases/{id} |
Deletes a release |
High |
gh release upload |
upload API / release asset endpoint |
Uploads release assets |
Medium |
gh issue delete |
GraphQL deleteIssue |
Deletes an issue |
High |
gh issue comment --edit-last |
PATCH /repos/{owner}/{repo}/issues/comments/{id} |
Edits an issue comment |
Medium |
gh issue comment --delete-last |
DELETE /repos/{owner}/{repo}/issues/comments/{id} |
Deletes an issue comment |
Medium |
gh repo delete |
repository deletion endpoint |
Permanently deletes a repository |
High |
Suggested remediation
- Add the eight tool names above to
WRITE_OPERATIONS in guards/github-guard/rust-guard/src/tools.rs.
- Keep the same eight names in the repo-scoped write arm in
guards/github-guard/rust-guard/src/labels/tool_rules.rs (and consider blocking delete_repository if you want parity with other irreversible repo mutations).
- Add/update regression tests that compare the repo-scoped write labeling arm against
WRITE_OPERATIONS so future CLI-preemptive entries cannot drift.
References
Generated by GitHub Guard Coverage Checker (MCP + CLI) · gpt54 · 57.6 AIC · ⊞ 34.9K · ◷
Summary
The GitHub guard does not fully cover 8 operation(s) from the github-mcp-server and/or GitHub CLI. This may allow write operations to bypass DIFC classification or leave read operations without proper secrecy/integrity labeling.
MCP Tool Classification Gaps (tools.rs)
These MCP tools perform write or mutating operations but are missing from
WRITE_OPERATIONSorREAD_WRITE_OPERATIONSinguards/github-guard/rust-guard/src/tools.rs:create_releaseWRITE_OPERATIONSgh release create; creates a release viaPOST /repos/{owner}/{repo}/releasesedit_releaseWRITE_OPERATIONSgh release edit; updates release metadata viaPATCH /repos/{owner}/{repo}/releases/{id}delete_releaseWRITE_OPERATIONSgh release delete; deletes a release viaDELETE /repos/{owner}/{repo}/releases/{id}upload_release_assetWRITE_OPERATIONSgh release upload; uploads release binaries/assetsdelete_issueWRITE_OPERATIONSgh issue delete; removes an issue via GraphQLdeleteIssueupdate_issue_commentWRITE_OPERATIONSgh issue comment --edit-last; edits an issue comment viaPATCH /repos/{owner}/{repo}/issues/comments/{id}delete_issue_commentWRITE_OPERATIONSgh issue comment --delete-last; deletes an issue comment viaDELETE /repos/{owner}/{repo}/issues/comments/{id}delete_repositoryWRITE_OPERATIONSgh repo deleteSuggested fix for tools.rs
MCP Tool DIFC Labeling Gaps (tool_rules.rs)
These tools are also missing explicit
apply_tool_labelsmatch coverage today because they are absent from the repo-scoped write arm in practice:create_releaseS(repo), integrity:writeredit_releaseS(repo), integrity:writerdelete_releaseS(repo), integrity:writerupload_release_assetS(repo), integrity:writerdelete_issueS(repo), integrity:writerupdate_issue_commentS(repo), integrity:writerdelete_issue_commentS(repo), integrity:writerdelete_repositoryS(repo), integrity:writeror blockedSuggested fix for tool_rules.rs
Ensure these names are included in the repo-scoped write match arm in
apply_tool_labels, following the existing pattern for issue, release, and repository writes.GitHub CLI-Only Gaps
These write operations are reachable via the GitHub CLI and depend on the missing guard entries above:
gh release createPOST /repos/{owner}/{repo}/releasesgh release editPATCH /repos/{owner}/{repo}/releases/{id}gh release deleteDELETE /repos/{owner}/{repo}/releases/{id}gh release uploadgh issue deletedeleteIssuegh issue comment --edit-lastPATCH /repos/{owner}/{repo}/issues/comments/{id}gh issue comment --delete-lastDELETE /repos/{owner}/{repo}/issues/comments/{id}gh repo deleteSuggested remediation
WRITE_OPERATIONSinguards/github-guard/rust-guard/src/tools.rs.guards/github-guard/rust-guard/src/labels/tool_rules.rs(and consider blockingdelete_repositoryif you want parity with other irreversible repo mutations).WRITE_OPERATIONSso future CLI-preemptive entries cannot drift.References