mirror of
https://github.com/getcompanion-ai/computer-host.git
synced 2026-04-19 03:03:12 +00:00
artifact downloads need SSRF and transfer hardening #3
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The artifact download path currently trusts arbitrary HTTP(S) URLs and streams them with the default client straight into host storage.
What happens today:
validateDownloadURLonly checks that the URL is HTTP(S) and has a non-empty host; it does not reject loopback, link-local, RFC1918, metadata-service, or redirect-to-private targets (internal/daemon/files.go:429-444).downloadFileuseshttp.DefaultClientwith no explicit timeout, no redirect policy, no response size cap, and no checksum or digest enforcement before writing bytes to disk (internal/daemon/files.go:93-145).internal/daemon/files.go:42-45,internal/daemon/create.go:194-230).Impact:
Expected behavior:
Suggested follow-up:
http.DefaultClientwith a dedicated client that has timeout, redirect, and transport controls.