Make Werkzeug debug mode opt-in instead of debug=True #7

Open
opened 2026-06-06 19:58:11 +00:00 by tonym · 0 comments

Severity: medium
Category: security
Location: app.py:2870

Problem

app.run(debug=True) in the main block enables the interactive debugger (arbitrary code execution) if anyone runs python app.py directly on the NAS.

Suggested fix

Gate it: app.run(debug=os.environ.get('FLASK_DEBUG')=='1').

Filed by automated code review.

**Severity:** medium **Category:** security **Location:** `app.py:2870` ### Problem `app.run(debug=True)` in the __main__ block enables the interactive debugger (arbitrary code execution) if anyone runs `python app.py` directly on the NAS. ### Suggested fix Gate it: `app.run(debug=os.environ.get('FLASK_DEBUG')=='1')`. _Filed by automated code review._
tonym added the
security
severity:medium
labels 2026-06-06 19:58:11 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bonna61/Moon-Household-Budget#7
No description provided.