Skip to content

fix(entropy)!: own selected Windows path spelling at admission - #9393

Merged
morluto merged 4 commits into
morluto:mainfrom
HusnainMaroof:fix/9373-windows-path-case
Nov 9, 2026
Merged

morluto merged 4 commits into
morluto:mainfrom
HusnainMaroof:fix/9373-windows-path-case

Conversation

@HusnainMaroof

@HusnainMaroof HusnainMaroof commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

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

  • I reviewed the final diff and relevant existing code, understand the change and its edge cases, and take responsibility for the complete PR, including AI-assisted work.
  • I checked the evidence above, confirmed it supports the current change, and recorded meaningful validation gaps.
  • I declare this PR ready for initial maintainer review.

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]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-09T12:18:43.207704Z 8facdfe New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@greptile-apps

greptile-apps Bot commented Nov 8, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 3/5

[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

  1. P1 Security Glue files can contact shares ▶
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.

Summary

This PR gives existing Windows paths their filesystem spelling when the lookup changes only letter case.

  • Existing Windows files now resolve with their filesystem letter case.

Reviews (2) · Last reviewed commit: "fix(evidence)!: keep one Evidence identi..." · Reviewed by Greptile

Comment thread src/filesystem/callerPath.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment thread src/filesystem/callerPath.ts Resolved
@morluto morluto changed the title fix(evidence)!: keep one Evidence identity across Windows path case fix(entropy)!: own selected Windows path spelling at admission Nov 9, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

@morluto

morluto commented Nov 9, 2026

Copy link
Copy Markdown
Owner

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.

@morluto
morluto merged commit ab1b9e3 into morluto:main Nov 9, 2026
1 of 2 checks passed
@morluto morluto added the bug Something isn't working label Nov 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants