Repository navigation
fix(browser): 授予启动令牌完整权限以通过 WFP 生产验收 - #69
Merged
Merged
Conversation
This was referenced Aug 15, 2026
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.
背景
issue #1:Windows WFP 受限浏览器生产探针长期停留在管理员验收,最后一次记录证据是
baseline_process_create_with_token_invalid_parameter,且注明20865b5之后未再验收。本机(Microsoft 账户管理员)实测当前失败码已不是invalid_parameter,而是baseline_process_create_with_token_access_denied:提权 token 缺少SeAssignPrimaryTokenPrivilege,CreateProcessAsUser永远走不通;而仅需SeImpersonatePrivilege的兜底CreateProcessWithTokenW又拿不到一个受限权限的令牌,直接ERROR_ACCESS_DENIED。本次改动
acquireWindowsInteractiveShellPrimaryToken复制可信explorer.exe令牌时,把desiredAccess从文档最小集TOKEN_QUERY|TOKEN_DUPLICATE|TOKEN_ASSIGN_PRIMARY改为TOKEN_ALL_ACCESS:CreateProcessWithTokenW在受限权限副本上需要更多权限,否则在process_create_with_token阶段 fail closed 为access_denied。explorer.exe系统路径。测试覆盖
internal/browserruntime全量go test -count=1通过。internal/app(含 doctor 命令路径)全量通过。browserNetworkProbeRunFailureCode的既有失败码分类用例不受影响。验证结果
go build ./...、go vet ./...通过。doctor browser-network-probe --product chrome --confirm RUN-LOCAL-WFP-BROWSER-PROBE,UAC 提权)实测通过:11 项验收全绿(dynamic_session_observed/atomic_install_observed/exact_target_observed/wrong_port_denied/wrong_loopback_address_denied/non_loopback_address_denied/ipv6_denied/rule_cleanup_observed均为 true,synthetic=false、production=true、passed=true),退出码 0;探针结束后无残留 WFP 规则、浏览器进程或临时 Profile,子进程为同用户/同会话/非提权/中完整性 Primary Token 并在恢复前绑定到受限 Job。安全边界与非目标
explorer.exe),使用前仍做同用户/同会话/非提权/中完整性/系统路径严格校验;TOKEN_ALL_ACCESS只作用于这一枚被复制、被校验、且仅用于启动浏览器的令牌,不扩展任何产品授权面。--confirm RUN-LOCAL-WFP-BROWSER-PROBE且必须管理员运行;受限浏览器产品入口(C8C)仍保持关闭,本 PR 只补齐其生产证据。Closes #1