fix: disable Flask debug mode in getting-started example (CWE-489) - #392
Merged
Conversation
The example app was started with debug=True, which enables the Werkzeug interactive debugger. Since the example is deployed behind a LoadBalancer Service bound to 0.0.0.0, this would expose the debugger console (and detailed error pages) to anonymous internet clients, allowing potential remote code execution via PIN bypass. Fixes Azure#390 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #392 +/- ##
=======================================
Coverage 67.06% 67.06%
=======================================
Files 33 33
Lines 3783 3783
=======================================
Hits 2537 2537
Misses 1072 1072
Partials 174 174 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
weng271190436
approved these changes
Jul 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes CWE-489 (Active Debug Code): the Flask
getting-startedexample app was started withdebug=True, enabling the Werkzeug interactive debugger. Since the example is deployed behind aLoadBalancerService bound to0.0.0.0, this exposes the debugger console (and detailed error pages) to anonymous internet clients if deployed as documented, allowing potential remote code execution via Werkzeug PIN bypass.Change
Removed
debug=Truefromapp.run(...)inexamples/getting-started/app/main.py.Fixes
Fixes #390