Tmpfile Mkstemp

Some older Unix-like systems, `mkstemp` would create temp files with 0666 permissions, meaning the file created would be read/write access for all users. Ensure the process has called the `umask` function with restricted permissions prior to calling `mkstemp` and validate the permissions prior to using the file descriptor. For more information on temporary f

IndexedPublic repositoryLowMedium confidenceVerifiedGPL-2.0-onlyC
greprules fetch gitlab-sast-c-tmpfile-rule-mkstemp --engine opengrep

Description

Some older Unix-like systems, `mkstemp` would create temp files with 0666 permissions, meaning the file created would be read/write access for all users. Ensure the process has called the `umask` function with restricted permissions prior to calling `mkstemp` and validate the permissions prior to using the file descriptor. For more information on temporary f