Skip to content

fix(bridge): add Host/Origin guard + bearer token to HTTP bridge#20

Merged
macieju-opera merged 1 commit into
mainfrom
fix/bridge-auth-hardening
Jun 26, 2026
Merged

fix(bridge): add Host/Origin guard + bearer token to HTTP bridge#20
macieju-opera merged 1 commit into
mainfrom
fix/bridge-auth-hardening

Conversation

@macieju-opera

Copy link
Copy Markdown
Contributor
  • Reject non-loopback Host on every route (kills DNS rebinding)
  • Reject non-loopback Origin (kills browser CSRF; CLI sends none)
  • Require a per-instance bearer token on /call, /tools, /last-snapshot;
    /health stays token-free for port detection
  • Generate the token in runBridge, persist it 0600 in the PID file, and
    read it back in the client to attach Authorization on protected calls

@macieju-opera macieju-opera force-pushed the fix/bridge-auth-hardening branch 2 times, most recently from a1ec20b to 9065687 Compare June 26, 2026 13:28
- Reject non-loopback Host on every route (kills DNS rebinding)
- Reject non-loopback Origin (kills browser CSRF; CLI sends none)
- Require a per-instance bearer token on /call, /tools, /last-snapshot;
  /health stays token-free for port detection
- Generate the token in runBridge, persist it 0600 in the PID file, and
  read it back in the client to attach Authorization on protected calls
@macieju-opera macieju-opera force-pushed the fix/bridge-auth-hardening branch from 9065687 to a864cac Compare June 26, 2026 13:34
@macieju-opera macieju-opera merged commit 109c042 into main Jun 26, 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.

2 participants