FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise by gpshead · Pull Request #148578 · python/cpython · GitHub

Repository navigation

gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise - #148578

Merged
gpshead merged 1 commit into
python:mainfrom
gpshead:no-mktemp-multiprocessing
Apr 14, 2026
Merged

gpshead merged 1 commit into
python:mainfrom
gpshead:no-mktemp-multiprocessing

Conversation

gpshead commented Apr 14, 2026 •
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Member

This is not a security issue given it is a random filename in a mode 0o700 mkdtemp directory, but naive automated scanners that don't do code analysis flag it regardless. (https://github.com/python/cpython/security/code-scanning/190)

Followon to #137389 which fixed a bunch of others.

gpshead added skip news needs backport to 3.13 only security fixes needs backport to 3.14 bugs and security fixes labels Apr 14, 2026
gpshead enabled auto-merge (squash) April 14, 2026 23:08
gpshead merged commit fd81246 into python:main Apr 14, 2026
56 checks passed

Copy link
Copy Markdown

Thanks @gpshead for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 14, 2026
… avoid security scanner noise (pythonGH-148578)

remove a mktemp use to avoid security scanner noise
(cherry picked from commit fd81246)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Apr 14, 2026
… avoid security scanner noise (pythonGH-148578)

remove a mktemp use to avoid security scanner noise
(cherry picked from commit fd81246)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>

bedevere-app Bot commented Apr 14, 2026

Copy link
Copy Markdown

GH-148583 is a backport of this pull request to the 3.14 branch.

bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Apr 14, 2026

bedevere-app Bot commented Apr 14, 2026

Copy link
Copy Markdown

GH-148584 is a backport of this pull request to the 3.13 branch.

bedevere-app Bot removed the needs backport to 3.13 only security fixes label Apr 14, 2026
gpshead added a commit that referenced this pull request Apr 15, 2026
…o avoid security scanner noise (GH-148578) (#148583)

gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise (GH-148578)

remove a mktemp use to avoid security scanner noise
(cherry picked from commit fd81246)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
gpshead added a commit that referenced this pull request Apr 15, 2026
…o avoid security scanner noise (GH-148578) (#148584)

gh-137335: remove a mktemp use in multiprocessing.connection to avoid security scanner noise (GH-148578)

remove a mktemp use to avoid security scanner noise
(cherry picked from commit fd81246)

Co-authored-by: Gregory P. Smith <68491+gpshead@users.noreply.github.com>
ljfp pushed a commit to ljfp/cpython that referenced this pull request Apr 25, 2026
… avoid security scanner noise (pythonGH-148578)

remove a mktemp use to avoid security scanner noise

Copy link
Copy Markdown
Member

I think it is better to revert this change. The use of tempfile.mktemp() was correct, the code was clear. Now we have a tiny chance of error, to fix it we need to reimplement the logic of tempfile.mktemp() in the multiprocessing code. See also #149527.

This is also an argument in favor of not deprecating tempfile.mktemp(). But we can deprecate it's use with the default dir which is not secure.

picnixz added a commit that referenced this pull request Oct 22, 2026
… (GH-149597) (#160269)

gh-149527: fix creation of temporary socket files post GH-148578 (GH-149597)
(cherry picked from commit d0212f6)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
picnixz added a commit that referenced this pull request Oct 22, 2026
… (GH-149597) (#160270)

gh-149527: fix creation of temporary socket files post GH-148578 (GH-149597)
(cherry picked from commit d0212f6)

Co-authored-by: Bénédikt Tran <10796600+picnixz@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL