Repository navigation
fix(webui): refuse to expose training controls without auth - #337
Merged
Yifan Yang (Yif-Yang) merged 1 commit intoOct 29, 2026
Merged
Conversation
Binding a non-loopback --host or using --share without credentials only printed a warning and then served the UI unauthenticated, letting any reachable client launch training jobs that run with the API keys from .env/.secrets or stop running ones. Now main() exits unless --auth-user/--auth-pass (or SKILLOPT_WEBUI_USER/PASS) are set; --allow-unauthenticated keeps the old behaviour as an explicit opt-in. Also fixes first-experiment.md, which still said the default host is 0.0.0.0. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Yifan Yang (Yif-Yang)
deleted the
security/webui-require-auth-when-exposed
branch
October 29, 2026 08:40
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #249. With
--host 0.0.0.0(or any non-loopback host) or--shareand no credentials, the WebUI only printed a warning and then served unauthenticated, so any reachable client could launch training jobs that run with the API keys from.env/.secrets, or stop running ones.main()now exits unless--auth-user/--auth-pass(orSKILLOPT_WEBUI_USER/SKILLOPT_WEBUI_PASS) are set when exposed--allow-unauthenticatedkeeps the old behaviour as an explicit opt-indocs/guide/first-experiment.md, which still said the default host is0.0.0.0Test plan
pytest tests/test_webui_security.py tests/test_webui_build_gradio.py tests/test_webui_env_preflight.py— 103 passed, 2 skipped (new tests: exposed without auth refuses for host and share; exposed with auth launches)🤖 Generated with Claude Code