Scan Results

Guidelines enforcement results across your repositories

Guidelines
Files
28
Total files scanned
📄
5
Total violations found
cli.py
/src/flask/cli.py
High 2 2 Violations
High Flask Debug Mode Must Be Disabled in Production
Line 369 sets app.debug = get_debug_flag() which dynamically enables debug mode based on external configuration without validation
The code unconditionally enables debug mode when set_debug_flag is True, similar to the violation example pattern of using external variables to control debug state
app.py
/src/flask/app.py
High 2 2 Violations
app.py
/src/flask/sansio/app.py
High 1 1 Violations
Compliant Files
list of all files that are valid
cli.py
/src/flask/cli.py
360
"Could not locate a Flask application. Use the"
361
" 'flask --app' option, 'FLASK_APP' environment"
362
" variable, or a 'wsgi.py' or 'app.py' file in the"
363
" current directory."
364
)
365
366
if self.set_debug_flag:
367
# Update the app's debug flag through the descriptor so that
368
# other values repopulate as well.
369
app.debug = get_debug_flag()
370
371
self._loaded_app = app
372
return app
373
374
375
pass_script_info = click.make_pass_decorator(ScriptInfo, ensure=True)
376
377
F = t.TypeVar("F", bound=t.Callable[..., t.Any])
378