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

Use mkstemp to replace deprecated mktemp #2660

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

Conversation

fatmo666
Copy link

Description

This Pull Request addresses a security concern related to the use of the deprecated tempfile.mktemp() function, which is known to be insecure due to its susceptibility to race conditions that can lead to temporary file vulnerabilities, as described in CWE-377.

Changes Made

Replaced tempfile.mktemp() with tempfile.mkstemp() in /catboost/python-package/catboost/datasets.py. tempfile.mkstemp() securely creates a temporary file by returning both a file descriptor and a path, which significantly minimizes the risk of file-based race conditions.
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en.

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.

None yet

1 participant