Skip to content

Normalize paths before scoped agent read checks - #55

Merged
jay23606 merged 1 commit into
mainfrom
codex/profile-scoped-read-path-normalization
Oct 9, 2026
Merged

jay23606 merged 1 commit into
mainfrom
codex/profile-scoped-read-path-normalization

Conversation

@jay23606

@jay23606 jay23606 commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Summary

Scoped OpenCode V2 read rules were matched against the raw path supplied by the model. A path such as docs/../README.md could therefore match docs/** even though the workspace resolves it to a file outside that allowed directory.

Normalize relative file candidates before permission matching, and reject rooted paths or traversal that escapes the project-relative namespace. Add regressions for direct read decisions, aggregate read-path filtering, and valid paths that normalize back into the allowed directory. Update the D3 feature summary in DESIGN.md.

Validation

  • git diff --check passed.
  • Local .NET tests could not run: the project targets .NET 10, while this host only has SDK 9. CI is the validation gate.

@jay23606
jay23606 merged commit e1b966e into main Oct 9, 2026
12 checks passed
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.

1 participant