← All recipes
Moderne licensed

Find deprecated tempfile.mktemp() usage

Recipe IDorg.openrewrite.python.migrate.FindTempfileMktempArtifactopenrewrite-migrate-python

Find usage of tempfile.mktemp() which is deprecated due to security concerns (race condition). Use mkstemp() or NamedTemporaryFile() instead.

Single recipepythonsecuritymigrationtempfile3.14Proprietary

Usage

This recipe has no required configuration options. You’ll need the Moderne CLI configured before running the command below.

mod run . --recipe org.openrewrite.python.migrate.FindTempfileMktemp

If the recipe isn’t available locally, install it with:

mod config recipes pip install openrewrite-migrate-python