Skip to content

docs(openspec): plan #2745 preserve config file mode on write - #2761

Merged
dan-petty merged 1 commit into
mainfrom
fix/2745-config-files-and-their-copies-keep
Oct 30, 2026
Merged

dan-petty merged 1 commit into
mainfrom
fix/2745-config-files-and-their-copies-keep

Conversation

@devops-cli-service

Copy link
Copy Markdown
Contributor

Plans #2745

Config files that devops-cli writes, and their copies, get the umask mode (0644) instead of the mode of the file they replace. A config file can hold secrets, so other users of the host can read it. This change sets the mode of the temporary file to the existing file's mode, or 0600 for a new file, before os.replace. It applies to _write_content in settings.py and _copy in write_history.py. The live file and every copy keep the mode of the source, never more open. Files: src/devops_cli/config/settings.py, src/devops_cli/config/write_history.py, and their tests.

Change: openspec/changes/2745-config-files-and-their-copies-keep/

@dan-petty
dan-petty marked this pull request as ready for review October 30, 2026 08:23
@dan-petty
dan-petty self-requested a review as a code owner October 30, 2026 08:23
@dan-petty
dan-petty merged commit b57b9b3 into main Oct 30, 2026
17 checks passed
@dan-petty
dan-petty deleted the fix/2745-config-files-and-their-copies-keep branch October 30, 2026 08:23
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