Skip to content

security: proven holders, per-site origins, sandboxed renders, signed installer extras (v0.3.65) - #362

Merged
ralyodio merged 2 commits into
masterfrom
fix/security-hardening-0.3.65
Nov 13, 2026
Merged

ralyodio merged 2 commits into
masterfrom
fix/security-hardening-0.3.65

Conversation

@ralyodio

Copy link
Copy Markdown
Collaborator

Second hardening pass: the items left open after #361. Bumps to v0.3.65.

What changes

Hosting

  • A holder fills a replica slot only after passing a storage challenge (or a trusted receipt). Announcements alone no longer stop a new site from being copied.
  • Giving up a copy needs three other holders with standing: three passes over six hours.
  • A challenge is void when the challenged chunk was read from this node in the meantime, which catches a relay through the challenger.
  • The publisher waits for copies it has challenged itself.

Gateway

  • Pages under /s/<site>/ are sandboxed into an opaque origin by default ([gateway] sandbox_shared_sites, default true).
  • [gateway] site_host_suffix serves each site on <site_id>.<suffix>, where no other gateway route is reachable. Needs wildcard DNS and TLS; see docs/hosting.md.
  • Storage API: ranged reads stream block by block; delete keeps shards another object still names; shard indexes are bound-checked.

Workloads

  • Blender: a constant script empties outside paths, removes linked data and File Output nodes, strips host stamps. On Linux the render runs inside bubblewrap when it works ([render] sandbox = "auto" | "off" | "require").
  • Apps: guarded egress network on root workers, a per-app disk ceiling with a watchdog ([apps] egress_guard, require_egress_guard, max_disk_mb).
  • Text jobs: base-model allowlist ([text] base_models), validated job and hyperparameters, adapter cache filed under every file, free-space floor.

Installer and release

  • bun is a pinned, checksummed download; mise is no longer installed.
  • Plugin installers and the TUI ship as signed release archives (c0mpute-plugins.tar.gz, c0mpute-tui.tar.gz), verified by install.sh and by the CLI. Desktop artifacts are signed by a new desktop-sign job.
  • latest refuses to downgrade an installed binary. No sudo symlink into a user-writable directory.
  • c0mpute plugin install <url> needs --unverified.

Behaviour to know about

  • Hosted pages under the shared /s/ path lose localStorage, cookies and service workers. Sites that need them use a custom domain or a per-site host.
  • Surplus copies linger at least six hours before being trimmed.
  • Render: scenes must pack their external files; linked libraries, OSL and File Output nodes no longer take effect.
  • Text workers bid only on HuggingFaceTB/SmolLM2-135M-Instruct and Qwen/Qwen2.5-0.5B-Instruct unless the operator extends [text] base_models.
  • On root workers, app containers lose access to private and host addresses unless [apps] egress_guard = false.

Not closed

  • A peer that relays challenged chunks from another honest holder, under a second identity, can still pass. It can wear a site down toward one honest copy, not to zero. Closing it needs holder-unique sealed replicas or staked holders.
  • relay::refuses (a holder refusing fetches from a peer that claims the site whole) is built and tested but not wired into chunk serving.

Tests

  • cargo check --workspace --tests: clean.
  • Unit tests added across hosting, gateway, store, placement, render, apps, text and the CLI.
  • apps/web: tsc --noEmit clean; bun test 178 pass, 1 fail (music.test.ts, same on master). apps/tui: 61 pass.
  • Installer: verified real v0.3.64 assets with the production key; corrupted, swapped and missing signatures fail closed.
  • Not run before this PR: the release workflow changes (they can only run on a tag), a Windows or macOS build, the bubblewrap probe against a real GPU.

🤖 Generated with Claude Code

… installer extras (v0.3.65)

Hosting:
- a holder fills a replica slot only after passing a storage challenge (or a
  trusted receipt); announcements alone no longer stop a site being copied
- giving up a copy needs three others with standing: three passes over six
  hours, so throwaway identities cannot trim honest holders quickly
- a challenge is void when the challenged chunk was read from this node
  meanwhile, which catches a relay through the challenger; the last honest
  holder cannot be talked into dropping
- the publisher waits for copies it has challenged itself

Gateway:
- hosted pages under /s/ are sandboxed into an opaque origin by default, and
  [gateway] site_host_suffix serves each site on its own host, where no
  other gateway route is reachable
- storage API streams ranged reads block by block; delete keeps shards
  another object still names; shard indexes are bound-checked

Workloads:
- Blender: a constant script empties outside paths, removes linked data and
  File Output nodes and strips host stamps; on Linux the render runs inside
  bubblewrap when it works ([render] sandbox = auto | off | require)
- apps: guarded egress network on root workers, a disk ceiling with a
  watchdog, state kept when an app is stopped for size
- text jobs: base-model allowlist, validated job and hyperparameters, adapter
  cache filed under every file, free-space floor

Installer and release:
- bun is a pinned, checksummed download; mise is no longer installed
- plugin installers and the TUI ship as signed release archives, verified by
  install.sh and by the CLI; desktop artifacts are signed
- latest refuses to downgrade an installed binary; no sudo symlink into a
  user-writable directory
- plugin install <url> needs --unverified

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Comment thread scripts/install.sh Dismissed
@github-actions

Copy link
Copy Markdown

ThreatCrush Security Scan

14 finding(s)

HIGH/CRITICAL: 2 | MEDIUM: 8 | LOW: 4

Severity Rule Location
HIGH js-ssrf-outbound-request apps/web/public/sw.js:24
HIGH sh-remote-script-execution scripts/install.sh:606
MEDIUM js-unescaped-html-sink apps/web/src/app/blog/[slug]/page.tsx:53
MEDIUM js-unescaped-html-sink apps/web/src/app/layout.tsx:109
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:116
MEDIUM sql-template-interpolation apps/web/src/lib/chat/convo-store.ts:117
MEDIUM sql-template-interpolation apps/web/src/lib/chat/push.ts:476
MEDIUM js-dynamic-code-execution apps/web/src/lib/router/verify.ts:91
MEDIUM sh-remote-script-execution scripts/dev-setup.sh:25
MEDIUM sh-eval-expansion scripts/dev-setup.sh:35
LOW py-ssrf-outbound-request examples/business-strategist-agent/chat.py:37
LOW py-ssrf-outbound-request examples/business-strategist-agent/train.py:54
LOW secret-generic-credential node/crates/c0mpute-core/src/webhook.rs:1171
LOW py-path-traversal node/crates/c0mpute-core/tests/fixtures/fake-infernet-text:29

Snippets are redacted; ThreatCrush never prints matched credential material.

With it on, hosting_market_e2e over-replicates: challenges are voided while a
small site is still being copied, so every host takes a copy. Default keeps
the 0.3.64 fill rule; drops still need live proofs from three others.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
@ralyodio
ralyodio merged commit 97c7285 into master Nov 13, 2026
17 checks passed
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.

2 participants