Skip to content

fix(mcp): don’t leave gateway secrets in /tmp after a crash #3596

Closed

Description

@aheritier

Summary

pkg/tools/mcp/gateway.go:76-121 writes plaintext secret values to os.CreateTemp files (0600) passed by path to docker mcp gateway run; removal happens only in Stop (gateway.go:58, 63-72). A crash/SIGKILL leaves secrets on disk indefinitely.

Fix

Startup sweep of stale mcp-secrets-* / mcp-config-* files; evaluate passing secrets via stdin/fd instead of a path (keep the file path as a fallback for gateway compatibility).

Acceptance

  • Stale secret files cleaned on startup; no plaintext secret persists after abnormal exit (where feasible).

Activity

  1. added
    area/mcpMCP protocol, MCP tool servers, integration
    on Jul 11, 2026
  2. self-assigned this
    on Jul 11, 2026
  3. added
    kind/fixPR fixes a bug (maps to fix:). Use on PRs only.
    on Jul 11, 2026
  4. added theissue type on Jul 11, 2026
  5. added
    area/securityAuthentication, authorization, secrets, vulnerabilities
    area/gatewayGateway, proxy, and routing
    on Jul 11, 2026
  6. self-assigned this
    on Jul 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area/gatewayGateway, proxy, and routingarea/mcpMCP protocol, MCP tool servers, integrationarea/securityAuthentication, authorization, secrets, vulnerabilitieskind/fixPR fixes a bug (maps to fix:). Use on PRs only.

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions