-
Notifications
You must be signed in to change notification settings - Fork 2
Add MCP-focused integration coverage and CI example for GitHub MCP server #192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Co-authored-by: Mossaka <[email protected]>
Co-authored-by: Mossaka <[email protected]>
Co-authored-by: Mossaka <[email protected]>
Mossaka
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@copilot address the comment
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]>
Test Coverage Report
Coverage ThresholdsThe project has the following coverage thresholds configured:
Coverage report generated by `npm run test:coverage` |
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.