vetkit.c.tempfile.insecure-function
mktemp / tmpnam / tempnam only return a name; another process can create that file before it is opened (insecure temporary file).
Last updated:
Suite: Security
c, cpp
mktemp / tmpnam / tempnam only return a name; another process can create that file before it is opened (insecure temporary file).
Category: SECURITY · Engine rule severity: WARNING
How to fix it
Use mkstemp / mkdtemp (or tmpfile), which create and open the file atomically with a private mode.
References
Source: packages/engine/rules/sast/c.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.