feat(web): warn when local Web service binds beyond loopback - #273
Merged
Conversation
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.
变更内容
lifeos web serve在绑定非 loopback host(如0.0.0.0)时向 stderr 输出警告,提示 Web API 无认证、个人数据会暴露到网络,并建议保持127.0.0.1或通过网络层限制访问。is_loopback_host/warn_if_non_loopback_binding,带单元测试覆盖 loopback 识别与警告输出。--host)中英文文案更新,警告文案纳入中英文 locale catalog。SECURITY.md新增 "Local Web Service Exposure" 章节;README(中英)补充绑定风险说明。scripts/check_locale_catalog.py的引用扫描扩展到src/lifeos_web,使 Web 运行时使用的 i18n key 也能被 locale-catalog-sync 校验(强化而非弱化门禁)。验证
bash ./scripts/doctor.sh:通过(测试、lint、dead-code、mypy、locale-catalog-sync、依赖漏洞审计、package build;PostgreSQL CLI 集成测试按环境跳过)。相关
Closes #261