Skip to content

feat(windows): add a security-first Windows 11 Preview port - #3

Closed
songconmaisaix31-design wants to merge 24 commits into
laogou717:mainfrom
songconmaisaix31-design:codex/windows-native-adaptation
Closed

feat(windows): add a security-first Windows 11 Preview port#3
songconmaisaix31-design wants to merge 24 commits into
laogou717:mainfrom
songconmaisaix31-design:codex/windows-native-adaptation

Conversation

@songconmaisaix31-design

@songconmaisaix31-design songconmaisaix31-design commented Aug 14, 2026

Copy link
Copy Markdown

Summary

  • add an explicit macOS/Windows platform boundary while preserving the existing macOS runtime
  • add Windows-native path, process, listener, storage, picker, structured commandSpec, schema v2 migration, and explicit config import support
  • add managed Windows lifecycle control built around CREATE_SUSPENDED, Job Objects, a private Named Pipe, signed receipts, exact runtime identity, and generation CAS
  • add an unsigned reproducible PyInstaller onedir package, archive audit, fixture-owned package smoke tests, and cross-platform CI gates
  • align the README, security notes, release checklist, API contracts, decisions, and test evidence with the Windows Preview/Alpha scope

Windows safety model

  • Local Ops only controls process trees created by the exact Local Ops generation and verified through SID, PID creation time, Job membership, HMAC-signed receipts, and a private runtime directory.
  • A port, PID, process name, cwd, parent PID, or command line is never treated as ownership proof.
  • Windows external attach/kill and console restart remain disabled.
  • Force stop is never automatic. It is available only after a graceful-stop timeout, a fresh state read, exact-generation verification, and a second explicit confirmation.
  • Lifecycle tests only create and control isolated fixture/CI processes; they do not target existing user processes.

Validation

Current scope and limitations

This is a Windows 11 x64 Preview/Alpha engineering candidate, not a public Beta. Source mode targets Python 3.12; the packaged artifact is an unsigned development build. Windows 10, an independent clean machine without Python, Defender/SmartScreen acceptance, native picker and Windows Notification Center delivery, brand review, and signing/release decisions remain open gates.

Upstream context

Related to #1.

An existing Windows implementation is already under review in #2. This Draft PR offers a security-first alternative with a stricter process-ownership and fail-closed lifecycle model so maintainers can compare the tradeoffs. It is not intended to close #1 or supersede #2 without maintainer review.

Compatibility

The macOS standard-library runtime and existing user data remain supported. Windows-only runtime/build dependencies are isolated in dedicated requirement files, and schema v2 is additive: the legacy command field remains available while Windows execution requires a validated structured commandSpec.

@laogou717 laogou717 mentioned this pull request Aug 14, 2026
3 tasks
@laogou717

Copy link
Copy Markdown
Owner

感谢你的贡献,安全优先的设计(Job Objects、签名回执、CREATE_SUSPENDED)和文档工作量都很可观。

说明一下维护立场:总控台由原作者个人维护,功能迭代以个人日常使用的实际需求为准,暂不承诺审阅或合入社区 PR(详见 README「维护说明」)。

你的移植已收录到 README 的「社区衍生版本」推荐列表。欢迎在你的仓库继续维护这个版本,并在 Discussions 提交说明或更新,我会同步更新推荐列表。

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.

[Feature] 提供 Windows 支持

2 participants