Skip to content

apiBase is unvalidated free text and its trust boundary is undeclared #16

Description

@ssandys

apiBase is a free-text setting (manifest.json:31, Service.qml:96) passed straight to both scripts with no validation — no scheme check, no host check, no length bound.

This is load-bearing in someone else's threat model, not just ours. The marketplace security review of 92161f0 used it as the reason model names must be treated as untrusted:

Panel.qml:501 and Panel.qml:720 render modelData.name — model names as returned by the Ollama API, whose base URL is a user-editable setting (Service.qml:96, manifest.json:31), so it is not necessarily a local trusted endpoint.

That reasoning is correct, and the mitigation applied (textFormat: Text.PlainText, trap #45) addresses the rendering half only. The trust boundary itself is still undeclared.

Also worth knowing: even the default is not automatically trustworthy. While ollama.service is stopped, any local process can bind 127.0.0.1:11434 and answer. Response bodies are now byte-capped for that reason, but nothing authenticates the peer.

Proposal — pick one and write it down.

  1. Constrain to loopback by default, with an explicit opt-in for a remote host; or
  2. Accept remote hosts but validate the scheme and host shape, reject anything that is not http/https, and document plainly that pointing this at an untrusted server means trusting its strings.

Either is defensible. The current state — unvalidated, undocumented, and relied upon by an external reviewer's analysis — is the one that is not.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    hardeningRobustness, trust boundaries, and failure modes

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions