You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/03/10 20:14:16 UTC

[GitHub] [spark] bjornjorgensen commented on pull request #35775: [SPARK-38355][PYTHON][TESTS] Use `mkstemp` instead of `mktemp`

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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org