Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34.1k
gh-137335: Remove use ofmktemp() inasyncio.windows_utils#137333
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Closed
Uh oh!
There was an error while loading.Please reload this page.
Closed
Changes fromall commits
Commits
Show all changes
8 commits Select commitHold shift + click to select a range
a8fff9e Deprecate mktemp() to use a safer function.
lighting9999cf5da77 fix windows_utils.py
lighting9999345f5e7 fix windows_utils.py
lighting999933caf80 change at tempfile.mkstemp() instead of tempfile.mktemp()
lighting99992381537 Merge branch 'main' into path-1
lighting9999daec027 fix windows_utils.py
lighting99997b2811a Update windows_utils.py
lighting999931bdba4 📜🤖 Added by blurb_it.
blurb-it[bot]File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
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
13 changes: 13 additions & 0 deletionsMisc/NEWS.d/next/Library/2025-08-04-00-25-48.gh-issue-137335.yRgZib.rst
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| matemp() function is unsafe,so I use safety function. | ||
| bandit tool: | ||
| ``` | ||
| Issue: [B306:blacklist] Use of insecure and deprecated function (mktemp). | ||
| Severity: Medium Confidence: High | ||
| CWE: CWE-377 (https://cwe.mitre.org/data/definitions/377.html) | ||
| More Info: https://bandit.readthedocs.io/en/1.8.6/blacklists/blacklist_calls.html#b306-mktemp-q | ||
| Location: C:\Users\Administrator\Desktop\cpython\lib\asyncio\windows_utils.py:34:14 | ||
| 33 """Like os.pipe() but with overlapped support and using handles not fds.""" | ||
| 34 address = tempfile.mktemp( | ||
| 35 prefix=r'\.\pipe\python-pipe-{:d}-{:d}-'.format( | ||
| 36 os.getpid(), next(_mmap_counter))) | ||
| ``` |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.