Skip to content

fix(runner): refuse remote targets instead of running the command locally - #1945

Merged
mrrobot47 merged 1 commit into
EasyEngine:developfrom
mrrobot47:fix/refuse-remote-targets
Oct 12, 2026
Merged

mrrobot47 merged 1 commit into
EasyEngine:developfrom
mrrobot47:fix/refuse-remote-targets

Conversation

@mrrobot47

Copy link
Copy Markdown
Member

An alias with an ssh: or http: key, --ssh=, --http= and an ssh:/http: key in the config were accepted, but nothing ever sent the command to the remote target: ee @remote site delete example.com --yes deleted 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:

  • an alias with an ssh/http key, or a group or @all that contains one (aliases without a remote target keep working);
  • --ssh and --http in any position, also with EE_STRICT_ARGS_MODE;
  • an ssh:/http: key in the global or project config; ee config and ee help keep working, so ee config unset ssh can remove it.

Testing: unit tests run bin/ee with each kind of target (and the local controls) on PHP 7.4 and 8.5; the Behat alias scenarios cover the same cases.

…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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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.

Comment thread php/EE/Runner.php
@mrrobot47
mrrobot47 merged commit 0de8411 into EasyEngine:develop Oct 12, 2026
11 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.

2 participants