Skip to content

fix: use os.CreateTemp for atomic rewrites#92

Open
leno23 wants to merge 1 commit into
dolph:mainfrom
leno23:fix/safe-tempfile-issue-3-v2
Open

fix: use os.CreateTemp for atomic rewrites#92
leno23 wants to merge 1 commit into
dolph:mainfrom
leno23:fix/safe-tempfile-issue-3-v2

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 30, 2026

Fixes #3

Made with Cursor

Create temp files with the .find-replace-* prefix via os.CreateTemp so
names are unpredictable and not vulnerable to symlink planting attacks.

Fixes dolph#3
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.

Predictable temp-file names enable a symlink/race attack on file rewrites

1 participant