You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(windows): avoid bypass in tray shortcuts (#133)
Replace persistent Bypass launch arguments with RemoteSigned, unblock only verified managed PowerShell copies, and add Windows regression and upgrade guidance.\n\nRelated to #130.
Copy file name to clipboardExpand all lines: windows/README.en.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -28,12 +28,18 @@ The installer validates the official Codex Store package and Node.js, saves a re
28
28
-`Codex Dream Skin - Tray`: open the system tray theme controls.
29
29
-`Codex Dream Skin - Restore`: restore the stock appearance and close the saved CDP session.
30
30
31
+
`Bypass` in the install command applies only to that user-initiated installer process. The installer verifies the runtime copy with SHA-256, then clears download-zone markers only from managed PowerShell copies under `%LOCALAPPDATA%\CodexDreamSkin\engine`. Daily shortcuts use `RemoteSigned` and do not override system or enterprise Group Policy.
32
+
31
33
Pass `-Port` during installation to use a fixed custom port. Valid ports range from `1024` through `65535`.
Exit the Dream Skin tray and close Codex, update the checkout (`git pull`, or download the latest source again), then rerun the install command above. The installer atomically replaces the managed runtime and rebuilds its shortcuts without deleting the active theme, saved themes, or imported images.
42
+
37
43
## Launch and verify
38
44
39
45
The `Codex Dream Skin` shortcut is the recommended launcher. It asks for confirmation before restarting an open Codex window.
@@ -126,6 +132,10 @@ The scripts accept only a registered official Store package. They do not launch
126
132
127
133
Close every Codex window and run the installer again. Installation requires stable app and configuration state.
128
134
135
+
### Antivirus reports the old tray shortcut
136
+
137
+
Older tray shortcuts combined hidden PowerShell with `ExecutionPolicy Bypass`, which can trigger behavior-based LNK detections. Do not whitelist the detection blindly. Update the source and rerun the installer so the shortcuts use `RemoteSigned`. If the updated shortcut is still detected, leave it quarantined and report the antivirus product, version, detection name, and shortcut properties without sharing secrets or private data.
138
+
129
139
### The port is occupied
130
140
131
141
When `-Port` is omitted, the launcher searches for a free port beginning at `9335`. If another process owns an explicitly requested port, choose a different port rather than stopping an unknown listener.
Copy file name to clipboardExpand all lines: windows/SKILL.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,6 +34,7 @@ Apply a reversible renderer skin through Chromium DevTools Protocol while launch
34
34
- Preserve `config.toml` as strict UTF-8. Never use encoding-dependent whole-file PowerShell reads/writes, silently transcode UTF-16, or overwrite a file that changed after it was read. Ambiguous TOML shapes must fail before writing rather than receive a best-effort rewrite.
35
35
- Keep install/start/restore/verify serialized with the per-user operation lock in `common-windows.ps1`.
36
36
- Treat `%LOCALAPPDATA%\CodexDreamSkin\engine` as an installer-managed runtime. Exit the Dream Skin tray before reinstalling so the installer can replace that runtime atomically and update every shortcut to the same copy.
37
+
- Keep installed shortcuts and tray child processes on `RemoteSigned`, never `Bypass`. Clear Internet-zone markers only from staged managed `.ps1` copies after their byte-content hashes match the selected source; never change the user's persistent execution policy or override Group Policy.
- Update resilience: resolve the current `OpenAI.Codex` Appx location dynamically for launch. A versioned path saved for cleanup must be revalidated against the registered package full/family identity before any process is stopped.
24
24
- Restart consent: an existing normal Codex window is never force-closed without explicit CLI authorization or shortcut confirmation.
25
+
- Shortcut policy: installed launch, restore, tray, and tray-child commands use `RemoteSigned` without `Bypass`; Internet-zone markers are removed only from hash-verified managed PowerShell copies.
25
26
- Config safety: Chinese project names, LF/CRLF choice, quoted target keys, table-header comments, and unrelated TOML sections survive install/selective restore; ambiguous target shapes fail unchanged, exact recovery keeps a copy of the replaced current file, and install refuses both registered and state-recorded old Codex processes.
26
27
- Theme safety: empty/over-16 MB images, over-16384px/50MP dimensions, path escapes, symlinks/junctions, malformed JSON, and unsupported formats are rejected before payload construction.
27
28
- Tray lifecycle: pause/resume reflects the clicked state, bundled Arina Hashimoto theme is present on first install, and complete restore terminates any separately launched tray before it can reapply the skin.
Copy file name to clipboardExpand all lines: windows/references/runtime-notes.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -13,4 +13,5 @@
13
13
- The managed theme root rejects junctions and symbolic links before initialization, import, save, switch, pause, or state writes. Windows uses the bundled Node image-metadata helper to enforce the same 16 MB, 16384px, and 50MP limits before an import is copied.
14
14
-`config.toml` is read from raw bytes as strict UTF-8, written without BOM through same-directory atomic replacement, and backed up byte-for-byte. Install requires Codex to be closed; writes stage the temporary file first, then abort if the destination bytes changed immediately before replacement. Quoted keys and table-header comments are supported; escaped target keys, multiline strings/arrays, dotted target keys, or duplicate target keys fail before writing. Completed restore backups are retained as `config.restored-*.toml` so reinstall captures a fresh baseline.
15
15
- A per-user named mutex prevents concurrent install, start, restore, and verify operations from racing state, ports, or config writes.
16
+
- The installer compares every staged runtime file with its selected source by SHA-256, then clears Internet-zone markers only from staged managed `.ps1` copies. Installed shortcuts and tray child processes use process-scoped `RemoteSigned`; Machine/User Policy remains authoritative and no persistent execution policy is changed.
16
17
- Store updates are supported because the launcher queries `Get-AppxPackage OpenAI.Codex` on every launch. State paths are eligible for automatic cleanup only after their Appx full name, family name, install root, and executable are matched against a currently registered package; an active unverified old path requires manual closure.
0 commit comments