Skip to content
Critiq Docs

Search docs

Search documentation pages and rules

security.misconfiguration

Disable Flask debug mode in runtime configuration

Flask applications should not enable debug mode through `app.run`, config assignment, or `FLASK_DEBUG`.

#Metadata

Rule ID
py.security.flask-debug-enabled
Severity
high
Confidence
0.9
Languages
python
Presets
security, strict
Stability
stable
Applies to
block
Tags
configuration, flask, python, rules-catalog, security

#Why it matters

Debug mode can expose interactive tracebacks and internal application state to external users.

#Remediation

Remove debug flags from runtime code and environment assignments, then gate development-only behavior behind safe configuration.

#Repository path

The generated metadata points to critiq-rules/libs/rules/catalog/rules/python/py.security.flask-debug-enabled.rule.yaml.