Title: Replace some uses of the deprecated mktemp function by EliahKagan · Pull Request #1770 · gitpython-developers/GitPython · GitHub
Open Graph Title: Replace some uses of the deprecated mktemp function by EliahKagan · Pull Request #1770 · gitpython-developers/GitPython
X Title: Replace some uses of the deprecated mktemp function by EliahKagan · Pull Request #1770 · gitpython-developers/GitPython
Description: tempfile.mktemp is deprecated for security reasons and the race condition inherent to its use can have an impact on robustness even in situations where the security impact is small or nonexistent. I do not believe the changes made here are fixing security vulnerabilities; I was not able, at least so far, to think of likely ways they could be exploited. Nonetheless I believe these changes are justified, as detailed in the commit messages. Only one of the uses of mktemp was in the git module itself. Others are in the test suite. There are a few more in the test suite where I am unsure what the best approach is to replacing them, though I hope to propose a change to eliminate them in the future. All of these considerations, as well as the general issues surrounding mktemp and its deprecation, are detailed in the two commit messages. 41fac85 makes changes in the test suite. 9e86053 changes code in the git module. See also: gitpython-developers/smmap#41, which is also about mktemp. (I've proposed a fix.) That looks like the only use of mktemp in smmap. There are some in gitdb as well, and (as noted) some in GitPython that this PR does not cover. #1769 - If you decide both to enable CodeQL and to merge this PR, and they are done in that order, then the effects of this PR will be reflected as changes to the "Code scanning" alerts.
Open Graph Description: tempfile.mktemp is deprecated for security reasons and the race condition inherent to its use can have an impact on robustness even in situations where the security impact is small or nonexistent. ...
X Description: tempfile.mktemp is deprecated for security reasons and the race condition inherent to its use can have an impact on robustness even in situations where the security impact is small or nonexistent. ...
Opengraph URL: https://github.com/gitpython-developers/GitPython/pull/1770
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:1d80cd51-b6ba-33af-2496-daf8ac5c8c77 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | DE9A:3DF850:B8D8DF:FD6FB2:69689B26 |
| html-safe-nonce | 75abc91116ee2c5fcb323f1015bf2c6b9f537f9a6a7ded0414f5a624c63cec4b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERTlBOjNERjg1MDpCOEQ4REY6RkQ2RkIyOjY5Njg5QjI2IiwidmlzaXRvcl9pZCI6IjgzMDQ4NzU1OTU2OTgzMTQwMjIiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1593451b8f50b56199df9a523bc4120c838c34fb44b0682b894e00918c31da6c |
| hovercard-subject-tag | pull_request:1641931000 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/gitpython-developers/GitPython/pull/1770/files |
| twitter:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/1771172?s=400&v=4 |
| og:image:alt | tempfile.mktemp is deprecated for security reasons and the race condition inherent to its use can have an impact on robustness even in situations where the security impact is small or nonexistent. ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | fdc7c66bd36a6c12eb8e771e806db863266e573fc299e77f27505a768d4f8a98 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/gitpython-developers/GitPython git https://github.com/gitpython-developers/GitPython.git |
| octolytics-dimension-user_id | 503709 |
| octolytics-dimension-user_login | gitpython-developers |
| octolytics-dimension-repository_id | 1126087 |
| octolytics-dimension-repository_nwo | gitpython-developers/GitPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1126087 |
| octolytics-dimension-repository_network_root_nwo | gitpython-developers/GitPython |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 3223a6503d318917691422cdadfbe16cd8fb21e5 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width