Skip to content

fix: disable public flask debug by default#4926

Closed
ethever wants to merge 1 commit into
Scottcjn:mainfrom
ethever:ethever/fix-public-flask-debug-default-4810
Closed

fix: disable public flask debug by default#4926
ethever wants to merge 1 commit into
Scottcjn:mainfrom
ethever:ethever/fix-public-flask-debug-default-4810

Conversation

@ethever
Copy link
Copy Markdown
Contributor

@ethever ethever commented May 13, 2026

Summary

Validation

  • git diff --check origin/main...HEAD
  • python3 -m py_compile bcos_directory.py bridge/bridge_api.py contributor_registry.py explorer/app.py keeper_explorer.py security_test_payment_widget.py tests/test_public_flask_debug_defaults.py
  • PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 uv run --no-project --with pytest --with flask python -m pytest tests/test_public_flask_debug_defaults.py -q
  • python3 tools/bcos_spdx_check.py --base-ref origin/main

Bounty

Wallet: b3a58f80a97bae5e2b438894aa85600cb0c066RTC

  - gate standalone public Flask debug mode behind FLASK_DEBUG

  - add an AST regression for 0.0.0.0 app.run debug defaults
@github-actions
Copy link
Copy Markdown
Contributor

Welcome to RustChain! Thanks for your first pull request.

Before we review, please make sure:

  • Your PR has a BCOS-L1 or BCOS-L2 label
  • New code files include an SPDX license header
  • You've tested your changes against the live node

Bounty tiers: Micro (1-10 RTC) | Standard (20-50) | Major (75-100) | Critical (100-150)

A maintainer will review your PR soon. Thanks for contributing!

@ethever
Copy link
Copy Markdown
Contributor Author

ethever commented May 13, 2026

Checklist for #4810:

  • Default debug mode is off for standalone Flask entrypoints bound to 0.0.0.0.
  • Local development can still opt in with FLASK_DEBUG=1.
  • Added tests/test_public_flask_debug_defaults.py to prevent new public debug=True defaults.
  • Validation commands are listed in the PR body.

Bounty wallet: b3a58f80a97bae5e2b438894aa85600cb0c066RTC

@github-actions github-actions Bot added the size/M PR: 51-200 lines label May 13, 2026
@github-actions github-actions Bot added BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) security Security-related change tests Test suite changes labels May 13, 2026
@ethever
Copy link
Copy Markdown
Contributor Author

ethever commented May 13, 2026

Closing this because it duplicates older open fixes for #4810 (#4859 and #4843). I found those in the full open PR list after opening this PR, so this should not be considered a payout candidate.

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

Labels

BCOS-L1 Beacon Certified Open Source tier BCOS-L1 (required for non-doc PRs) BCOS-L2 Beacon Certified Open Source tier BCOS-L2 (required for non-doc PRs) security Security-related change size/M PR: 51-200 lines tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SECURITY] Public Flask entrypoints enable debug mode by default

1 participant