Conversation
Remove the custom MCP firewall proxy (src/mcp_firewall.rs), embedded tool metadata (src/mcp_metadata.rs, mcp-metadata.json), and all firewall tests. The copilot CLI no longer has built-in MCPs, so: - Replace BUILTIN_MCPS constant with is_custom_mcp() helper - Remove --disable-builtin-mcps, --disable-mcp-server, --mcp from copilot params - Remove mcp-firewall CLI subcommand - Simplify create wizard to MCP-level selection (no tool-level metadata) - Update 1ES compiler to use is_custom_mcp() check - Remove terminal_size dependency (only used by deleted MCP tool selector) All MCPs are now handled through the MCP Gateway (MCPG) instead of the custom firewall proxy. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Add infrastructure for the gh-aw-mcpg gateway integration:
- Add MCPG_VERSION and MCPG_IMAGE constants in common.rs
- Add {{ mcpg_version }} and {{ mcpg_image }} template markers
- Replace generate_firewall_config() with generate_mcpg_config() that
produces MCPG-compatible JSON (mcpServers + gateway sections)
- SafeOutputs always included as HTTP backend via host.docker.internal
- Custom MCPs (with command:) become stdio servers in MCPG config
- Add host.docker.internal to CORE_ALLOWED_HOSTS for AWF container
to reach host-side MCPG
- Add mcp-http subcommand: serves SafeOutputs over HTTP using rmcp's
StreamableHttpService with axum, API key auth, and health endpoint
- Add axum and rmcp transport-streamable-http-server dependencies
- Remove terminal_size dependency (no longer used)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Replace the legacy MCP firewall pipeline steps with MCPG architecture: - Replace 'Prepare MCP firewall config' with 'Prepare MCPG config' - Replace stdio MCP config (safeoutputs + mcp-firewall) with HTTP config pointing copilot to MCPG via host.docker.internal - Add 'Start SafeOutputs HTTP server' step (background process on host) - Add 'Start MCP Gateway (MCPG)' step (Docker container on host network) - Add 'Stop MCPG and SafeOutputs' cleanup step (condition: always) - Add --enable-host-access to AWF invocation for container-to-host access - Pre-pull MCPG Docker image alongside AWF images - Update step display names and comments Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Add assertions for MCPG Docker image reference in compiled output - Add assertions for host.docker.internal and --enable-host-access - Add assertions verifying no legacy mcp-firewall references - Add template structure checks for mcpg_config, mcpg_image, mcpg_version markers - Verify template no longer contains mcp-firewall-config or MCP_FIREWALL_EOF - Update fixture test to not require built-in MCP assertions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Architecture replacement looks solid overall, but there are a few correctness bugs and security concerns worth addressing before merge. Findings🐛 Bugs / Logic Issues
🔒 Security Concerns
|
- Update architecture file tree (remove mcp_firewall.rs, mcp_metadata.rs, mcp-metadata.json)
- Replace {{ firewall_config }} marker docs with {{ mcpg_config }}
- Add {{ mcpg_version }} and {{ mcpg_image }} marker documentation
- Update {{ agency_params }} to remove MCP-related flags
- Replace mcp-firewall CLI docs with mcp-http subcommand
- Remove 'Built-in MCP Servers' section (no built-in MCPs exist)
- Simplify MCP Configuration to custom servers only
- Add host.docker.internal to allowed domains table
- Replace entire MCP Firewall section with MCP Gateway (MCPG) docs
- Update standalone target description for MCPG
- Update front matter example to remove built-in MCP references
- Add gh-aw-mcpg and gh-aw-firewall to References
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Always call generate_mcpg_config() regardless of mcp_servers being empty — safeoutputs must always be present in the MCPG config - Pre-initialize SafeOutputs outside the StreamableHttpService factory closure to avoid block_on() panic on a Tokio worker thread - Add failure guards to readiness wait loops in base.yml: both SafeOutputs and MCPG now fail the pipeline step explicitly if they don't become ready within 30 seconds Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Good architectural refactoring — needs a couple of security fixes before merge. The MCPG migration is clean and well-motivated. The removal of the custom MCP firewall layer in favour of the established gateway simplifies the stack significantly. The core logic is sound. Findings🔒 Security Concerns
🐛 Bugs / Logic Issues
|
- Move host.docker.internal from CORE_ALLOWED_HOSTS to standalone compiler's generate_allowed_domains — only pipelines using MCPG need host access from the AWF container - Replace weak time-based API key fallback with /dev/urandom (32 bytes); time-based value retained only as last-resort if urandom is unavailable - Remove SAFE_OUTPUTS_API_KEY println to avoid leaking the secret to log files; the pipeline already knows the key it generated - Add security comment explaining why Docker socket mount is required for MCPG (spawns stdio MCP servers as sibling containers) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Extract MCPG_PORT constant alongside MCPG_VERSION/MCPG_IMAGE to avoid hardcoded port 80 in generated config - Propagate MCPG config serialization error with ? instead of silently falling back to broken JSON missing the gateway section - Omit empty args array from MCPG config for cleaner output (consistent with existing env/tools handling) - Add warning in 1ES compiler when non-custom MCPs fall back to convention-based service connection names that may not exist Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Good architectural direction — replacing the in-process MCP firewall with MCPG is the right call. Two security issues need addressing before merge; everything else is clean. Findings🐛 Bugs / Logic Issues
🔒 Security Concerns
|
- Guard reserved 'safeoutputs' name in generate_mcpg_config to prevent user-defined MCPs from overwriting the safe outputs HTTP backend - Log MCPG config template before API key substitution to avoid leaking MCP_GATEWAY_API_KEY to pipeline logs (ADO secret masking only applies in subsequent steps, not the current step's output) - Clarify allowed_hosts.rs comment: host.docker.internal is always added for standalone pipelines (not conditionally) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
🔍 Rust PR ReviewSummary: Good architectural direction — the MCPG swap is clean and well-structured. A few reliability and security issues worth addressing before merge. Findings🐛 Bugs / Logic Issues
🔒 Security Concerns
|
No description provided.