Skip to content

fix(wework): protect document links and native credentials - #4

Draft
Micro66 wants to merge 100 commits into
mainfrom
fix/wework-document-credential-security
Draft

Micro66 wants to merge 100 commits into
mainfrom
fix/wework-document-credential-security

Conversation

@Micro66

@Micro66 Micro66 commented Nov 9, 2026 •

Copy link
Copy Markdown
Owner

DOCX 危险链接可进入预览,通用密钥接口及前端模型探测扩大凭据暴露面。本变更在第三方渲染前净化文档关系并阻止危险导航,移除 HTTP/SDK 通用密钥接口,将保存凭据及已保存模型探测限制在 Electron 原生服务。

首次原子复制旧模型配置、模型密钥及云设备凭据到 protected-credentials,秘密使用系统保护的 v3 存储;成功建立后只读写新存储。删除或退出保留空标记,防止旧凭据重新导入。旧文件与旧密钥按用户选择保留供旧版回滚,新旧版本后续写入互不合并,再升级继续使用新版自己的凭据。历史文件原有暴露风险仍存在,本 PR 不宣称完成历史凭据清理。保存连接地址变更须重新输入密钥,原生模型探测不返回保存凭据或远端错误正文。

Core DSH 插件允许 npm、Git 和绝对本地来源。每次安装、更新或开发启动先由原生窗口显示字面来源与代码、文件、网络执行风险,默认取消,HTTP 入口相同。取消先于配置事务、停止现有开发会话及创建进程;同一已运行开发会话的聚焦/HMR不重新安装。自动授权受阻安装脚本的重试已删除。

flowchart LR
  Legacy[旧凭据] -->|首次原子迁移| Protected[系统保护的新存储]
  New[新版] <-->|后续独立读写| Protected
  Old[回滚旧版] <-->|独立读写| Legacy
  Entry[插件安装 / 更新 / 开发启动] --> Consent[原生来源与执行风险确认]
  Consent -->|允许| Execute[事务或开发进程]
  Consent -->|取消| Stop[保留原状态]
  Boot[release-bootstrap] --> Lock[获取原生事务锁后重读状态]
  Lock --> Main[释放锁后进入主应用]
  Lock --> Handoff[转交启动器并持锁至退出]
  Lock -->|失败或锁丢失| Recovery[独立启动恢复窗口]
Loading

最终 HEAD:35417e1c58af4ddc23940538d9dc98538d73fb29,包含 main f9fbc823fa113878b9ab7a52a627a667705a1dbd。源码版本 0.6.8-beta.4,非发布签名候选 0.6.8。原分支、原 PR 不变。

主分支集成保留双方翻译及 Linux 验证依赖,沿用上游启动入口拆分,将已有事务锁接入实际 release-bootstrap 路由,保留停止后准备、路径别名和独立恢复界面。锁丢失立即终止当前进程,通过现有一次性标记进入独立恢复窗口。预取逻辑采用上游抽象,移除失效测试注入路径。导航文档保留新增时区入口并删除无关整表格式差异,相对 main 中英文导航文档各只修改一句安全说明。

最终验证已完成:

  • 普通 CI 43149082679:34 项成功、20 项条件跳过,无失败或未完成检查。Draft 跳过的普通 E2E 不计通过。
  • 完整签名与真实包验证 43149090045:固定上述 HEAD / ci/wework-security-35417e1c,四平台构建、安全边界、suite21 矩阵及策略汇总成功;publish_release=false、build_only=false,未重试或发布。
  • macOS arm64 正式包启动56秒、组件更新65秒、安全边界117秒,均无断言错误。真实 Backend 云登录、重启后刷新200及随后 GET /users/me 200、退出空标记通过;刷新完成04:05:57.310Z,鉴权完成04:05:57.374Z,凭据version3/restarted=true。原生安装/更新/开发启动取消与允许、DOCX危险链接及HTTPS对照、renderer通用密钥拒绝、迁移和重启后原生模型鉴权全部通过。
  • 下载核对8份包对报告:macOS arm64 的正式0.6.7及Beta.4到0.6.8均完整三场景通过;Windows x64 两个同来源包对的独立核心场景通过。四个受支持包对均为suite21/release证据,四阶段模型鉴权/设备签名、旧文件不变、新版写入、回滚旧版写入、再升级使用新版独立凭据,以及空能力清单恢复、重启和备份全部通过。设备签名没有替代真实云登录/刷新。
  • 六份策略逐条核对成功run、精确源/目标包哈希、两端源修订和原始证据摘要。macOS x64 两份策略保留自身哈希,源修订匹配arm64,显式记录architecture-equivalence及对应arm64哈希。
  • 共享计时器completed=true:解析13秒、矩阵642秒、汇总11秒,共666秒(11分6秒),排除外部Runner排队,最多八并发,包含下载、准备、场景、清理、上传和汇总。超过十分钟优化目标的性能告警保留,未豁免功能验证。复用原runner和包,安全覆盖沿用用户接受的2–5分钟增量,未增加并发runner。
  • 本机原生119通过/1平台跳过,最终启动与锁回归43通过(重叠);57项升级/凭据/文档契约、17项工作流契约通过。随后集成main,56项模型配置、24项文档/工作流契约及两端类型检查通过;文档精简后7项契约通过。lint、格式、提交钩子通过,工作树干净。

目标包SHA256:

平台 SHA256
macOS arm64 43fc7d85dd97ccffac802ddb9dae19799f41a1f892803c3bb78015f8bad2ed25
Windows x64 92c811dde45c81d20231313e3beaab68719a58506282e11a3c64b12575f41980
macOS x64 7c7bb008ffc9808352bef396a8ae9c4c99e59a724282f209d5a80266a680f8a4

发布范围仍仅为用户批准的、精确验证的正式0.6.7直升;旧版先到现有正式0.6.7,不新增专用过渡版。四条旧来源(macOS stable0.6.5/beta0.6.4-beta.2、Windows stable0.6.2/beta0.5.13-beta.8)的当前报告仍为failed/evidence=null,按既有批准排除,不生成直升边。Stable最低来源0.6.7、新增边仅0.6.7→0.6.8;Beta.4候选策略是额外证据,不扩大发布授权。策略尚未推广到发布目录,最低来源版本不证明兼容;历史旧版→现有正式0.6.7的精确路径保留。

历史证据只认证对应旧HEAD:5382f5fc的43143757837成功(完整计时623秒);中间dba52858的43148934946因最终HEAD替代,在pending时取消、未构建,不计通过;62b42070的43004484750及82e73883的42969936464成功。失败42989002601、42994367137和取消43001334898的日志保留于Issue;既有修复补齐Linux依赖、前置原生冷准备,并等待精确登录会话实际成功轮询后才批准。没有放宽断言、超时、健康期限,未修改不可变包或靠重跑取得通过。

本轮固定HEAD集成复核未发现新增缺陷,GitHub为MERGEABLE/CLEAN。保持Draft,未合并、未发布、未标记安全事项完成。历史过渡PR wecode-ai#4487 / Fork #5已关闭且未合并。

协作Issue:WEWORK2D8526-144(weWork需求,负责人qindi)。
主仓库:wecode-ai#4479
同一修复的Fork:#4

Wegent Test added 26 commits November 9, 2026 19:24
# Conflicts:
#	wework/electron/src/host/secret-protection.test.ts
# Conflicts:
#	wework/src/features/model-settings/localModelProviders.ts
Wegent Test and others added 30 commits November 13, 2026 12:43
…ites

Integrate main upgrade policy changes with the suite25 credential acceptance contract.
Resolve private model references inside the native host before existing local or configured cloud runtime dispatch.
Fix native authorization, modal targeting, foreground input and reference-navigation defects established by current desktop CI logs.
Preserve the upstream personal-work navigation and DOCX preview retry entry.
Keep native security fixes, suite25 acceptance, and the existing desktop image unchanged.
Integrate main baa2b17 after the confirmed navigation conflict, preserving new knowledge-event coverage and the DOCX Retry entry. Resolve GTK EWMH modal discovery and require native idleness before cloud fault injection. Isolate ordinary macOS test credential identities and retain release identities. Capture the unresolved browser transport cause without request URLs.
Integrate main 8d19c8d while preserving native credential isolation, DOCX sanitization, explicit plugin approval and suite25 upgrade evidence. Resolve saved MiniMax discovery inside the native host and reuse the shared model probe with redirects denied. Validate the latest published Beta source against the next nonpublishing candidate.
Keep the original assertion Promise bound to its Inspector object group until
its real result is returned, with immediate rejection observation and the
existing shared evaluation deadline. Release bindings on every exit without
masking the original failure.

Add real V8 garbage-collection, rejection, ownership and disconnect regression
coverage to the existing native contract suite. Select the latest published
Beta.2 as the source floor for the next nonpublishing Beta candidate.
Classify verified history pagination, saved invocation and Goal eligibility
reads so their original responses finish before changing authentication.
Preserve native continuation ownership, mutation and unknown-request guards,
and the existing admission deadline.

Record queued-turn admission ownership and cleanup boundaries to diagnose the
unresolved async-answer queue failure without changing scheduling semantics.
Cover cleanup order and queueIfBusy combinations through the existing handler
unit suite. Keep Dockerfiles and original E2E assertions unchanged.
…ecode-ai#4678)

* feat(collaboration): add assistant hosting status design prototype

* fix(collaboration): preserve hosting snapshots and retry failed reads
…e-ai#4717)

* fix(executor): preserve inherited routes for reply predictions

* fix(executor): restore prediction transport after native restart

* fix(wework): preserve device and plugin state across concurrent refreshes

* fix(wework): retain sync cancellation semantics during device refresh
…de-ai#4716)

* fix(wework): admit follow-ups immediately and read context on demand

* test(wework): select explicit conversation references in model fixtures

* fix(wework): preserve conversation ownership during send recovery

* fix(wework): reset association only when its conversation changes

* fix(wework): use owning context in composer issue guide

* fix(wework): expose task count failures and scoped retry

* fix(wework): use shared button for task count retry

* fix(wework): retain navigation target until aligned

* test(wework): align reconcile windows after baseline settlement

* test(wework): settle policy sync before auto-update recovery checks

* test(wework): distinguish policy snapshot caller from ACK recipients

---------

Co-authored-by: Wegent Test <test@wegent.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants