Skip to content

Protect inline visualization viewers from sandbox writes - #38306

Merged
copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/12b7fbe522a68076e5d683a987b7801940d131c2
Aug 13, 2026
Merged

copyberry[bot] merged 1 commit into
mainfrom
copyberry/codex-internal-to-codex-oss/12b7fbe522a68076e5d683a987b7801940d131c2

Conversation

@copyberry

@copyberry copyberry Bot commented Aug 13, 2026 •

Copy link
Copy Markdown

Protect inline visualization viewers from sandbox writes

Why

Inline visualization viewer documents must remain outside locations that a
sandboxed session can modify before they are opened in a browser.

What changed

  • Materialize viewer documents in a dedicated cache under CODEX_HOME, keyed
    by the source and artifact thread IDs, instead of alongside visualization
    artifacts.
  • Create visualization links only when the active filesystem policy cannot
    write to the viewer cache. This also disables links for full-disk-write
    sessions and applies the policy consistently when loading transcript history.
  • Reject viewer cache paths containing symbolic links and track materialized
    documents in memory so unchanged viewers are reused without trusting existing
    file contents.

Testing

  • Verify that rendering an unchanged visualization reuses the existing viewer
    file, while an updated fragment refreshes it.

## Why

Inline visualization viewer documents must remain outside locations that a
sandboxed session can modify before they are opened in a browser.

## What changed

- Materialize viewer documents in a dedicated cache under `CODEX_HOME`, keyed
  by the source and artifact thread IDs, instead of alongside visualization
  artifacts.
- Create visualization links only when the active filesystem policy cannot
  write to the viewer cache. This also disables links for full-disk-write
  sessions and applies the policy consistently when loading transcript history.
- Reject viewer cache paths containing symbolic links and track materialized
  documents in memory so unchanged viewers are reused without trusting existing
  file contents.

## Testing

- Verify that rendering an unchanged visualization reuses the existing viewer
  file, while an updated fragment refreshes it.

GitOrigin-RevId: 12b7fbe522a68076e5d683a987b7801940d131c2
@copyberry
copyberry Bot force-pushed the copyberry/codex-internal-to-codex-oss/12b7fbe522a68076e5d683a987b7801940d131c2 branch from 89043d8 to 902bd9e Compare August 13, 2026 04:09
@copyberry
copyberry Bot merged commit 902bd9e into main Aug 13, 2026
28 of 32 checks passed
@copyberry
copyberry Bot deleted the copyberry/codex-internal-to-codex-oss/12b7fbe522a68076e5d683a987b7801940d131c2 branch August 13, 2026 04:10
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 13, 2026

This branch was previously deployed

1 inactive deployment
issue-triage — 902bd9e0 Deployed Aug 13, 2026 by lesttt111 via Translate non-English issue #7814
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.