Skip to content

feat(userspace): App Runtime v1 — immutable core + sandboxed userspace#476

Draft
jaylfc wants to merge 21 commits into
masterfrom
feat/app-runtime-v1
Draft

feat(userspace): App Runtime v1 — immutable core + sandboxed userspace#476
jaylfc wants to merge 21 commits into
masterfrom
feat/app-runtime-v1

Conversation

@jaylfc
Copy link
Copy Markdown
Owner

@jaylfc jaylfc commented May 30, 2026

Draft / WIP — building the App Runtime foundation (#196) so users can install sandboxed, agent-built apps that can't break the core OS. Subagent-driven build, landing milestone by milestone.

Design

Immutable core (compiled SPA + controller, read-only) + a sandboxed userspace under data/apps/{id}/. Userspace apps are web (opaque-origin sandbox iframe) or container — never in-process native. All core access goes through a capability broker (single chokepoint) that enforces install-time-granted permissions and namespaces every call by app_id. Local design spec: docs/superpowers/specs/2026-05-30-app-runtime-immutable-userspace-design.md.

Milestones

  • M1 — foundation: UserspaceAppStore, .taosapp package parse/validate/extract (rejects native + path traversal), app.py wiring, /api/userspace-apps lifecycle + bundle routes, frontend registry merge. (9 backend + 3 frontend tests; app boots; 8 routes.)
  • M2 — sandbox core: per-app data store, capability broker + HTTP endpoint, sandboxed iframe window + parent bridge, taos-app-sdk, per-app bundle token (opaque-origin iframes don't reliably carry the session cookie, so bundle/serve auth uses a short-lived per-app token, mirroring the shortcut /redeem pattern).
  • M3 — permissions: install-time consent (sensitive default-off) + broker enforcement + update re-prompt.
  • M4 — container backend tier (opt-in, via the merged bug(store): SearXNG install fails with 'docker is not available' on incus controllers #461 incus/Docker path).

Closes #196 when complete. Gates #184 (App Builder), #103 (signed store sharing), and a future gitaos forge.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 30, 2026

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 2679e28b-4f75-4290-84d5-139167e6efc8

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/app-runtime-v1

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

jaylfc added 16 commits May 30, 2026 22:32
Security review of the App Runtime routes flagged two HIGH issues:

- SSRF: POST /install fetched an arbitrary source_url. Add is_safe_public_url()
  (reject non-http(s), and any host resolving to private/loopback/link-local/
  reserved/unspecified/multicast — e.g. 169.254.169.254 metadata, localhost,
  10/8, 192.168/16) and fetch with follow_redirects=False so a 3xx can't bounce
  to a blocked host.
- Stored XSS: bundles were served same-origin with a permissive CSP, so a direct
  navigation to a bundle file would execute on the core origin with the session
  cookie. Harden the bundle CSP with 'sandbox allow-scripts ...' (no
  allow-same-origin) which forces an opaque origin even on top-level navigation,
  plus default-src 'none' with explicit self/inline allowances. Apps still run
  their own scripts, but never on the core origin.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

taOS App Runtime — package format, installer, agent tool registry

1 participant