Skip to content

feat(tsx): allow sandbox hosts to disable storage - #2322

Open
J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2299
Open

J4ck1e2000 wants to merge 1 commit into
nsgo-dev:mainfrom
J4ck1e2000:fix/issue-2299

Conversation

@J4ck1e2000

Copy link
Copy Markdown
Contributor

Summary

Fixes #2299.

  • Sandbox.DisableStorage makes every NSGo Storage method throw a consistent error without accessing or modifying the partition. Default access and the meaning of Limits.Storage == 0 are unchanged.
  • A shared-page sandbox with storage disabled refuses startup unless WebUnisolated is explicit. The opt-in does not restore disabled NSGo Storage or isolate the browser page.

Targets

  • Shared code (tsx)
  • Web

Screenshots

None.

Verification

  • go tool nsgo check -target macos_arm64,web -jobs 2 ./tsx
  • go tool nsgo test -run '^(TestSandboxDisableStorage|TestIsolation|TestSandboxHoldsAPackageToItsCapabilities)$' ./tsx — 3 passed.
  • go tool nsgo test -target web -timeout 2m -run '^TestSandboxDisableStorage$' ./tsx — 1 passed.
  • go tool nsgo test -run '^TestSkills$' ./internal/moduletest

Checklist

  • Conventional Commit title.
  • Updated the TSX docs and skill and added a changelog fragment.
  • No new third-party code, assets or dependencies.

🤖 openai-codex/gpt-6.2-sol

Deny all NSGo Storage methods with an opt-in sandbox policy.
Keep existing data and quota behavior, and enforce the shared-page isolation policy.

Fixes nsgo-dev#2299
@github-actions github-actions Bot added size/M enhancement New feature or request documentation Improvements or additions to documentation tsx labels Nov 24, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request size/M tsx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

tsx: no way to withhold Storage from a sandbox; Limits.Storage 0 means unlimited

1 participant