fix: harden Flask secret key and disable debug mode in 3 more services#4060
fix: harden Flask secret key and disable debug mode in 3 more services#4060BossChaos wants to merge 2 commits intoScottcjn:mainfrom
Conversation
BossChaos
commented
May 7, 2026
- explorer/ws_explorer_server.py: Replace hardcoded SECRET_KEY default with secrets.token_hex(32) fallback
- contributor_registry.py, profile_badge_generator.py, bcos_directory.py: Disable debug=True in production
1. explorer/ws_explorer_server.py:
- Replace hardcoded SECRET_KEY default ("rustchain-ws-explorer")
with secrets.token_hex(32) fallback + warning
- Predictable session keys enable session forgery attacks
2. contributor_registry.py, profile_badge_generator.py, bcos_directory.py:
- Disable debug=True in production (controlled via FLASK_DEBUG env var)
- Debug mode exposes interactive debugger and stack traces
haoyousun60-create
left a comment
There was a problem hiding this comment.
Reviewed. Security hardening looks solid. LGTM! 🚀
fengqiankun6-sudo
left a comment
There was a problem hiding this comment.
LGTM! Good security fix. ✅
|
Closing per branch-contamination audit (2026-05-09). This PR is part of a 161-PR cluster from your account where the diff carries files unrelated to the claimed fix. Specifically, 128 of 161 PRs in this batch modify This is a branching-hygiene problem, not a quality problem with the underlying fixes. The pattern means:
To get back to paid status:
I have nothing against the underlying fixes — quality has been good when scoped. But contamination at this scale is unreviewable, and Faucet Tiers policy requires clean diffs for security claims. Specifically clean PRs already approved for payout (per 2026-05-06 audit, still scope-clean as of today):
These will be paid via the admin /wallet/transfer flow. — auto-triage 2026-05-09 (this is mechanical contamination detection, not a personal judgment) |