Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New rule on tempfile.mktemp #132

Merged
merged 1 commit into from
Aug 25, 2023
Merged

New rule on tempfile.mktemp #132

merged 1 commit into from
Aug 25, 2023

Conversation

ericwb
Copy link
Contributor

@ericwb ericwb commented Aug 25, 2023

The mktemp function is vulnerable to a race condition where there is a window where the file could be created in between when the filename was created and the file is opened.

The solution is to use NamedTemporaryFile as an atomic operation.

The mktemp function is vulnerable to a race condition where there
is a window where the file could be created in between when the
filename was created and the file is opened.

The solution is to use NamedTemporaryFile as an atomic operation.

Signed-off-by: Eric Brown <[email protected]>
@ericwb ericwb merged commit 042a6ce into securesauce:main Aug 25, 2023
4 checks passed
@ericwb ericwb deleted the tempfile_mktemp branch August 25, 2023 04:43
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