Skip to content

v2.2.1 hardening: packaging leak, quality gates, install automation - #43

Merged
gn00295120 merged 2 commits into
mainfrom
fix/v2.2.1-hardening
Jul 9, 2026
Merged

gn00295120 merged 2 commits into
mainfrom
fix/v2.2.1-hardening

Conversation

@gn00295120

Copy link
Copy Markdown
Member

Summary

A full correctness / security / automation pass over Claude World Studio, driven by a five-dimension audit (install, server, client, Electron, docs) and a five-dimension adversarial review round (with 3 skeptics per finding). Every confirmed finding was fixed and re-verified.

Baseline → now: typecheck ✅ · lint 0 errors ✅ · 299 tests pass (was 233) ✅ · build ✅ · format ✅ · fresh-clone boot + settings round-trip verified at runtime.

🔒 Security (action required)

  • Stopped bundling the developer's live data/studio.db into release artifacts. electron-builder shipped the dev DB — containing real Threads tokens and a Cloudflare key — inside every .dmg/.zip from v1.3.0–v2.0.0. Removed data/** + extraResources from the build config; the leaking GitHub releases (v1.3.0, v1.4.0, v1.6.0, v1.6.1, v1.7.0, v2.0.0) were deleted.
  • ⚠️ Rotate credentials: the two Threads long-lived tokens ("Claude World Taiwan", "Lucas Futures") and the Cloudflare browser API key were public — treat as compromised.
  • upload_image now reads through a single held fd, closing a symlink TOCTOU.

Correctness

  • Quality gate enforced consistently across REST /api/publish + /batch, the MCP tool, and the scheduler (was hardcoded 70 in some paths, configurable in others); score-70 backfill is now a true one-time migration.
  • Ambiguous publish outcomes (timeout/network drop after the POST) recorded as "unknown", never a false "failed" that would retry into a duplicate post.
  • agenticLevel persists; PUT /api/settings surfaces dropped values (skipped[]), stops leaking migration_* flags, and accepts the numeric round-trip.
  • Chat reconnect no longer duplicates/drops messages (SQLite naive-UTC timestamps normalized to UTC).
  • Scheduler retry overlap-guard race, timezone validation, subprocess-session mid-turn wedge + duplicate result, running-session idle eviction.

Desktop

  • In-app updater actually works now (sandbox-safe preload), single-instance lock, navigation/openExternal allow-list, startup-error dialog, and signal cleanup so Ctrl+C on electron:dev can't orphan the server.

Install & first-run automation

  • Fresh clone boots (data/ auto-created); studio doctor preflight; working studio setup-mcp; ensure-native-abi auto-heals the better-sqlite3 ABI break after electron:build; npm package ships the built UI + skills; engines/.nvmrc/LICENSE; trimmed .env.example; CI fresh-boot smoke step.

Not in this PR (needs your environment)

  • Rebuilding a clean signed desktop release requires the Developer ID Application (QJX3775S8M) cert + notarization credentials, which aren't on this machine. npm publish is unaffected (CI + NPM_TOKEN). The live v2.2.0 desktop release still bundles a DB (chat history only, no credentials) — supersede it with a clean v2.2.1 build or delete it once v2.2.1 desktop is out.

🤖 Generated with Claude Code

gn00295120 and others added 2 commits July 9, 2026 07:22
…tion

Comprehensive correctness/security/automation pass across server, client,
Electron, and packaging, verified by a 5-dimension adversarial review round.

Security
- Stop bundling the developer's live data/studio.db (with real tokens) into
  electron-builder artifacts; leaked GitHub releases were deleted.
- upload_image reads through a single held fd (open→fstat→read), closing the
  realpath-check-then-read TOCTOU.

Correctness
- Publish quality gate enforced consistently across REST + MCP + scheduler;
  score-70 backfill made a true one-time migration.
- Ambiguous publish outcomes recorded as "unknown" (not false "failed") on
  timeout/network drop after the publish POST, across all entry points.
- agenticLevel persists; PUT /api/settings reports dropped values via skipped[]
  and accepts the numeric round-trip; internal migration_* flags no longer leak.
- Chat reconnect merge normalizes SQLite naive-UTC timestamps to UTC (was
  duplicating/dropping messages by the local TZ offset).
- Scheduler retry overlap-guard race, timezone validation, subprocess-session
  mid-turn wedge + duplicate result, idle-eviction of running sessions.
- Client: WS errors surfaced, publish dialog no longer wiped mid-stream,
  confirmed/guarded deletes, indefinite reconnect backoff.

Desktop
- In-app updater wired (sandbox-safe preload), single-instance lock,
  navigation/openExternal allow-list, startup-error dialog, signal cleanup of
  the detached server so Ctrl+C can't orphan it.

Install & first-run automation
- Fresh-clone crash fixed (auto-create data dir); studio doctor preflight;
  working studio setup-mcp; ensure-native-abi auto-heals the better-sqlite3 ABI
  break after electron:build; npm package ships the UI + skills; engines/.nvmrc/
  LICENSE added; .env.example trimmed; CI fresh-boot smoke step.

Tests: 299 pass (added memory-service, agent-routes, strategy-agent, and
publish-ambiguity coverage). typecheck/lint/build/format all green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
… high)

Semver-safe lockfile bumps only (no package.json range changes). Clears the
CI Security audit gate (npm audit --audit-level=critical). Verified: typecheck,
299 tests, build, format green; API + WebSocket boot confirmed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@gn00295120
gn00295120 merged commit 0b2ca42 into main Jul 9, 2026
3 checks passed
@gn00295120
gn00295120 deleted the fix/v2.2.1-hardening branch July 9, 2026 02:08
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