Skip to content

The LAN URL and QR code give access without a token #39

Open

Description

@sahilkathpal

gitbot start prints a network address and QR code so you can open GitBot from another device. GitBot has no authentication, so anyone on the network who can reach the port can open that URL and use the agents on the host machine. The README asks for a trusted network, but nothing enforces it.

What to do

  • Generate a random token at startup and include it in the printed network URL and the QR code (http://<ip>:<port>/?token=…).
  • Reject requests from non-loopback clients that don't carry the token, on every route the UI and docs/API.md use, including streaming ones. After the first valid visit, set a cookie so the token doesn't have to stay in the URL.
  • Keep loopback (127.0.0.1, ::1) tokenless so the desktop flow doesn't change.

Thanks to @mergisi for suggesting this on our Product Hunt launch. We're on it and will update this issue when it ships.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions