Skip to content

env_settings: never write the secrets temp file world-readable#21

Merged
nmbrthirteen merged 1 commit into
mainfrom
fix/env-secret-temp-perms
Jun 17, 2026
Merged

env_settings: never write the secrets temp file world-readable#21
nmbrthirteen merged 1 commit into
mainfrom
fix/env-secret-temp-perms

Conversation

@nmbrthirteen

Copy link
Copy Markdown
Owner

Audit follow-up: the .env was written via a fixed-name 0644 temp before chmod 600, briefly exposing the secret (and racing on concurrent writes). Create the temp 0600 with a unique name; os.replace makes the destination inherit it.

@nmbrthirteen nmbrthirteen merged commit bde2c9b into main Jun 17, 2026
4 checks passed
@nmbrthirteen nmbrthirteen deleted the fix/env-secret-temp-perms branch June 17, 2026 09:19
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