Skip to content

fix: use 0700 permissions for all temporary directories#766

Merged
gmpinder merged 1 commit into
blue-build:mainfrom
HastD:tempdir
Apr 27, 2026
Merged

fix: use 0700 permissions for all temporary directories#766
gmpinder merged 1 commit into
blue-build:mainfrom
HastD:tempdir

Conversation

@HastD

@HastD HastD commented Apr 27, 2026

Copy link
Copy Markdown
Collaborator

The tempfile crate defaults to world-readable permissions for temporary directories, which we don't want. Instead, make a wrapper for creating tempdirs that sets 0700 permissions, and use this wrapper throughout the codebase.

Also change the prefix for tempdirs to "bluebuild-tmp-" so the source of tempdirs is clear if they aren't cleaned up, and increase the number of random bytes in the name to 10 to match the behavior of mktemp.

The `tempfile` crate defaults to world-readable permissions for
temporary directories, which we don't want. Instead, make a wrapper for
creating tempdirs that sets 0700 permissions, and use this wrapper
throughout the codebase.

Also change the prefix for tempdirs to "bluebuild-tmp-" so the source of
tempdirs is clear if they aren't cleaned up, and increase the number of
random bytes in the name to 10 to match the behavior of `mktemp`.
@HastD HastD requested a review from gmpinder as a code owner April 27, 2026 16:31
@gmpinder gmpinder enabled auto-merge (squash) April 27, 2026 20:16
@gmpinder gmpinder merged commit 6e23742 into blue-build:main Apr 27, 2026
58 of 83 checks passed
@HastD HastD deleted the tempdir branch April 27, 2026 20:40
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.

2 participants