vetkit.py.tempfile.mktemp
tempfile.mktemp() is race-prone; another process can create the file first.
Last updated:
Suite: Security
python
tempfile.mktemp() is race-prone; another process can create the file first.
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Use tempfile.mkstemp() or tempfile.NamedTemporaryFile().
Rule pattern example
The engine’s matching pattern, not a confirmed exploit. Metavariables and ellipses describe matching syntax.
tempfile.mktemp(...)References
Source: packages/engine/rules/sast/python.yml.
Generated from shipped rule definitions at build time. Matching is a review signal, not proof of exploitability. “generic” denotes text matching, not complete language or framework coverage. Runtime configuration and available tools affect whether a rule runs.