Commit Graph

53 Commits

Author SHA1 Message Date
Pavan Kumar Gondhi 6e026c2fe3 fix(gateway): reject unattributable loopback proxy traffic [AI] (#119950)
* fix(gateway): bind auth limits to ingress attribution

* fix(gateway): close remaining ingress auth gaps

* fix(gateway): carry attribution into new ingress paths

* fix(gateway): close ingress ownership gaps

* fix(gateway): complete proxy ingress hardening

* fix(gateway): stabilize managed Tailscale ingress

* fix(gateway): make Tailscale cleanup ownership-safe

Refuse reset-on-exit publication until Tailscale exposes an atomic owner-bound cleanup operation, and migrate legacy configs with Doctor.

* fix(gateway): finish ingress ownership repair

* fix(gateway): own managed Tailscale route lifetime

Run managed Serve and Funnel routes as foreground claims tied to the Gateway lifecycle. Retire named Service config through Doctor because Tailscale Services cannot run in foreground mode.

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>

* fix(gateway): align Tailscale consumers and build guards

Remove the retired named-service config from Telegram Mini App URL resolution and register the lifecycle worker as an explicit production entry.

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>

* fix(gateway): preserve retired Tailscale inputs

Keep Funnel enabled when removing an ignored named-Service setting and accept the legacy positive reset flag as a no-op now that managed routes always follow Gateway lifetime.

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>

* fix(gateway): preserve Tailscale route diagnostics

Prefer the actionable foreground CLI failure captured during timeout cleanup, and cover the original delayed-failure ordering.

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>

* fix(gateway): reconcile Tailscale ingress with main

Preserve current ingress ownership contracts after the rebase, retire the obsolete device-auth migration check, validate route-owner IPC, and move Tailscale auth coverage onto the managed listener.

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>

* fix(gateway): finish ingress rebase coverage

Unify the rebased net imports and let module-reset WebSocket tests prepare attribution through the same fresh module instance as the handler.

Co-authored-by: Pavan Kumar Gondhi <pavangondhi@gmail.com>

* test(gateway): align run-loop server fixture

---------

Co-authored-by: joshavant <830519+joshavant@users.noreply.github.com>
2026-08-16 21:01:20 -07:00
Vyctor H. Brzezowski e647794c20 feat(ui): open bare pair command without a chat turn (#120855)
Co-authored-by: Patrick Erichsen <patrick.a.erichsen@gmail.com>
2026-08-12 21:09:13 -07:00
Peter Steinberger c887279d0f test(device-pair): consolidate pairing coverage (#118079) 2026-08-02 11:09:53 -07:00
Peter Steinberger f81f9d8570 chore: enforce max-lines suppression ratchet (#107315)
* ci: enforce max-lines suppression ratchet

* chore: prune stale max-lines suppression

* fix: close max-lines ratchet enforcement gaps

* fix: harden max-lines ratchet checks

* fix(ci): satisfy max-lines ratchet checks

* style: format max-lines declarations

* fix(ci): match oxlint suppression grammar

* test: isolate max-lines git fixtures

* chore: prune resolved max-lines debt

* test: skip newline path fixture on Windows

* fix: harden max-lines suppression ratchet

* chore: refresh max-lines baseline

* fix: close max-lines ratchet bypasses

* fix: derive ratchet base from PR merge tree

* fix: support older Git in staged ratchet

* fix: align max-lines declarations and baseline

* chore: refresh max-lines baseline for current main

* fix: exclude generated wizard locales from max-lines

* chore: prune resolved max-lines debt
2026-07-14 09:27:02 -07:00
Peter Steinberger 938d41014f feat(mobile): default pairing to full node access (#105928)
* feat(mobile): default pairing to full node access

* chore: leave release notes to release workflow

* refactor(mobile): bound pairing helpers

* chore(i18n): refresh mobile access inventory

* chore(ci): lower mobile pairing LOC baseline

* fix(mobile): complete pairing validation artifacts

* ci: remove stale transcript target export baseline

* fix(ios): wrap access upgrade guidance

* fix(ios): preserve localized access key

* fix(ci): dedupe read-only SQLite guardrail

* fix(mobile): secure full-access node setup
2026-07-13 02:30:45 -07:00
Alix-007 a4ae95c1c6 fix(device-pair): resolve QR senders by own key (#101652)
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-09 22:31:07 +01:00
crh-code d4b38a2160 fix(device-pair): remove INADDR_ANY and IPv6 unspecified from isLoopbackHost (#98617)
* fix(device-pair): remove INADDR_ANY and IPv6 unspecified from isLoopbackHost

0.0.0.0 (INADDR_ANY — bind to all interfaces) and :: (IPv6 unspecified)
are NOT loopback addresses. The canonical implementation in
src/gateway/net.ts explicitly excludes both. Classifying them as
loopback in isLoopbackHost causes incorrect behavior in mobile
pairing cleartext host validation.

Co-Authored-By: Claude <noreply@anthropic.com>

* test(device-pair): reject unspecified setup URLs

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-07-06 23:25:35 +01:00
xingzhou e80e8a2b67 fix(device-pair): mobile pairing rejects local IPv6 cleartext URLs (#101008)
* fix(device-pair): allow local IPv6 pairing URLs

* test(device-pair): cover IPv6 cleartext lower bound
2026-07-06 22:35:09 +01:00
Peter Steinberger 862de9f1a1 fix(pairing): advertise reachable Tailnet routes (#100317)
* fix(pairing): advertise reachable tailnet routes

* fix(pairing): satisfy native and SDK checks

* fix(ios): cancel stale pairing route probes

* test(pairing): document LAN-only Serve fallback

* fix(ios): preserve pairing result initializer
2026-07-05 07:43:43 -07:00
Josh Avant ba5244c189 fix: advertise route-aware LAN Control UI links (#98482)
* Route LAN pairing URLs by default route

* Advertise route-aware LAN Control UI links

* Fix route-aware LAN test mocks

* Narrow advertised LAN SDK export
2026-07-01 04:02:12 -05:00
Josh Avant 052dc59526 fix: /pair qr fails to show QR code in chat surfaces (#97933)
* fix(pair): render qr per chat surface

* test(plugin-sdk): update reply helper surface budget

* fix(pair): keep qr metadata internal
2026-06-29 18:17:21 -05:00
Vincent Koc 1eaace70e3 refactor(extensions): remove unused helper exports 2026-06-19 00:33:04 +08:00
Peter Steinberger 4fa5092cdc docs: document small extension sources 2026-06-04 21:02:07 -04:00
Nimrod Gutman c791e4242b fix(gateway): gate talk secret bootstrap handoff (#85690)
Merged via squash.

Prepared head SHA: 9247cdab05
Co-authored-by: ngutman <1540134+ngutman@users.noreply.github.com>
Co-authored-by: ngutman <1540134+ngutman@users.noreply.github.com>
Reviewed-by: @ngutman
2026-05-25 11:34:12 +03:00
Peter Steinberger 4f4d108639 chore(lint): remove underscore-dangle allow list (#83542)
* chore(lint): reduce underscore-dangle exceptions

* chore(lint): reduce more underscore exceptions

* chore(lint): remove underscore-dangle allow list

* fix(lint): repair underscore cleanup regressions

* test(lint): track version define suppression
2026-05-18 14:56:06 +01:00
Peter Steinberger 29ac94b0e4 test: dedupe device pair qr mock read 2026-05-13 07:06:34 +01:00
Peter Steinberger a765668e63 test: guard extension one-hit mock calls 2026-05-12 10:00:29 +01:00
Shakker 27ec47d433 test: tighten device pair assertions 2026-05-11 09:18:03 +01:00
Shakker 20a2ac3e5d test: tighten extension cleanup assertions 2026-05-09 02:56:17 +01:00
Peter Steinberger b42bce0c8c test: require device pair media url 2026-05-08 18:01:30 +01:00
Peter Steinberger 1ef85c7d4c test: make suites safe without isolation (#78834)
* test: make suites safe without isolation

* fix: narrow auth profile credential types

* test: inject channel module loader factory locally
2026-05-07 08:43:29 +01:00
Val Alexander 36df0d93b9 fix: repair iOS LAN pairing
Fix iOS LAN/setup-code pairing policy for #47887.

- Allow explicit private LAN and .local plaintext ws:// setup/manual connects where policy allows it.
- Keep public hosts, .ts.net, and Tailscale CGNAT plaintext fail-closed.
- Prefer explicit passwords over stale bootstrap tokens in Swift and TypeScript gateway clients.
- Update setup-code/device-pair coverage, docs, and changelog with source credit for #65185.

Verification:
- pnpm install
- git diff --check origin/main..HEAD
- pnpm exec oxfmt --check --threads=1 src/gateway/client.ts src/gateway/client.test.ts src/pairing/setup-code.ts src/pairing/setup-code.test.ts extensions/device-pair/index.ts extensions/device-pair/index.test.ts
- pnpm format:docs:check
- pnpm test src/gateway/client.test.ts src/pairing/setup-code.test.ts extensions/device-pair/index.test.ts
- cd apps/shared/OpenClawKit && swift test --filter 'DeepLinksSecurityTests|GatewayNodeSessionTests'
- pnpm lint:swift passes with the existing TalkModeRuntime.swift type-body-length warning

Blocked locally:
- iOS app-target xcodebuild tests require unavailable watchOS 26.4 runtime here.
- Testbox check:changed previously failed because the image lacks swiftlint; local swiftlint passes.
2026-05-05 21:07:19 -05:00
Pavan Kumar Gondhi 37c0520a0b fix(device-pair): require pairing scope for pair command [AI] (#76377)
* fix: restrict device pairing command access

* addressing review-skill

* addressing review-skill

* addressing codex review

* address codex review feedback

* addressing codex review

* addressing codex review

* addressing codex review

* addressing codex review

* docs: add changelog entry for PR merge
2026-05-04 22:12:06 +05:30
Val Alexander b2efd19648 fix(ios): harden gateway pairing setup
Harden iOS gateway setup-code pairing by rejecting non-loopback plaintext ws:// setup URLs before bootstrap token issuance, consolidating iOS setup parsing, and adding QR scan support from Settings.

Verification:
- pnpm test extensions/device-pair/index.test.ts
- swift test --package-path apps/shared/OpenClawKit --filter DeepLinksSecurityTests
- XcodeBuildMCP OpenClawLogicTests/DeepLinkParserTests
- targeted SwiftLint for touched iOS/OpenClawKit files
- pnpm exec oxfmt --check --threads=1 extensions/device-pair/index.ts extensions/device-pair/index.test.ts
- git diff --check origin/main...HEAD
- GitHub PR checks green on 58e5e60a5c
2026-05-04 02:11:47 -05:00
Peter Steinberger 0f5648bf0d refactor: trim secret contract type imports 2026-05-01 20:34:18 +01:00
clawsweeper[bot] 7c51cd2baf fix(device-pair): reject invalid remote setup URLs
Fail setup-code generation when gateway.remote.url is configured but malformed, instead of falling back to a bind-derived URL and issuing a bootstrap token.
2026-04-29 20:45:33 +01:00
Simone dabf76b3de fix(device-pair): validate public setup urls (#74538)
* fix(device-pair): validate public setup urls

* test(cli): cover invalid qr override urls

---------

Co-authored-by: Lucenx9 <185146821+Lucenx9@users.noreply.github.com>
Co-authored-by: Peter Steinberger <steipete@gmail.com>
2026-04-29 19:47:35 +01:00
Peter Steinberger 90b6665ded refactor: move plugin api test helper to sdk 2026-04-28 00:24:54 +01:00
Vincent Koc 1daa552d5f refactor(qr): share PNG data URL helpers (#70784) 2026-04-23 15:41:45 -07:00
Val Alexander 43a941b51c fix(pair): render /pair qr as media (#70047)
* fix(pair): render pair qr as media

* fix(gateway): preserve media reply threading

* fix(gateway): harden webchat media replies

* fix(plugin-sdk): keep trustedLocalMedia internal

* docs(changelog): note pair qr media fix

* Update CHANGELOG with recent fixes and enhancements

Updated changelog to include recent fixes and enhancements.
2026-04-22 03:31:09 -05:00
Peter Steinberger 99a896797f test: share device pair approval fixtures 2026-04-20 18:20:43 +01:00
Ayaan Zaidi 5c1d6feb33 test(plugins): fix sync register call sites 2026-04-17 10:14:00 +05:30
Peter Steinberger dfe4c2d16d chore: enable no-floating-promises 2026-04-10 20:14:49 +01:00
Peter Steinberger 6c82a91d3d refactor: tighten device pairing approval types 2026-04-10 10:22:00 +01:00
Peter Steinberger af62a2c2e4 style: fix extension lint violations 2026-04-06 14:53:55 +01:00
Peter Steinberger 05da802e1c refactor: split device-pair command helpers 2026-04-04 19:55:04 +09:00
Peter Steinberger 20a7b1a9dc fix: finalize device-pair scope hardening (#55996) (thanks @coygeek) 2026-04-04 19:44:43 +09:00
Coy Geek 9dcef6df02 fix: scope pairing guard to internal gateway callers 2026-04-04 19:44:43 +09:00
Coy Geek 05ca581ed0 fix: fail closed when pairing scopes are missing 2026-04-04 19:44:43 +09:00
Coy Geek 353d93613c fix: enforce pairing approval scopes 2026-04-04 19:44:43 +09:00
Agustin Rivera cb0b15a195 fix(pair): guard setup fallback subcommands 2026-04-04 16:24:10 +09:00
Agustin Rivera 83e5fe5e8b fix(pair): enforce pairing scope for setup commands 2026-04-04 16:24:10 +09:00
Peter Steinberger 63cbc097b5 refactor(channels): route core through registered plugin capabilities 2026-03-30 01:03:42 +01:00
Peter Steinberger 8e0ab35b0e refactor(plugins): decouple bundled plugin runtime loading 2026-03-29 09:10:38 +01:00
Tak Hoffman 85cf23a9d6 fix(regression): allow external device pair approvals 2026-03-27 16:07:54 -05:00
Jacob Tomlinson 4ee4960de2 Pairing: forward caller scopes during approval (#55950)
* Pairing: require caller scopes on approvals

* Gateway: reject forbidden silent pairing results
2026-03-27 18:55:33 +00:00
Peter Steinberger 410c2dba65 test: collapse provider plugin suites 2026-03-25 04:25:02 +00:00
Peter Steinberger 3a1b517581 fix: repair CI regression checks 2026-03-25 00:20:24 +00:00
Peter Steinberger 04c69ea3a0 refactor: reuse canonical setup bootstrap profile 2026-03-23 00:15:55 -07:00
Peter Steinberger a600c72ed7 fix: bind bootstrap setup codes to node profile 2026-03-22 23:57:15 -07:00