Skip to content

Desktop: allow trusted custom URL protocols (e.g. obsidian://) for chat links #56263

Closed

Description

@CFF

Problem

Since the security fix for #30613, the desktop app silently blocks any URL whose protocol is not http:, https: or mailto:. resolveExternalURL in packages/desktop/src/main/files/external-url.ts returns undefined for everything else, and openExternalURL only logs "blocked external target". Clicking the link in chat does nothing, with zero feedback.

This makes app-scheme links unusable in the desktop chat. My case: my AI assistant shares links to my Obsidian vault (obsidian://open?vault=Atlas&file=...). They work from a browser or terminal, but are dead in the desktop app.

Feature request

Let users opt in to additional trusted protocols, e.g. in opencode.json:

{
  "desktop": {
    "externalProtocols": ["obsidian://"]
  }
}

Default stays deny-by-default (no regression on #30613); only user-listed schemes are allowed. Dangerous schemes (file:, javascript:, smb:) could stay hard-blocked regardless of config.

Bonus: surface a toast when a click is blocked, so "nothing happens" isn't the only symptom.

Activity

  1. opencode-agent commented on Oct 16, 2026

    @opencode-agent
    Contributor

    Thanks for the clear write-up, @CFF! You're asking for a way to opt in to extra trusted URL schemes (like obsidian://) so those links open from the desktop chat. Deny-by-default would stay in place, dangerous schemes like file: and javascript: would always be blocked, and ideally you'd see a toast when a link is blocked instead of nothing happening.

    The current behaviour is what you describe: resolveExternalURL only allows http:, https: and mailto:. This can't be done as a plugin, because link opening is handled by the desktop app itself, which plugins can't reach. The maintainers will consider the request.

    Related issues:

  2. pricklymusic commented on Oct 16, 2026

    @pricklymusic

    :*
    If we implement externalProtocols in opencode.json, `resolveExternal

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions