Skip to content

unsloth start: warn before running an agent's remote installer - #7024

Merged
wasimysaid merged 1 commit into
mainfrom
harden-installer-consent
Jul 9, 2026
Merged

wasimysaid merged 1 commit into
mainfrom
harden-installer-consent

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Context

A security review flagged that unsloth start hermes on Windows, after an interactive confirm, runs the vendor installer irm https://hermes-agent.nousresearch.com/install.ps1 | <scriptblock> with no signature or hash check. The same pattern applies to every agent whose vendor ships a shell installer rather than a package: claude (irm .../install.ps1 | iex), openclaw (iwr -useb .../install.ps1 | iex), and the POSIX curl | bash variants. The npm-based agents (codex, opencode, pi) get registry integrity instead.

We cannot pin a hash or signature for a third-party remote installer we do not control (the content changes on every upstream release, so a pinned hash would break installs and give false assurance). The realistic hardening is to make the existing consent step fully informed, uniformly across all agents.

Change

_install_agent keeps the confirm-then-run behavior, but before the prompt it now prints an explicit warning that names the exact source:

  • Remote installer: This will download and RUN a script from <url> with your privileges; there is no signature or hash check.
  • Package installer (npm): This will RUN \` with your privileges; there is no signature or hash check.`

Everything else is unchanged: non-interactive stdin still never executes anything, the confirm still defaults to no, and the command that runs is identical.

Tests

unsloth_cli/tests/test_start.py:

  • A remote installer warning names the fetched URL and states there is no signature or hash check.
  • A package installer warning names the command.
  • The existing tests that assert the executed command (powershell -NoProfile -Command ..., /bin/sh -c ...) still pass unchanged.

When a coding agent is missing, `unsloth start <agent>` offers to run the
vendor's own installer (curl | bash, irm | iex, or npm) after an interactive
confirm. Those installers execute with the user's privileges and there is no
signature or hash check on the fetched content, so a blind "yes" is a
supply-chain risk if the delivery path is compromised.

Keep the auto-install convenience but make consent informed: before the prompt,
name the exact remote source the installer fetches (or the command it runs for a
package installer) and state that nothing verifies a signature or hash. Behavior
is otherwise unchanged: non-interactive stdin still never executes anything, and
the confirm still defaults to no.
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Chef's kiss.

Reviewed commit: d439fde88a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@wasimysaid
wasimysaid merged commit 6d674e5 into main Jul 9, 2026
48 checks passed
@wasimysaid
wasimysaid deleted the harden-installer-consent branch July 9, 2026 09:08
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.

2 participants