Skip to content

Conversation

@vivekkhimani
Copy link
Collaborator

No description provided.

app = flask.Flask(__name__)

# ruleid: active-debug-code-flask
app.debug = True
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The application is running debug code or has debug mode enabled. This may expose sensitive information, like stack traces and environment variables, to attackers. It may also modify application behavior, potentially enabling attackers to bypass restrictions. To remediate this finding, ensure that the application's debug code and debug mode are disabled or removed from the production environment.

Ignore this finding from active-debug-code-flask.

app = flask.Flask(__name__)

# ruleid: active-debug-code-flask
app.run(debug=True, use_debugger=False, use_reloader=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The application is running debug code or has debug mode enabled. This may expose sensitive information, like stack traces and environment variables, to attackers. It may also modify application behavior, potentially enabling attackers to bypass restrictions. To remediate this finding, ensure that the application's debug code and debug mode are disabled or removed from the production environment.

Ignore this finding from active-debug-code-flask.

app = flask.Flask(__name__)

# ruleid: active-debug-code-flask
app.run(debug=True, use_debugger=False, use_reloader=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Detected Flask app with debug=True. Do not deploy to production with this flag enabled as it will leak sensitive information. Instead, consider using Flask configuration variables or setting 'debug' using system environment variables.

Ignore this finding from debug-enabled.

app.run(passthrough_errors=True)

# ok: active-debug-code-flask
app.run()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top-level app.run(...) is ignored by flask. Consider putting app.run(...) behind a guard, like inside a function

Ignore this finding from avoid_using_app_run_directly.

# ruleid: active-debug-code-flask
app.run(debug=True, use_debugger=False, use_reloader=False)

app.run(passthrough_errors=True)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top-level app.run(...) is ignored by flask. Consider putting app.run(...) behind a guard, like inside a function

Ignore this finding from avoid_using_app_run_directly.

app = flask.Flask(__name__)

# ruleid: active-debug-code-flask
app.run(debug=True, use_debugger=False, use_reloader=False)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

top-level app.run(...) is ignored by flask. Consider putting app.run(...) behind a guard, like inside a function

Ignore this finding from avoid_using_app_run_directly.

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.

2 participants