Skip to content

plugin-dsh: the web probe checks only GET / — it cannot see the Host/Origin fence that 403s /api/* #11

Closed

Description

@aitrawog

Problem

The dsh: web-running verb and charly dsh status web probe (the shared
dshWebTokenProbe fragment in candy/plugin-dsh/webprobe.go) authenticate with the
launch token and then curl the root GET /?token=… only. dsh web actually
authenticates at two layers:

  1. the per-process launch token (root GET / → 303 + cookie; tokenless → 401), and
  2. the Host/Origin browser-trust fence (dsh-client-connection's
    api-request-trust), which every /api/* call passes before authentication —
    a forged / non-loopback Host returns 403.

A GET /-only probe therefore cannot see the fence at all, and the shipped docs
repeat the now-known-false single-layer claim ("dsh-web-app >= 0.1.5-rc.x authenticates
every request") in candy/plugin-dsh/{webprobe.go,verb.go,control.go,charly.yml} and
the dsh-cli skill.

Evidence (live)

$ curl -s -o /dev/null -w '%{http_code}\n' -H 'Host: evil.invalid' http://127.0.0.1:3080/api/models   # 403
$ curl -s -o /dev/null -w '%{http_code}\n' -H 'Host: evil.invalid' http://127.0.0.1:3080/           # 401
$ dsh web --help | grep trusted-host
  --trusted-host <authority...>  extra authority the /api browser-trust fence accepts (host or host:port; repeatable)

Intended scope

  • candy/plugin-dsh/webprobe.go: after the token exchange, make one /api/* call
    with the cookie and fail on a 403, so the probe proves the API surface answers,
    not merely /. Document the two layers and the --trusted-host host-side requirement.
  • webprobe_test.go: lock in the /api/* assertion.
  • charly.yml candy + dsh-cli skill: retire the single-layer claim.

Coordination

Filed and claimed by session dsh-tui-install. Related: opencharly/pod-dsh#12 (the
candy half, merged in #13).

Activity

  1. aitrawog commented on Oct 6, 2026

    @aitrawog
    ContributorAuthor

    CLAIM

    Claiming for session dsh-tui-install. Scope: the shared dshWebTokenProbe fragment gains an /api/* assertion after the token exchange (so it proves the API surface answers, not merely /), the webprobe_test.go locks it in, and the single-layer claim is retired from the candy + dsh-cli skill. Branch feat/dsh-web-fence off origin/main (46a45b8).

    Agent: dsh-tui-install · session ses_eefd1f32fffeNl8ajvmzJ0hGLk
    Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

  2. self-assigned this
    on Oct 6, 2026
  3. added a commit that references this issue on Oct 6, 2026
    0baf7ba
  4. aitrawog commented on Oct 6, 2026

    @aitrawog
    ContributorAuthor

    RESOLVED

    Resolved by #12 (merged; validator PASS at head 7416d32). The dsh: web-running / charly dsh status probe now exchanges the launch token on / (propagating its failure) and then exercises an /api/* call, rejecting 403 (the Host/Origin fence), 000 (no response) and 5xx. The false single-layer claim is retired from the dsh-cli skill and the candy-entity wording aligned.

    Agent: dsh-tui-install · session ses_eefd1f32fffeNl8ajvmzJ0hGLk
    Assisted-by: OpenCode ollama-cloud/deepseek-v4.1-flash (fully tested and validated)

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

Metadata

Metadata

Assignees

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