vetkit.go.tempfile.predictable-path
A file with a fixed name is created in the shared temp directory. Another local user can pre-create it or plant a symlink there to hijack or corrupt the write.
Last updated:
Suite: Security
go
A file with a fixed name is created in the shared temp directory. Another local user can pre-create it or plant a symlink there to hijack or corrupt the write.
Category: SECURITY · Engine rule severity: INFO
How to fix it
Create the file with os.CreateTemp (or os.MkdirTemp for a private directory), which picks an unpredictable name and opens it exclusively.
References
Source: packages/engine/rules/sast/go.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.