Skip to content

fix(auth): tighten permissions on ~/.docker/config.json#4916

Merged
mjbraun merged 2 commits into
masterfrom
fix-docker-config-perms
May 19, 2026
Merged

fix(auth): tighten permissions on ~/.docker/config.json#4916
mjbraun merged 2 commits into
masterfrom
fix-docker-config-perms

Conversation

@mjbraun
Copy link
Copy Markdown
Contributor

@mjbraun mjbraun commented May 19, 2026

flyctl wrote ~/.docker/config.json at 0o644. Match upstream Docker CLI (0o600) and chmod explicitly after the write so the mode applies on rewrite as well as on initial creation (os.WriteFile only honors perm on file creation).

mjbraun added 2 commits May 19, 2026 11:09
flyctl wrote ~/.docker/config.json at 0o644. Match upstream Docker CLI
(0o600) and chmod explicitly after the write so the mode applies on
rewrite as well as on initial creation (os.WriteFile only honors perm
on file creation).
go reports 0o777 for directory modes on windows regardless of perm
arg, so the mode assertions in these tests aren't meaningful there.
configureDockerJSON (the only caller) already bails on windows.
@mjbraun mjbraun merged commit 4f6109e into master May 19, 2026
36 of 37 checks passed
@mjbraun mjbraun deleted the fix-docker-config-perms branch May 19, 2026 21:14
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.

1 participant