Skip to content

Commit 8ecf40d

Browse files
committed
fix: docker security warnings
1 parent e4c1ee1 commit 8ecf40d

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

.github/workflows/docker.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
schedule:
44
- cron: "0 1 * * *" # Every day at 1:00 AM
55
workflow_dispatch: # Run the action manually
6+
pull_request: # TODO: Remove this before merging
67
permissions:
78
contents: read
89
issues: write
@@ -37,6 +38,7 @@ jobs:
3738
tags: ${{ vars.DOCKERHUB_IMAGE_REPOSITORY }}:latest, ${{ vars.DOCKERHUB_IMAGE_REPOSITORY }}:${{ steps.set-properties.outputs.VERSION }}, ${{ vars.DOCKERHUB_IMAGE_REPOSITORY }}:${{ steps.set-properties.outputs.VERSION }}-${{ steps.set-properties.outputs.DATE }}
3839
file: Dockerfile
3940
push: true
41+
provenance: true
4042
build-args: |
4143
VERSION=${{ steps.set-properties.outputs.VERSION }}
4244
- uses: mongodb-js/devtools-shared/actions/setup-bot-token@main

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
FROM node:22-alpine
2+
RUN groupadd -g 1000 mcp && \
3+
useradd -m -u 1000 -g mcp mcp
4+
USER mcp
25
ARG VERSION=latest
36
RUN npm install -g mongodb-mcp-server@${VERSION}
47
ENTRYPOINT ["mongodb-mcp-server"]

0 commit comments

Comments
 (0)