Repository navigation
fix(remote-input): 收紧局域网输入配对与依赖安全 - #1431
Open
SipengXie2024 wants to merge 1 commit into
Open
SipengXie2024 wants to merge 1 commit into
SipengXie2024 wants to merge 1 commit into
Conversation
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
- 远程输入:同一配对码累计 100 次错误后锁定,需在电脑端重新生成配对码; 原有每 IP / 全局 60 秒窗口限速只能拖慢局域网内的 6 位码暴力猜测。 - 远程输入:监听仍绑定 0.0.0.0,但只接受私有局域网与回环来源, 与界面展示的访问地址一致,公网/CGNAT 来源直接断开。 - 远程输入:手机页增加 nosniff、X-Frame-Options、Referrer-Policy 与 CSP; 内联启动脚本按实际下发内容的 sha256 放行,不使用 unsafe-inline。 - 本地模型:非本机的明文 http 模型文件必须声明 sha256; ZIP 解压按实际写出字节限制大小,并要求与条目头一致。 - 依赖:rustls-webpki 0.103.16、webpki-roots/webpki-root-certs 1.0.10、 ctutils 0.4.4、rustix 1.1.6、zstd 0.13.4/zstd-safe 7.4.1(RustSec 公告修复版), js-yaml 4.3.2(仅测试脚本使用)。 Co-authored-by: AiWork <noreply@aiwork.local>
SipengXie2024
force-pushed
the
security/remote-input-hardening
branch
from
November 16, 2026 03:59
cacafac to
76124d7
Compare
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.
摘要
修复安全审查中发现的局域网远程输入、模型下载与依赖问题。
修复 / 新增 / 改进
locked文案(「请在电脑上重新生成配对码」)。0.0.0.0以适应网卡变化,但在 accept 阶段只放行 RFC1918 私网与回环来源(与界面展示的访问地址一致),公网、CGNAT、链路本地来源直接断开。X-Content-Type-Options: nosniff、X-Frame-Options: DENY、Referrer-Policy: no-referrer;首页增加 CSP。内联启动脚本按实际下发内容的 sha256 放行,不使用unsafe-inline;blob:用于 app.js 动态构建的 AudioWorklet。http模型文件必须声明 sha256(https 与本机测试服务不受影响);ZIP 解压按实际写出字节限制大小,并要求与条目头声明一致,防止伪造头部撑满磁盘。rustls-webpki0.103.15 → 0.103.16(RUSTSEC-2026-0382,可能接受已撤销信任的中间证书)webpki-roots/webpki-root-certs1.0.9 → 1.0.10(RUSTSEC-2026-0381 / 0383)ctutils0.4.3 → 0.4.4(RUSTSEC-2026-0385)rustix1.1.5 → 1.1.6(RUSTSEC-2026-0486)zstd0.13.3 → 0.13.4、zstd-safe7.3.0 → 7.4.1(RUSTSEC-2026-0391、0395–0406)js-yaml4.3.0 → 4.3.2(开发依赖,仅测试脚本解析工作流 YAML)兼容
rsa0.9(RUSTSEC-2023-0071,无 0.9 修复版)与crypto-bigint0.5:需升级主版本。zip2.6.1 / 4.6.1:由tauri-plugin-updater、sherpa-onnx-sys、foundry-local-sdk间接引入,需上游升级;项目自身的解压路径已使用 zip 9.0.5,并经过路径校验。fastgit.cc:现有镜像回退路径仍在使用,且 APK 已用内置公钥做 minisign 验签。glib0.18、proc-macro-error、zbus系列的 unsound / unmaintained 公告:均为 Linux GTK 依赖链,需随 Tauri 升级。测试计划
cargo fmt --all --check(Rust 1.99)cargo metadata --lockednode scripts/frontend-test-runner.mjs --platform-only windows,以及pin-persistence-security-contract、remote-input-*、shared-backend-wire-contract和所有使用 js-yaml 的合同测试ci-performance、release-distribution、release-publication-contract、windows-msi-release-contract以及缓存预算断言在本机失败,原因均为本机环境:沙箱文件系统 os error 4395、D:\D:\路径拼接、PowerShell 受限语言模式。cargo test -p openless-core --locked、cargo test --locked --manifest-path src-tauri/Cargo.toml --libexhausted_pin_budget_locks_pairing_until_the_code_is_regenerated、plaintext_remote_model_urls_require_a_checksum、only_private_lan_and_loopback_peers_are_accepted、index_csp_pins_the_served_inline_script_instead_of_allowing_unsafe_inline