Skip to content

Fix race condition between secret upload and chmod#143

Open
szachovy wants to merge 1 commit into
masterfrom
fix/90-atomic-file-permissions
Open

Fix race condition between secret upload and chmod#143
szachovy wants to merge 1 commit into
masterfrom
fix/90-atomic-file-permissions

Conversation

@szachovy

@szachovy szachovy commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Add mode parameter to upload_file() that sets permissions atomically via SFTP. All secret files now use mode=0o600. Removes the readable window between upload and chmod.

Closes #90

Add mode parameter to upload_file() that sets permissions atomically
via SFTP before writing content. All secret files (passwords, keys,
.mylogin.cnf) now use mode=0o600. Remove separate
change_permissions_to_root() calls that left a readable window.

Closes #90

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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.

CM-3: Fix race condition between secret file upload and chmod

1 participant