Repository navigation
fix(entropy)!: own selected Windows path spelling at admission - #9393
Conversation
On Windows, an existing caller path now takes its filesystem spelling when that spelling differs from the resolved path by letter case alone. One file spelled `C:\Temp\x.bin`, `c:\temp\x.bin` or `C:\TEMP\X.BIN` produces one `parameters.path`, `normalized_result` path and `evidence_id`, matching the existing separator and `.` folding. `caller_input_path` keeps the input. Links, junctions, `subst` drives, 8.3 short names and paths that do not exist yet keep the caller spelling, so no link is followed and requested output names keep their case. BREAKING CHANGE: Windows Evidence produced from a path spelled in a case other than its filesystem spelling now gets a different `evidence_id`. Fixes morluto#9373 Co-Authored-By: Claude Opus 5.5 <[email protected]>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
[Medium impact] The change reaches Windows path consumers across CLI and application workflows. The PR should not merge while analyzed JavaScript can trigger a Windows share lookup during static inspection. Findings
Fix with agent prompt### Issue 1
src/filesystem/callerPath.ts:46-50
On Windows, adding `realpathSync.native` here makes static WASM inspection access paths found inside analyzed JavaScript. A glue string containing `\\attacker\share\payload.wasm` passes the `local` check in `associateWasmGlue`, which calls `absoluteCallerPath` before checking selected candidates. Windows now attempts a network filesystem lookup even when the caller selected only local files. The later comparison and catch cannot undo that access.
Keep path comparison free of filesystem reads, and obtain filesystem spelling only for caller-selected inputs.
**How this was verified:** Glue string values reach the Windows native filesystem lookup before any selected-candidate match.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.SummaryThis PR gives existing Windows paths their filesystem spelling when the lookup changes only letter case.
Reviews (2) · Last reviewed commit: "fix(evidence)!: keep one Evidence identi..." · Reviewed by Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 28ba542b7a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a6b778c0df
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
The producing-owner fixes are now published. General caller-path normalization is lexical again, so analyzed glue and binary auto-discovery cannot initiate realpath/share lookups or replace selected reparse components. Entropy spelling lookup runs only after selected-file admission, remains optional on lookup failure, and preserves cancellation plus descriptor identity checks. The real Windows identity test is in both the curated workflow and the CI path-selection owner. Validation: 23 service tests passed (one platform skip), both CI-selection controls passed and failed on the earlier scope, and the lookup-failure control failed on the earlier service. check:fast passed. Real Windows/SMB qualification remains unverified locally. This resolves the four reported roots without a global identity migration. |
Refs #9373. Preserve caller spelling while making selected Windows entropy identity consistent across CLI and MCP. General caller-path normalization stays lexical, so source-derived paths do not trigger filesystem or share lookups. The entropy owner verifies a regular file before adopting case-only filesystem spelling; a failed optional spelling lookup leaves the admitted path usable. Descriptor identity checks remain authoritative.
The Windows identity acceptance test is now in both the curated lane and its CI selection scope. No human readiness declaration is changed, and this does not close the separate registration-alias issue #8844.
Validation: 23 entropy service tests passed with one Linux-only skip; both new CI lane-selection cases passed and failed against the previous scope owner. The optional-lookup regression failed against the previous service. check:fast, formatting and diff checks passed. Earlier public path/CLI/MCP validation remains recorded in commit history. Real Windows casing/SMB behavior was not executed locally; the Windows acceptance workflow is scheduled, not claimed passing. Breaking creation behavior remains limited to new entropy Evidence; retained Evidence is not rewritten.
Author readiness
Human owner: @HusnainMaroof