Add MCP-focused integration coverage and CI example for GitHub MCP server#192
Closed
Add MCP-focused integration coverage and CI example for GitHub MCP server#192
Conversation
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add integration tests and CI for AWF on MCP servers
Add MCP-focused integration coverage and CI example for GitHub MCP server
Jan 8, 2026
Mossaka
reviewed
Jan 8, 2026
Comment on lines
23
to
36
| echo "=== Calling GitHub API through AWF (allowed) ===" | ||
| sudo -E awf \ | ||
| --allow-domains "${ALLOW_DOMAINS}" \ | ||
| --log-level warn \ | ||
| -- 'docker run --rm -e GITHUB_TOKEN curlimages/curl:latest sh -c '"'"'curl -fsS -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/rate_limit'"'"'' | ||
|
|
||
| echo "=== Attempting blocked domain through AWF (should fail) ===" | ||
| if sudo -E awf \ | ||
| --allow-domains "${ALLOW_DOMAINS}" \ | ||
| --log-level warn \ | ||
| -- 'docker run --rm curlimages/curl:latest -fsS https://example.com --max-time 8'; then | ||
| echo "Unexpected success: example.com should be blocked" >&2 | ||
| exit 1 | ||
| fi |
Collaborator
There was a problem hiding this comment.
wait you are not actually running the GitHub MCP Server. Please run the server inside the firewall and test it: https://github.com/github/github-mcp-server
Contributor
Author
There was a problem hiding this comment.
Implemented a new AWF-covered path that actually starts the GitHub MCP server container (ghcr.io/github/github-mcp-server:v0.19.0) in both the integration test and the example smoke script; CI now pre-pulls the image and runs this server-start check. Commit: a475580
Co-authored-by: Mossaka <5447827+Mossaka@users.noreply.github.com>
Test Coverage Report
Coverage ThresholdsThe project has the following coverage thresholds configured:
Coverage report generated by `npm run test:coverage` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The firewall needed integration proof that MCP-style workloads (e.g., GitHub MCP server) keep GitHub traffic allowed while blocking other egress, using the GitHub Actions token for auth.
tests/integration/mcp-github.test.tsto verify allowed GitHub API access with token and blocked non-GitHub domains, including Squid log assertions.ghcr.io/github/github-mcp-server:v0.19.0container can start inside AWF under the allowlist.examples/github-mcp-smoke.shto run a Dockerized GitHub API call through AWF, start the real GitHub MCP server container, and demonstrate blocking of unrelated domains; documented inexamples/README.md.test-examplesworkflow to pre-pull the MCP server image and execute the new smoke example with${{ github.token }}.test-mcp-githubjob totest-integrationworkflow running the new suite with the Actions token and shared test filename variable, pre-pulling both curl and MCP images.Example (from new test):
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.