Repository navigation
fix(runner): refuse remote targets instead of running the command locally - #1945
Merged
mrrobot47 merged 1 commit intoOct 12, 2026
Merged
Conversation
…ally An alias with an `ssh:` or `http:` key, `--ssh=`, `--http=` and an `ssh:`/`http:` key in the config were accepted, but nothing ever dispatched the command to the remote target, so a command such as `ee @Remote site delete foo --yes` ran on the local server. EasyEngine only manages the server it runs on (it needs root and local Docker, and runs its migrations before dispatching a command), so refuse these targets with a clear error before anything else runs. An alias group or `@all` is refused when any member has a remote target; aliases without one keep working as before. `config` and `help` stay usable with an `ssh:`/`http:` config key, so that `ee config unset ssh` can remove it.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Falsey remote configuration values bypass the new safety guard.
1 open finding
What changed in this PR
Adds early safeguards preventing unsupported remote targets from accidentally executing commands locally.
Changes:
- Rejects remote aliases, groups, and CLI flags.
- Rejects remote configuration before migrations run.
- Preserves configuration and help commands.
| File | Description |
|---|---|
php/EE/Runner.php |
Adds remote-target detection and early refusal. |
🧠 Review effort: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

An alias with an
ssh:orhttp:key,--ssh=,--http=and anssh:/http:key in the config were accepted, but nothing ever sent the command to the remote target:ee @remote site delete example.com --yesdeleted the site on the local server.EasyEngine only manages the server it runs on (it needs root and the local Docker daemon, and runs its migrations before it dispatches a command), so these targets are now refused with a clear error before anything else runs:
ssh/httpkey, or a group or@allthat contains one (aliases without a remote target keep working);--sshand--httpin any position, also withEE_STRICT_ARGS_MODE;ssh:/http:key in the global or project config;ee configandee helpkeep working, soee config unset sshcan remove it.Testing: unit tests run
bin/eewith each kind of target (and the local controls) on PHP 7.4 and 8.5; the Behat alias scenarios cover the same cases.