fix: restrict credential-bearing config files to owner access - #170
Merged
Merged
Conversation
Repair existing POSIX config and migration backup permissions, and keep all config writers and temporary files private. Fixes #159.
Preserve both config permission and compaction regression suites.
This reverts commit 79a69b8.
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change
Fixes #159. Adding a BYOK provider to an existing
0644config previously preserved group/other readability, including in atomic temporary files. Other settings writers, config copies and migration backups could retain the same exposure.0600; restrict existing files before writing secret-bearing content. Preserve existing lock/rename behavior and avoid deleting temporary files not created by the current operation.0400and immutable0600files, are loaded withoutchmod. An unsafe main config that cannot be restricted still fails to load.The Windows worker/startup-budget changes have been removed from this PR and are independently reviewable in #181. The smoke-test changes here only exercise config-permission behavior. A merge-tree check confirms the two branches currently combine without conflicts.
Validation
pnpm verifyfull profile on clean committed HEAD9ce8e562a0a0d731e8449a59a12562f895ae846a(macOS arm64, Node 26.4.0): 14/14 gates.79a69b8do not validate this revision. Windows validation policy is separate in test: bound Windows test concurrency and runtime startup #181.Publication and contribution checks
test/vitest-suites.json. This follow-up adds no further files.Maintainer handoff
Publication scope and licenses are unchanged. Shared-source port: pending maintainer coordination after public review. No automatic merge, issue closure or release.