Skip to content

qa(onboarding): gate 4 unauthenticated control-plane + inference-allocation endpoints#46

Merged
aimerdoux merged 1 commit into
mainfrom
qa/onboarding-auth-gates
Jun 3, 2026
Merged

qa(onboarding): gate 4 unauthenticated control-plane + inference-allocation endpoints#46
aimerdoux merged 1 commit into
mainfrom
qa/onboarding-auth-gates

Conversation

@aimerdoux

Copy link
Copy Markdown
Owner

Summary

QA-hardening of the WaveX-OS onboarding, exercising the live use case https://www.wavexcard.com end-to-end (static audit of 45 routes + live Playwright walk). The local control plane has no global auth hook — every route self-gates — and an audit found 12 ungated mutating endpoints out of 75. This PR closes the 4 highest-severity, lowest-regression-risk ones with the minimal assertBoard gate already used by activate.ts.

Fixes (4 endpoints, 2 files)

Endpoint File:line Severity Risk before
POST /api/system/pull-and-restart system-actions.ts:136 CRIT unauth git pull + pnpm install + restart on REPO_ROOT — RCE-adjacent
POST /api/system/restart-processes system-actions.ts:99 HIGH unauth launchctl kickstart — control-plane DoS
POST /api/system/discard-local-changes system-actions.ts:61 HIGH unauth git stash wipes working tree
PUT /api/inference-allocation inference-allocation.ts:67 SEC/CORE unauth swarm_pct=100 zeros Pool-A, strands the onboarding wizard

In WAVEX_AUTH_MODE=dev (default) the gate is a no-op via the synthetic local board actor, so Mission Control + the onboarding wizard keep working; production requires a real board actor.

Why only these 4

auth-events, activation-events, wizard-events are intentionally public browser beacons fired before a board actor exists — a hard gate would break new-user signup; their correct fix is session-binding + rate-limit (documented, deferred). credentials.ts is the connectors mission's active file and was left untouched per non-interference. Full reasoning in the deliverable.

Verification

  • tsc --noEmit on @wavex-os/wavex-os-serverexit 0
  • 18/19 test files green (132 tests). The 1 failing file (e2e-onboarding.test.ts) was proven pre-existing on clean main by stashing this change and re-running — finalize→500 from the missing inference backend in-sandbox, unrelated to this diff.

Changed files

  • packages/wavex-os-server/src/routes/system-actions.ts
  • packages/wavex-os-server/src/routes/inference-allocation.ts

Deliverable

.plateau-agency/deliverables/onboarding/report.md (55 findings, anchored), screenshots/ (11 live PNGs), qa-artifacts/step{1..5}/findings.md + live-walk{,2}.json. 6-item follow-up backlog in report §5.

🤖 Generated with Claude Code

…ation endpoints

The wavex-os-server has no global auth hook; every route self-gates. Four
mutating onboarding/control-plane endpoints had no assertBoard gate, making
them callable by any unauthenticated client that can reach the port:

- POST /api/system/pull-and-restart  (git pull --ff-only + pnpm install +
  restart on REPO_ROOT — remote code-pull / RCE-adjacent)
- POST /api/system/restart-processes (launchctl kickstart — control-plane DoS)
- POST /api/system/discard-local-changes (git stash wipes working tree)
- PUT  /api/inference-allocation (swarm_pct=100 zeros Pool-A, strands the
  onboarding wizard a new customer is in front of)

Adds the same assertBoard(authReq(req)) gate already used by activate.ts. In
WAVEX_AUTH_MODE=dev the gate is a no-op (synthetic local board actor), so
Mission Control and the onboarding wizard are unaffected; in production it
requires a board actor.

Verified: tsc --noEmit exit 0; 18/19 wavex-os-server test files green. The
e2e-onboarding failures are pre-existing on main (no inference backend in
sandbox) and unrelated to this change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aimerdoux aimerdoux merged commit f6b3635 into main Jun 3, 2026
1 check 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.

1 participant