Skip to content

fix(mcp): write MCP client configuration at 0600 - #5192

Merged
mjbraun merged 1 commit into
masterfrom
fix-mcp-config-perms
Sep 8, 2026
Merged

fix(mcp): write MCP client configuration at 0600#5192
mjbraun merged 1 commit into
masterfrom
fix-mcp-config-perms

Conversation

@mjbraun

@mjbraun mjbraun commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

fly mcp add with --stream or --sse records the Fly API token in the client configuration as a --bearer-token argument, and the file was written world-readable. Write it owner-only, matching flyctl's own config file, and apply the mode on rewrite as well since os.WriteFile only sets it on creation.

fly mcp add with --stream or --sse records the Fly API token in the
client configuration as a --bearer-token argument, and the file was
written world-readable. Write it owner-only, matching flyctl's own
config file, and apply the mode on rewrite as well since os.WriteFile
only sets it on creation.
@mjbraun
mjbraun requested a review from Lucais11 September 8, 2026 17:21

@Lucais11 Lucais11 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks right and seems consistent with the configureDockerJSON pattern we already use. I also double checked that Chmod is load-bearing by dropping it, which then fails two of the new tests.

@mjbraun
mjbraun merged commit 203d736 into master Sep 8, 2026
24 checks passed
@mjbraun
mjbraun deleted the fix-mcp-config-perms branch September 8, 2026 18:51
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