Public: anyone can read this; the crew can change it.

`forge login` refuses a plain http:// workbench that is not loopback, so a token never crosses the network in clear #7377

shipped production is serving it opened this has it
opened this

Intent: secure by default with nothing to toggle: the CLI never sends a token over plain http to another machine.

Done:

  • [ ] normalizeUrl in src/cli/config.ts (or a small check beside it) refuses an http:// address whose host is not localhost, 127.0.0.1 or [::1]; forge login prints one line (plain http sends your token in clear; use https, or --insecure for a host you trust) and exits 2 without storing anything.
  • [ ] --insecure on forge login allows it and is remembered with the workbench, so later commands work; FORGE_URL set to such an address without a stored insecure is refused the same way before any request.
  • [ ] Bare hosts still become https, loopback still http, as today.
  • [ ] A test (e.g. test/cli-plain-http.test.ts) proves: a remote http address is refused and nothing is written; loopback http and https pass; --insecure passes and is kept.

Files: src/cli/config.ts, src/cli/main.ts (the login flag and its usage line), a new test.

Risk: someone logged in today to a remote http workbench must get the refusal's words on their next command, not a silent failure.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs