Skip to content

fix(windows): support constrained PowerShell sessions#179

Merged
Wangnov merged 1 commit into
mainfrom
codex/issue-178-powershell-clm
Jul 11, 2026
Merged

fix(windows): support constrained PowerShell sessions#179
Wangnov merged 1 commit into
mainfrom
codex/issue-178-powershell-clm

Conversation

@Wangnov

@Wangnov Wangnov commented Jul 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • replace runtime [pscustomobject] projections with plain hashtables so Authenticode, MSIX install/detection, health, removal, and capability reports remain serializable in PowerShell ConstrainedLanguage
  • avoid restricted method calls where the runtime path needs to work under AppLocker/WDAC, while keeping unsupported WinRT capability probes explicitly Unknown
  • add Windows-only CLM regression tests for the production Authenticode, capability, MSIX install, and MSIX detection scripts, plus a cross-platform guard against reintroducing the failing cast

Root cause

PowerShell ConstrainedLanguage rejects the [pscustomobject] conversion used to build JSON reports. That caused the report command to exit before the manager could inspect the real Authenticode or installation result, which surfaced as a misleading signature-verification failure. This change keeps the existing fail-closed publisher/signature policy; it only makes report generation compatible with the restricted language mode.

Validation

  • npm run check
  • npm run lint
  • npm test -- --run (118 passed)
  • npm run build
  • cargo test --manifest-path crates/codex-win-engine/Cargo.toml --all-targets (70 passed)
  • cargo check --manifest-path crates/codex-win-engine/Cargo.toml --target x86_64-pc-windows-msvc --all-targets
  • cargo clippy --manifest-path src-tauri/Cargo.toml --workspace --all-targets -- -D warnings
  • cargo test --manifest-path src-tauri/Cargo.toml --workspace (92 passed)
  • codex review on the uncommitted changes: no actionable findings

The Windows CI leg will execute the new Windows-only PowerShell 5.1 ConstrainedLanguage tests.

Closes #178

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@Wangnov Wangnov merged commit e364140 into main Jul 11, 2026
6 checks passed
@Wangnov Wangnov deleted the codex/issue-178-powershell-clm branch July 11, 2026 09:19
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.

更新包签名校验失败。已保留现有Codex,请稍 后重试或更换更新源。

1 participant