Tmpfile Mktemp

The `mktemp` function should no longer be used due to multiple flaws. Some implementations created random files by using known information like the process ID and a single letter. This allows for possible race conditions where an attacker could guess or manipulate these files prior to them being used. Consider using the `mkstemp` function instead, but be awa

IndexedPublic repositoryHighMedium confidenceVerifiedGPL-2.0-onlyC
greprules fetch gitlab-sast-c-tmpfile-rule-mktemp --engine opengrep

Description

The `mktemp` function should no longer be used due to multiple flaws. Some implementations created random files by using known information like the process ID and a single letter. This allows for possible race conditions where an attacker could guess or manipulate these files prior to them being used. Consider using the `mkstemp` function instead, but be awa