Skip to content

Dockerfile and vulnerability improvements#74

Merged
anirbanbasu merged 6 commits into
masterfrom
73-improve-dockerfiles-and-vulnerability-scan-rating
Jan 14, 2026
Merged

Dockerfile and vulnerability improvements#74
anirbanbasu merged 6 commits into
masterfrom
73-improve-dockerfiles-and-vulnerability-scan-rating

Conversation

@anirbanbasu
Copy link
Copy Markdown
Owner

@anirbanbasu anirbanbasu commented Dec 19, 2025

  • Upgraded Dockerfile base images to Debian Trixie.
  • Set to output a security warning if the server binds to 0.0.0.0.
  • Changed the server binding for local.dockerfile to 127.0.0.1 with instructions to change it to 0.0.0.0 in the README.
  • Added container runtime hardening of the local Docker image using Docker Compose.
  • Check and improve other issues raised in the vulnerability scan.

Fixes #73

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.
@anirbanbasu anirbanbasu linked an issue Dec 19, 2025 that may be closed by this pull request
@anirbanbasu anirbanbasu self-assigned this Dec 19, 2025
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.
@anirbanbasu anirbanbasu marked this pull request as ready for review January 14, 2026 14:30
Copilot AI review requested due to automatic review settings January 14, 2026 14:30
@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jan 14, 2026
@dosubot dosubot Bot added the enhancement New feature or request label Jan 14, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread src/frankfurtermcp/middleware.py Outdated
Comment thread local.dockerfile Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread docker-compose.yml Outdated
@anirbanbasu anirbanbasu merged commit 76f81e0 into master Jan 14, 2026
1 check passed
@anirbanbasu anirbanbasu deleted the 73-improve-dockerfiles-and-vulnerability-scan-rating branch March 12, 2026 06:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Improve Dockerfiles and vulnerability scan rating

2 participants