Skip to content

Commit 33554e0

Browse files
lpcoxCopilot
andcommitted
fix: proxy response envelope preservation for GraphQL and search
Three bugs fixed: 1. copyResponseHeaders now copies Content-Type from upstream, fixing GraphQL passthrough where octokit couldn't parse the response 2. Search routes now pass the 'q' query param as 'query' arg to the guard, enabling proper repo-scoped integrity labels 3. REST search responses are re-wrapped in the original envelope ({total_count, items}) after filtering. GraphQL responses with filtered items are reconstructed preserving the {data:{...}} tree Smoke workflow updated to build from source (docker build) instead of pulling a published image, so we can test unreleased fixes. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 8531f41 commit 33554e0

File tree

4 files changed

+231
-20
lines changed

4 files changed

+231
-20
lines changed

.github/workflows/smoke-proxy-github-script.lock.yml

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.github/workflows/smoke-proxy-github-script.md

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ network:
2323
- defaults
2424
- github
2525
- github.com
26+
- rust
2627
tools:
2728
agentic-workflows:
2829
cache-memory: true
@@ -44,9 +45,23 @@ sandbox:
4445
mcp:
4546
container: "ghcr.io/github/gh-aw-mcpg"
4647
steps:
47-
# ── Pull the gateway container image ───────────────────────────────
48-
- name: Pull MCP Gateway image
49-
run: docker pull ghcr.io/github/gh-aw-mcpg:v0.2.2
48+
# ── Build the gateway container image from source ──────────────────
49+
- name: Build MCP Gateway image
50+
run: |
51+
# Install Rust and WASM target if not present
52+
if ! command -v rustup &>/dev/null; then
53+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
54+
source "$HOME/.cargo/env"
55+
fi
56+
rustup target add wasm32-wasip1
57+
58+
# Build the Rust WASM guard (required by Dockerfile)
59+
cd guards/github-guard/rust-guard
60+
bash build.sh
61+
cd ../../..
62+
63+
# Build Docker image
64+
docker build -t awmg-local:latest .
5065
5166
# ── Start the DIFC proxy ──────────────────────────────────────────
5267
- name: Start DIFC proxy
@@ -66,7 +81,7 @@ steps:
6681
-e DEBUG='*' \
6782
-v "$PROXY_LOG_DIR:$PROXY_LOG_DIR" \
6883
-v "$MCP_LOG_DIR:$MCP_LOG_DIR" \
69-
ghcr.io/github/gh-aw-mcpg:v0.2.2 proxy \
84+
awmg-local:latest proxy \
7085
--policy "$POLICY" \
7186
--listen 0.0.0.0:18443 \
7287
--log-dir "$MCP_LOG_DIR" \
@@ -393,7 +408,7 @@ Pre-agent steps ran 6 tests through `actions/github-script@v8` with
393408
## Proxy + github-script Smoke Test Results
394409
395410
**Policy**: repos=["github/gh-aw-mcpg"], min-integrity=approved
396-
**Proxy**: ghcr.io/github/gh-aw-mcpg:v0.2.2, port 18443, HTTP, filter mode
411+
**Proxy**: awmg-local:latest (built from source), port 18443, HTTP, filter mode
397412
**Run**: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}
398413
399414
### REST API Tests

0 commit comments

Comments
 (0)