Skip to content

V2: Warn when httpChannel has no verify; fix channel auth docs - #673

Merged
LinuxDevil merged 2 commits into
mainfrom
v2-httpchannel-verify-warn
Oct 19, 2026
Merged

LinuxDevil merged 2 commits into
mainfrom
v2-httpchannel-verify-warn

Conversation

@LinuxDevil

Copy link
Copy Markdown
Owner

Fixes audit finding SEC-1 (Vercel competitor audit, 2026-10-19).

What was wrong

httpChannel() with no verify is unauthenticated and keys sessions by the caller-chosen sessionKey, so anyone reaching the port can read or continue another user's conversation. The docs quick start omitted verify and listened on all interfaces; deployment.md claimed every route except /health needs the token.

What changed

  • httpChannel() logs one [lousho] warning per instance, at creation, when no verify is given (no throw).
  • docs/channels.md: quick start uses verify, binds to 127.0.0.1, new "Securing the http channel" section.
  • docs/deployment.md: the token gates /chat and channels without their own verify; /health and self-authenticating channels are not gated (matches V1).

Tests

New src/channels/httpChannel.test.ts: warns exactly once without verify, never with it. npx tsc --noEmit, typecheck:tests, lint pass; vitest run src/channels docs 322 pass. Full suite has 30 failing files from missing peer deps / tsup in this worktree's node_modules (providers, create-lousho-agent, kit tests) plus the known changelogGuard one, none touching channels. fallow could not run: coverage file not produced because of those failures. verify-docs-snippets.ts could not build (tsup missing); the edited snippet is no-run.

Behavior change: a one-time warning is logged for httpChannel() without verify.

Changelog: httpChannel() warns once when created without verify; channel auth docs corrected.

🤖 Generated with Claude Code

LinuxDevil and others added 2 commits October 19, 2026 23:28
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@LinuxDevil
LinuxDevil force-pushed the v2-httpchannel-verify-warn branch from 004b824 to 5f36617 Compare October 19, 2026 20:28
@LinuxDevil
LinuxDevil merged commit 7a71dee into main Oct 19, 2026
2 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.

1 participant