Skip to content

fix(rex): the config check writes its scratch Lua only into a fresh private dir - #143

Merged
backnotprop merged 2 commits into
plannotator:mainfrom
sebastianst:seb/rex-check-tempdir
Nov 15, 2026
Merged

backnotprop merged 2 commits into
plannotator:mainfrom
sebastianst:seb/rex-check-tempdir

Conversation

@sebastianst

Copy link
Copy Markdown
Contributor

rex install ran rex config check on a scratch init.lua in temp_dir()/plannotator-tui-rex-check-<pid>, created with create_dir_all, so an existing directory was reused. On a shared /tmp, another local user could create that directory first and swap in Lua that rex then runs as the installing user.

The scratch directory is now created exclusively: an existing directory or symlink makes the check skip. On Unix it is created with mode 0700, and it is only removed once this run created it. macOS and Windows already use a per-user temp dir, so this mostly matters on Linux.

🤖 Co-created with Claude Opus 5.5

sebastianst and others added 2 commits November 11, 2026 20:44
…rivate dir

rex install ran `rex config check` on init.lua in temp_dir()/plannotator-tui-rex-check-<pid>, creating it with create_dir_all. On a shared /tmp another user could create that directory first and swap in Lua that rex then runs as the installing user. The directory is now created exclusively, mode 0700 on Unix, and removed only once created.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@backnotprop
backnotprop added this pull request to the merge queue Nov 15, 2026
Merged via the queue into plannotator:main with commit 7fbedae Nov 15, 2026
3 checks passed
@sebastianst
sebastianst deleted the seb/rex-check-tempdir branch November 15, 2026 17: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