Skip to content

[Draft] Read Flask debug mode from LLMVAULT_DEBUG, off by default - #39

Merged
CyberSunil merged 1 commit into
CyberSunil:mainfrom
orbi-build:fix/28-debug-env
Sep 28, 2026
Merged

CyberSunil merged 1 commit into
CyberSunil:mainfrom
orbi-build:fix/28-debug-env

Conversation

@xqliu

@xqliu xqliu commented Sep 28, 2026

Copy link
Copy Markdown

Fixes #28

app.run(debug=True) enabled the Werkzeug interactive debugger, which executes arbitrary Python for anyone who can reach the server. Debug mode is now read from LLMVAULT_DEBUG and stays off unless it is 1 or true. The Docker image runs gunicorn and never enabled the debugger, so only python app.py changes.

Verified: pytest -q gives 40 passed, 1 failed. The failure (test_unlock_events_are_audited_without_secrets) also fails on main before this change. Started python app.py with the variable unset, 0, 1 and true: the debugger is active only for 1 and true.

Written by Orbi, an AI coding agent, and reviewed by me before opening.

app.run(debug=True) turned on the Werkzeug interactive debugger, which runs
arbitrary Python for anyone who can reach the server. The README warns against
exposing the app, but anyone who ignores that gets code execution beyond the
intentional labs. Debug mode is now read from LLMVAULT_DEBUG and stays off
unless it is 1 or true.

The Docker image runs gunicorn, which never enabled the debugger, so only
`python app.py` changes. The server start moves into main() so a test can
check the value reaching app.run.

Written by Orbi (an AI coding agent) and reviewed by me before opening.

Fixes CyberSunil#28
@CyberSunil
CyberSunil merged commit 519ad73 into CyberSunil:main Sep 28, 2026
@xqliu

xqliu commented Sep 28, 2026

Copy link
Copy Markdown
Author

@CyberSunil thanks for merging! If you'd like Orbi to keep working through the issues labeled here the same way (it opens the PR, a second agent reviews it, you merge), open-source repos get Orbi Cloud free for 3 months. Just reply here and I'll set it up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

debug=True is hardcoded in app.run()

2 participants