PyPI / python-dotenv / 1.2.4

python-dotenv 1.2.4

Source
https://github.com/theskumar/python-dotenv
Tag scanned
v1.2.4
Compared with
v1.2.3 (0 signals introduced since)
Files
32 scanned, 7 skipped (binary, oversized, or unrecognised)
Signals
0 critical · 0 warn · 1 info
Scan time
2.5 s
LLM review
Reviewed by claude-haiku-5-5 (Anthropic): 1 of 1 warn and critical signal; 1 demoted to info.
Disclude version
4.1.0
Scanned (UTC)
2026-10-21 21:49

Signals

Ordered by severity, then signals introduced in this release. Hidden characters are shown as ⟨U+…⟩.

  1. info warn → info by review frame-introspection src/dotenv/main.py:366:17

    `sys._getframe` — call-stack frame introspection (ast pass, confidence 0.70)

            # will work for .py files
            frame = sys._getframe()
            current_file = __file__
    likely benign LLM, confidence 0.95 Uses sys._getframe() in python-dotenv's find_dotenv to determine the calling module's file location.
    Reasoning

    This is python-dotenv's find_dotenv logic, which walks the call stack via sys._getframe() to locate the calling file's directory when running interactively or from a frame without __file__. The comment directly above explains the purpose. Frame introspection here is a legitimate, well-known pattern for locating the caller's path and does not execute hidden code or exfiltrate data.

Reproduce This Scan

Run disclude locally to verify. Add --format sarif for SARIF output. Add --llm (with an API key in the environment) to include the LLM review.

cargo install disclude --version 4.1.0
git clone https://github.com/theskumar/python-dotenv python-dotenv && cd python-dotenv
git checkout v1.2.4
disclude scan --severity info --diff v1.2.3 .