Skip to content

fix(cli): accept Artifact downloads from a service subdomain - #134

Merged
harlan-zw merged 2 commits into
mainfrom
fix/artifact-origin
Sep 7, 2026
Merged

fix(cli): accept Artifact downloads from a service subdomain#134
harlan-zw merged 2 commits into
mainfrom
fix/artifact-origin

Conversation

@harlan-zw

Copy link
Copy Markdown
Collaborator

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Every skilld: run and install on 3.0.0-beta.4 dies at the last hop:

$ skilld run skilld:tt-a1i/archify/archify
REMOTE_ORIGIN_REJECTED: the remote URL uses an unapproved origin

The resolution, trusted root, and grant all succeed. The grant then points at https://artifacts.skilld.dev/..., which skilld.dev has served since skilld-dev/skilld.dev#54, and the CLI only allows the API origin itself. The tests never caught it because the fake grant sits on the same 127.0.0.1:8787 origin as the API.

A grant may now point at the service origin or at an https subdomain of it. Anything else is still refused before the request leaves.

I went with the subdomain rule rather than a hard coded artifacts.skilld.dev so a staging endpoint keeps working. Open to pinning the host in the trusted root instead if you would rather the service name it.

🤖 AI disclosure: Harlan Agent Kit modified this description. My AI open-source policy.

https://claude.ai/code/session_01ASGK6drkuCbo7vsPQcYCvn

The service now serves Artifact bytes from artifacts.skilld.dev, but the
origin allowlist only knew the API origin. Every skilld: run and install
therefore failed at the final hop with REMOTE_ORIGIN_REJECTED, after the
resolution, trusted root, and grant had all succeeded.

A grant may now point at the service origin or at an https subdomain of
it. Every other origin is still rejected before the request leaves.

Claude-Session: https://claude.ai/code/session_01ASGK6drkuCbo7vsPQcYCvn
@harlan-zw
harlan-zw merged commit 5fa9583 into main Sep 7, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant