bjornjorgensen commented on pull request #35775:
URL: https://github.com/apache/spark/pull/35775#issuecomment-1064462915


   @itholic @HyukjinKwon and @LuciferYang 
   
   mktemp is 
[deprecated](https://docs.python.org/3/library/tempfile.html#deprecated-functions-and-variables)
 since Python 2.3 witch was released July 29, 2003.
   
   This is the text that I got from [Sonarqubes](https://www.sonarqube.org) :
   
   > Creating temporary files using insecure methods exposes the application to 
race conditions on filenames: a malicious user can try to create a file with a 
predictable name before the application does. A successful attack can result in 
other files being accessed, modified, corrupted or deleted. This risk is even 
higher if the application run with elevated permissions.
   
   In the past, it has led to the following vulnerabilities
   
   [CVE-2014-1858](https://nvd.nist.gov/vuln/detail/CVE-2014-1858) 
   
   [CVE-2014-1932](https://nvd.nist.gov/vuln/detail/CVE-2014-1932) 
   
   
   I did have some issues implementing this function. What to do with `fd`
   
   So I open a post at [SO 
upgrade-from-mktemp-to-mkstemp](https://stackoverflow.com/questions/71399020/upgrade-from-mktemp-to-mkstemp)
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to