Skip to content

fix(ui): confine presentation files to the ui directory - #758

Merged
jimhoyd merged 1 commit into
mainfrom
codex/ui-presentation-boundary-rebased
Sep 25, 2026
Merged

jimhoyd merged 1 commit into
mainfrom
codex/ui-presentation-boundary-rebased

Conversation

@jimhoyd

@jimhoyd jimhoyd commented Sep 25, 2026

Copy link
Copy Markdown
Collaborator

Problem and change

UI presentation configuration could select files outside its intended content directory and expose their bytes as public stylesheet assets. Confine configured copy, template and stylesheet paths to the site's dedicated ui/ directory, rejecting symlink escapes and a symlinked presentation root before reading content. Individual catalogue files receive the same containment check.

Generated ui/copy, ui/templates and ui/extra.css paths remain valid. The composition guide and UI contract document the boundary and migration for custom paths.

Verification

  • Regression tests fail on the original loader and pass with the fix.
  • 17 focused UI extension and scaffold tests passed after rebasing onto current main.
  • npm run verify passed, including all workspace and add-on checks.
  • npm run test:package passed, including packed installation and starter/cookbook checks.
  • Regenerated documentation is current; git diff --check passed.

Compatibility and security

Custom presentation paths outside ui/ must move under it. Only publishable presentation content belongs in that directory. Internal symlinks remain supported when their resolved targets stay within it; the directory itself cannot be a symlink. Trusted hooks and sandbox execution are unchanged. This fixes configuration-driven file selection; it is not a claim of hostile multi-tenant or concurrent local filesystem mutation protection.

  • Changes match the documented portable contract; docs/examples are updated where needed.
  • Relevant tests and package checks pass, or limitations are explained above.
  • No credentials, customer data or private project material are included.
  • Runtime/starter changes remain aligned where applicable.

@jimhoyd
jimhoyd merged commit 0c87c77 into main Sep 25, 2026
27 checks passed
@jimhoyd
jimhoyd deleted the codex/ui-presentation-boundary-rebased branch September 25, 2026 17:32
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