Skip to content

chore: remove libgnutls30 from Docker runtime image#214

Merged
Valiunia merged 1 commit into
mainfrom
docker-remove-gnutls28
Jun 15, 2026
Merged

chore: remove libgnutls30 from Docker runtime image#214
Valiunia merged 1 commit into
mainfrom
docker-remove-gnutls28

Conversation

@Valiunia

Copy link
Copy Markdown
Contributor

Summary

Removes libgnutls30 from the node:22-slim runtime image. The package is present in the Debian slim base solely as a dependency of apt. Since apt is not needed at runtime, libgnutls30 can be force-removed after all package operations are complete without affecting the running server.

Node.js uses OpenSSL for TLS — libgnutls30 is not called by any code path in this server and was an unused transitive system dependency.

Test plan

  • docker build . completes without errors; libgnutls30 removal is confirmed in build output
  • Full test suite passes when run inside the built container (docker run --rm <image> sh -c "cd /app && npm test")
  • MCP stdio smoke test: initialize + tools/list handshake completes; all 28 tools register correctly
  • Live API calls verified against three tools inside the container: search_and_geocode_tool, reverse_geocode_tool, and directions_tool — all returned correct results
search_and_geocode_tool — forward geocode "Eiffel Tower, Paris"
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"search_and_geocode_tool","arguments":{"q":"Eiffel Tower, Paris"}}}

Returned multiple ranked results including the Eiffel Tower in Paris, France with correct coordinates.

reverse_geocode_tool — coordinates 40.7484, -73.9857
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"reverse_geocode_tool","arguments":{"longitude":-73.9857,"latitude":40.7484}}}

Returned:

1. 350 Fifth Avenue (350 Fifth Avenue)
   Address: 350 Fifth Avenue, New York, New York 10118, United States
   Coordinates: 40.74843, -73.985667
   Type: address
directions_tool — driving route SF → Oakland
{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"directions_tool","arguments":{"coordinates":[{"longitude":-122.4194,"latitude":37.7749},{"longitude":-122.2712,"latitude":37.8044}],"routing_profile":"mapbox/driving"}}}

Returned a route via I-80 East, duration 1522s, distance 19848m, average speed 66 kph.

Notes

libgnutls30 is removed with dpkg --remove --force-depends because apt lists it as a dependency. This is safe post-build: apt is not used at container runtime and the server has no dependency on gnutls.

libgnutls30 is present in node:22-slim as a transitive dependency of apt,
which is not needed at runtime. Node.js uses OpenSSL for TLS, not gnutls.
Force-remove it after all apt operations are complete.

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>

@prisma-cloud-devsecops prisma-cloud-devsecops Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Prisma Cloud has found errors in this PR ⬇️

Comment thread Dockerfile
@@ -1,5 +1,9 @@
FROM node:22-slim

# Remove gnutls from the runtime image. libgnutls30 is only depended on by apt,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

perl 5.36.0-7+deb12u3 / Dockerfile.FROM

Total vulnerabilities: 3

Critical: 0 High: 3 Medium: 0 Low: 0
Vulnerability IDSeverityCVSSFixed inStatus
CVE-2026-48961 HIGH HIGH 7.3 - Open
CVE-2026-48962 HIGH HIGH 7.3 - Open
CVE-2026-48959 HIGH HIGH 7.5 - Open

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

existing issue, not induced by current PR

@Valiunia Valiunia marked this pull request as ready for review June 15, 2026 10:35
@Valiunia Valiunia requested a review from a team as a code owner June 15, 2026 10:35
@Valiunia Valiunia merged commit aef365c into main Jun 15, 2026
5 checks passed
@Valiunia Valiunia deleted the docker-remove-gnutls28 branch June 15, 2026 10:47
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