Skip to content

feat: audience-scoped asset and filesystem guard (dseg slice 8) - #208

Merged
adamfgr merged 9 commits into
mainfrom
wizzo/dseg-s8-asset-guard
Jul 28, 2026
Merged

feat: audience-scoped asset and filesystem guard (dseg slice 8)#208
adamfgr merged 9 commits into
mainfrom
wizzo/dseg-s8-asset-guard

Conversation

@wizzoapp

@wizzoapp wizzoapp Bot commented Jul 18, 2026

Copy link
Copy Markdown

Summary:

  • Bind signed private asset URLs to the issuing auth session and require an explicit same-origin relay or native proof on every fetch; invalid or cross-surface requests remain masking 404s.
  • Negotiate same-origin-relay-v1 on asset URL requests. New servers return a typed AssetClientUpgradeRequiredError to old clients instead of issuing an unbound private URL, while new clients still decode old-server results with no surface credential.
  • Add project filesystem audience classification with longest-match hidden-root handling, and guard project file, browse, review, and repository-root VCS paths against project ownership.
  • Harden workspace writes against symlink parent/leaf escapes, with Linux descriptor-anchored writes and non-Linux private-compatible fallback.

Test evidence:

  • vp check (0 errors; one unrelated pre-existing sidebar warning)
  • vp run typecheck (15/15 packages)
  • vp test run (6,129 passed, 7 skipped; 682 passed files, 2 skipped files)
  • vp run lint:mobile (passed; optional host Swift/Kotlin linters unavailable)
  • Factory pre-commit gate: static checks and Codex autoreview clean

Design doc: /home/adam/.openclaw/reports/data-segregation-design-2026-07-17.md (§4, §6 slice 8).

Sequencing note: this slice deliberately guards the filesystem/asset/VCS read handlers WITHOUT changing external reachability. The factory audience-ceiling allowlist still excludes these methods, and a regression test asserts they remain unreachable by factory orchestration:read sessions. Making them reachable (with audience-scoped positive/negative tests and per-method disclosure) is the dedicated slice 9 follow-up, per the approved design ruling of 2026-07-18 (guarding handlers and changing reachability are different risk classes and are not bundled in one diff).

Deliberately deferred

The Electron persist:t3code-preview-* partition bind bridge is deliberately deferred to a follow-up slice. Today the app renderer's relay cookie is not present in that preview partition's separate cookie jar, so a private desktop preview load fails closed with a masking 404 and never receives an unbound private asset URL.

The characterization test characterizes desktop preview partition loads without a relay cookie as masked 404 pins that fail-closed behavior. This PR does not add a desktop IPC bind operation.

@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 19, 2026 00:12

@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: 57967c9b7c

ℹ️ 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 apps/server/src/http.ts Outdated
Comment thread apps/server/src/ws.ts
Comment thread apps/server/src/ws.ts Outdated
@wizzoapp
wizzoapp Bot marked this pull request as draft July 19, 2026 01:34
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 19, 2026 02:53

@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: 180d36dadc

ℹ️ 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 apps/server/src/assets/AssetAccess.ts Outdated
Comment thread apps/server/src/project/ProjectFilesystemAudienceGuard.ts Outdated
Comment thread apps/server/src/ws.ts Outdated
Comment thread apps/server/src/assets/AssetAccess.ts Outdated
@wizzoapp
wizzoapp Bot marked this pull request as draft July 19, 2026 04:19
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 19, 2026 07:19

@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: 59f54c34ab

ℹ️ 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 apps/server/src/assets/AssetAccess.ts Outdated
Comment thread apps/server/src/ws.ts Outdated
@wizzoapp
wizzoapp Bot marked this pull request as draft July 19, 2026 08:39
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 19, 2026 14:05

@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: e18f301a5f

ℹ️ 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 apps/web/src/assets/assetUrls.ts
Comment thread apps/web/src/browser/openFileInPreview.ts
@wizzoapp
wizzoapp Bot marked this pull request as draft July 19, 2026 15:24
@wizzoapp
wizzoapp Bot marked this pull request as ready for review July 28, 2026 17:59

@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: 652644a06e

ℹ️ 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 apps/server/src/assets/AssetAccess.ts

@adamfgr adamfgr 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.

Auto-approved by wizzo-approve: all policy conditions verified against HEAD 30884d3.

@adamfgr
adamfgr enabled auto-merge (squash) July 28, 2026 21:58
@adamfgr
adamfgr merged commit e364518 into main Jul 28, 2026
10 checks passed
@adamfgr
adamfgr deleted the wizzo/dseg-s8-asset-guard branch July 28, 2026 21:59
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