Skip to content

fix: docker security warnings #259

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

Merged
merged 9 commits into from
May 16, 2025
Merged

fix: docker security warnings #259

merged 9 commits into from
May 16, 2025

Conversation

fmenezes
Copy link
Collaborator

@fmenezes fmenezes commented May 16, 2025

followup from #238

  • fixes all security warnings from Docker Scout
  • handle SIGINT for CTRL+C to work

@fmenezes fmenezes marked this pull request as ready for review May 16, 2025 11:20
@Copilot Copilot AI review requested due to automatic review settings May 16, 2025 11:20
@fmenezes fmenezes requested a review from a team as a code owner May 16, 2025 11:20
Copy link
Contributor

@Copilot 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 addresses Docker security warnings and improves server shutdown handling.

  • Adds new logging identifiers for server shutdown events
  • Implements SIGINT handling in index.ts to gracefully close the server
  • Enhances the Dockerfile and build workflow to run as a non-root user and include security provenance and SBOM metadata

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
src/logger.ts Adds new log IDs for server close events
src/index.ts Introduces SIGINT handler for graceful shutdown
Dockerfile Updates Dockerfile to use non-root user and security ARG ordering issue
.github/workflows/docker.yaml Configures Docker build with provenance and SBOM metadata
Comments suppressed due to low confidence (1)

Dockerfile:3

  • The ARG declaration for VERSION is moved after its usage; move 'ARG VERSION=latest' before the RUN instruction that uses it to ensure proper substitution.
RUN npm install -g mongodb-mcp-server@${VERSION}

@fmenezes fmenezes enabled auto-merge (squash) May 16, 2025 12:38
@fmenezes fmenezes merged commit 76cb0d7 into main May 16, 2025
18 checks passed
@fmenezes fmenezes deleted the fmenezes/docker-security branch May 16, 2025 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants