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

Update to use NamedTemporaryFile rather than mktemp #140

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

claytonparnell
Copy link

@claytonparnell claytonparnell commented May 1, 2023

Summary

tempfile.mktemp() has been deprecated (see https://docs.python.org/3/library/tempfile.html#tempfile.mktemp) due to security vulnerability, here I have taken the recommended course of action by replacing with tempfile. NamedTemporaryFile() to resolve the vulnerability. (Our sagemaker-python-sdk package uses multiprocess and was flagged for this vulnerability, please merge and release ASAP!)
I ran py3.10 tests successfully.

Checklist

Documentation and Tests

  • Added relevant tests that run with python tests/__main__.py, and pass.
  • Added relevant documentation that builds in sphinx without error.
  • Added new features that are documented with examples.
  • Artifacts produced with the main branch work as expected under this PR.

Release Management

  • Added "Fixes #NNN" in the PR body, referencing the issue (#NNN) it closes.
  • Added a comment to issue #NNN, linking back to this PR.
  • Added rationale for any breakage of backwards compatibility.
  • Requested a review.

@claytonparnell claytonparnell marked this pull request as draft May 1, 2023 20:22
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