Dockerfile and vulnerability improvements#74
Merged
anirbanbasu merged 6 commits intoJan 14, 2026
Conversation
fix: Set to output a security warning if the server binds to 0.0.0.0. chore: Changed the server binding for local.dockerfile to 0.0.0.0.
feat: Added runtime container hardening using Docker Compose for the local Dockerfile.
fix: Corrected coverage errors due to coverage checking standard library and other code outside the project.
chore: Added more tests to improve coverage.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR implements security and infrastructure improvements for the Frankfurter MCP server, focusing on container hardening, vulnerability mitigation, and production readiness.
Changes:
- Upgraded Docker base images from Debian Bookworm to Trixie
- Added container security hardening with read-only filesystem, capability drops, and resource limits
- Implemented request size limiting and rate limiting middleware to prevent DoS attacks
- Added security warnings for potentially unsafe configurations (0.0.0.0 binding, wildcard CORS)
Reviewed changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| local.dockerfile | Updated base image to Trixie, added USER directive for non-root execution |
| smithery.dockerfile | Updated base image to Trixie for consistency |
| docker-compose.yml | New file with comprehensive security hardening configuration |
| src/frankfurtermcp/server.py | Added rate limiting, request size middleware, security warnings, and uvicorn configuration |
| src/frankfurtermcp/middleware.py | Implemented RequestSizeLimitMiddleware for body size validation |
| tests/test_middleware.py | Added comprehensive tests for RequestSizeLimitMiddleware |
| src/frankfurtermcp/init.py | Added environment variables for rate limiting, request size limits, and uvicorn configuration |
| README.md | Updated Docker usage instructions and documented new environment variables |
| .env.template | Added new environment variable defaults |
| uv.lock | Updated dependencies to latest versions |
| pyproject.toml | Updated coverage configuration |
| src/frankfurtermcp/common.py | Added PROJECT_URL constant |
| src/frankfurtermcp/mixin.py | Removed type ignore comments |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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.
Fixes #73