From 48370078a15fb396653dae043a96ebfa4d46b0fd Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 23:05:21 +0000 Subject: [PATCH 1/2] Initial plan From 5d8e07582b80a89abe5307382c3627bb1dbe7241 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 1 Feb 2026 23:12:34 +0000 Subject: [PATCH 2/2] Remove non-existent tools from GitHub MCP toolsets mapping - Remove get_repository from repos toolset (tool doesn't exist in MCP server) - Remove create_code_scanning_alert from code_security toolset (tool doesn't exist in MCP server) - Update test files to use get_file_contents instead of get_repository - Rebuild binary to embed updated JSON Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com> --- pkg/workflow/cache_memory_import_test.go | 2 +- .../cache_memory_threat_detection_test.go | 8 ++++---- pkg/workflow/compiler_cache_test.go | 6 +++--- pkg/workflow/copilot_engine_test.go | 14 +++++++------- .../copilot_mcp_http_integration_test.go | 2 +- .../data/github_toolsets_permissions.json | 4 ++-- ...github_toolset_validation_integration_test.go | 16 ++++++++-------- 7 files changed, 26 insertions(+), 26 deletions(-) diff --git a/pkg/workflow/cache_memory_import_test.go b/pkg/workflow/cache_memory_import_test.go index 6362c335bac..28b971ca840 100644 --- a/pkg/workflow/cache_memory_import_test.go +++ b/pkg/workflow/cache_memory_import_test.go @@ -54,7 +54,7 @@ imports: - shared/cache-config.md tools: github: - allowed: [get_repository] + allowed: [get_file_contents] --- # Main Workflow diff --git a/pkg/workflow/cache_memory_threat_detection_test.go b/pkg/workflow/cache_memory_threat_detection_test.go index db089b64177..e1557886e37 100644 --- a/pkg/workflow/cache_memory_threat_detection_test.go +++ b/pkg/workflow/cache_memory_threat_detection_test.go @@ -32,7 +32,7 @@ engine: claude tools: cache-memory: true github: - allowed: [get_repository] + allowed: [get_file_contents] safe-outputs: create-issue: threat-detection: true @@ -76,7 +76,7 @@ engine: claude tools: cache-memory: true github: - allowed: [get_repository] + allowed: [get_file_contents] --- Test workflow with cache-memory but no threat detection.`, @@ -112,7 +112,7 @@ tools: - id: session key: memory-session github: - allowed: [get_repository] + allowed: [get_file_contents] safe-outputs: create-issue: threat-detection: true @@ -160,7 +160,7 @@ tools: key: memory-restore-only restore-only: true github: - allowed: [get_repository] + allowed: [get_file_contents] safe-outputs: create-issue: threat-detection: true diff --git a/pkg/workflow/compiler_cache_test.go b/pkg/workflow/compiler_cache_test.go index d2b7506ec18..6d211cc02eb 100644 --- a/pkg/workflow/compiler_cache_test.go +++ b/pkg/workflow/compiler_cache_test.go @@ -40,7 +40,7 @@ cache: node-modules- tools: github: - allowed: [get_repository] + allowed: [get_file_contents] ---`, expectedInLock: []string{ "# Cache configuration from frontmatter was processed and added to the main job steps", @@ -82,7 +82,7 @@ cache: fail-on-cache-miss: false tools: github: - allowed: [get_repository] + allowed: [get_file_contents] ---`, expectedInLock: []string{ "# Cache configuration from frontmatter was processed and added to the main job steps", @@ -126,7 +126,7 @@ cache: lookup-only: false tools: github: - allowed: [get_repository] + allowed: [get_file_contents] ---`, expectedInLock: []string{ "# Cache configuration from frontmatter processed below", diff --git a/pkg/workflow/copilot_engine_test.go b/pkg/workflow/copilot_engine_test.go index 9a5da51d427..9a75b0c4d4f 100644 --- a/pkg/workflow/copilot_engine_test.go +++ b/pkg/workflow/copilot_engine_test.go @@ -326,10 +326,10 @@ func TestCopilotEngineComputeToolArguments(t *testing.T) { name: "github tool with allowed tools", tools: map[string]any{ "github": map[string]any{ - "allowed": []any{"get_repository", "list_commits"}, + "allowed": []any{"get_file_contents", "list_commits"}, }, }, - expected: []string{"--allow-tool", "github(get_repository)", "--allow-tool", "github(list_commits)"}, + expected: []string{"--allow-tool", "github(get_file_contents)", "--allow-tool", "github(list_commits)"}, }, { name: "github tool with single allowed tool", @@ -353,10 +353,10 @@ func TestCopilotEngineComputeToolArguments(t *testing.T) { name: "github tool with wildcard and specific tools", tools: map[string]any{ "github": map[string]any{ - "allowed": []any{"*", "get_repository", "list_commits"}, + "allowed": []any{"*", "get_file_contents", "list_commits"}, }, }, - expected: []string{"--allow-tool", "github", "--allow-tool", "github(get_repository)", "--allow-tool", "github(list_commits)"}, + expected: []string{"--allow-tool", "github", "--allow-tool", "github(get_file_contents)", "--allow-tool", "github(list_commits)"}, }, { name: "github tool with empty allowed array", @@ -394,12 +394,12 @@ func TestCopilotEngineComputeToolArguments(t *testing.T) { name: "github tool with bash and edit tools", tools: map[string]any{ "github": map[string]any{ - "allowed": []any{"get_repository", "list_commits"}, + "allowed": []any{"get_file_contents", "list_commits"}, }, "bash": []any{"echo", "ls"}, "edit": nil, }, - expected: []string{"--allow-tool", "github(get_repository)", "--allow-tool", "github(list_commits)", "--allow-tool", "shell(echo)", "--allow-tool", "shell(ls)", "--allow-tool", "write"}, + expected: []string{"--allow-tool", "github(get_file_contents)", "--allow-tool", "github(list_commits)", "--allow-tool", "shell(echo)", "--allow-tool", "shell(ls)", "--allow-tool", "write"}, }, } @@ -733,7 +733,7 @@ func TestCopilotEngineRenderGitHubMCPConfig(t *testing.T) { { name: "GitHub MCP with allowed tools", githubTool: map[string]any{ - "allowed": []string{"list_workflows", "get_repository"}, + "allowed": []string{"list_workflows", "get_file_contents"}, }, isLast: true, expectedStrs: []string{ diff --git a/pkg/workflow/copilot_mcp_http_integration_test.go b/pkg/workflow/copilot_mcp_http_integration_test.go index 77e0b238fc4..8008f40b7c5 100644 --- a/pkg/workflow/copilot_mcp_http_integration_test.go +++ b/pkg/workflow/copilot_mcp_http_integration_test.go @@ -130,7 +130,7 @@ func TestCopilotEngine_MultipleHTTPMCPTools_Integration(t *testing.T) { }, }, "github": map[string]any{ - "allowed": []string{"get_repository"}, + "allowed": []string{"get_file_contents"}, }, }, EngineConfig: &EngineConfig{ diff --git a/pkg/workflow/data/github_toolsets_permissions.json b/pkg/workflow/data/github_toolsets_permissions.json index e53534e92f7..ecc634a2282 100644 --- a/pkg/workflow/data/github_toolsets_permissions.json +++ b/pkg/workflow/data/github_toolsets_permissions.json @@ -12,7 +12,7 @@ "description": "Repository operations", "read_permissions": ["contents"], "write_permissions": ["contents"], - "tools": ["get_commit", "get_file_contents", "get_latest_release", "get_release_by_tag", "get_repository", "get_repository_tree", "get_tag", "list_branches", "list_commits", "list_releases", "list_tags"] + "tools": ["get_commit", "get_file_contents", "get_latest_release", "get_release_by_tag", "get_repository_tree", "get_tag", "list_branches", "list_commits", "list_releases", "list_tags"] }, "issues": { "description": "Issue management", @@ -36,7 +36,7 @@ "description": "Code scanning alerts", "read_permissions": ["security-events"], "write_permissions": ["security-events"], - "tools": ["get_code_scanning_alert", "list_code_scanning_alerts", "create_code_scanning_alert"] + "tools": ["get_code_scanning_alert", "list_code_scanning_alerts"] }, "dependabot": { "description": "Dependabot alerts", diff --git a/pkg/workflow/github_toolset_validation_integration_test.go b/pkg/workflow/github_toolset_validation_integration_test.go index 6d8206983f2..a6c2205282f 100644 --- a/pkg/workflow/github_toolset_validation_integration_test.go +++ b/pkg/workflow/github_toolset_validation_integration_test.go @@ -27,7 +27,7 @@ tools: - repos - pull_requests allowed: - - get_repository + - get_file_contents - search_pull_requests --- @@ -46,7 +46,7 @@ tools: toolsets: - default allowed: - - get_repository + - get_file_contents - list_issues --- @@ -65,7 +65,7 @@ tools: toolsets: - all allowed: - - get_repository + - get_file_contents - list_workflows - create_gist --- @@ -85,7 +85,7 @@ tools: toolsets: - repos allowed: - - get_repository + - get_file_contents - list_issues --- @@ -105,7 +105,7 @@ tools: toolsets: - repos allowed: - - get_repository + - get_file_contents - list_issues - list_workflows - search_pull_requests @@ -195,7 +195,7 @@ tools: - default - actions allowed: - - get_repository + - get_file_contents - list_issues - list_workflows --- @@ -265,7 +265,7 @@ tools: toolsets: - repos allowed: - - get_repository + - get_file_contents - list_issues --- @@ -322,7 +322,7 @@ tools: toolsets: - repos allowed: - - get_repository + - get_file_contents - create_discussion ---