> ## Documentation Index
> Fetch the complete documentation index at: https://docs.codeant.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Avoid mktemp

<AccordionGroup>
  <Accordion title="avoid-mktemp">
    The function `mktemp` is deprecated. When using this function, it is possible for an attacker to modify the created file before the filename is returned. Use `NamedTemporaryFile()` instead and pass it the `delete=False` parameter.<br />**Likelihood**: LOW<br />**Confidence**: HIGH<br />**CWE**: <br />- CWE-377: Insecure Temporary File
    <br />**OWASP**: <br />- A01:2021 - Broken Access Control
  </Accordion>
</AccordionGroup>
