Refactor safe-inputs MCP server bootstrap to eliminate duplication#5788
Refactor safe-inputs MCP server bootstrap to eliminate duplication#5788
Conversation
…tion Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com>
|
🎉 Yo ho ho! Changeset Generator found the treasure and completed successfully! ⚓💰 |
|
🔮 The ancient spirits stir... Smoke Codex awakens to divine this pull request... |
|
💥 WHOOSH! Smoke Claude springs into action on this pull request! [Panel 1 begins...] |
|
🤖 SYSTEM_INIT: Smoke Copilot No Firewall ACTIVATED. PROCESSING pull request. ALL SUBSYSTEMS ONLINE. |
|
📰 BREAKING: Smoke Copilot is now investigating this pull request. Sources say the story is developing... |
|
📰 DEVELOPING STORY: Smoke Copilot Playwright reports failed. Our correspondents are investigating the incident... |
Smoke Test ResultsLast 2 merged PRs:
Test Results: Overall Status: PASS (5/6 tests passed - failures are expected behavior)
|
Smoke Test Results (Run 20010908893)
Status: PASS
|
Smoke Test Results - Run 20010908911Recent PRs:
Test Results: Status: PASS
|
|
PRs: Fix agent identifier extraction for .agent.md and .agent files; Refactor update job builders to use shared helper pattern
|
The safe-inputs server startup logic was duplicated between stdio and HTTP transport implementations (~70 lines), creating maintenance burden and drift risk.
Changes
New module:
safe_inputs_bootstrap.cjsbootstrapSafeInputsServer()- config loading, base path resolution, tool handler loadingcleanupConfigFile()- secure config file deletionUpdated:
safe_inputs_mcp_server.cjsandsafe_inputs_mcp_server_http.cjsRegistration: Added bootstrap module to
pkg/workflow/js.goembed directivesExample
Before - duplicated in both files:
After - centralized:
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
https://api.github.com/user/usr/bin/gh gh api user --jq .login -json GO111MODULE ps GOINSECURE GOMOD GOMODCACHE ps eam.�� eam.git GOPROXY e/git-remote-https GOSUMDB GOWORK run-script/lib/nxterm-color e/git-remote-https(http block)/usr/bin/gh gh api user --jq .login tags/v5 GOPROXY /opt/hostedtoolcache/go/1.25.0/x64/bin/sh GOSUMDB GOWORK ache/node/24.11.list sh -c tags/v5 git /opt/hostedtoolcache/node/24.11.1/x64/bin/npm c4de662e6b74d780/home/REDACTED/work/gh-aw/gh-aw/gh-aw /" + .name 64/pkg/tool/linu--cmd npm(http block)/usr/bin/gh gh api user --jq .login -dotnet.git stmain.go 9de265fc14970addaf2c06b661f5557eae9/log.json GOSUMDB GOWORK(http block)If you need me to access, download, or install something from one of these locations, you can either:
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.
Changeset
safe_inputs_bootstrap.cjsmodule and update stdio/HTTP transports to use it. Fixes [duplicate-code] Duplicate Code Detected: Safe-inputs MCP server bootstrap #5786Smoke Test: 2025-12-07T21:58Z | PASS | All 6 tests passed successfully