No description
  • Go 86.3%
  • Makefile 11.3%
  • Dockerfile 2.4%
Find a file
zemdregon ec8c6a9cff
Some checks are pending
CI / lint (push) Waiting to run
CI / test (push) Waiting to run
CI / build (push) Waiting to run
CI / docker (push) Blocked by required conditions
chore(deps): bump docker/setup-buildx-action to v4
Self-hosted CI workflows only.
2026-08-10 18:14:20 -05:00
.github/workflows chore(deps): bump docker/setup-buildx-action to v4 2026-08-10 18:14:20 -05:00
cmd/module feat: add proto contracts and align module bootstrap 2026-07-22 19:09:33 -05:00
deploy feat: add proto contracts and align module bootstrap 2026-07-22 19:09:33 -05:00
internal Advertise settings capability (v0.1.4). 2026-08-10 04:52:49 -05:00
muxcore/executor/v1 feat: add proto contracts and align module bootstrap 2026-07-22 19:09:33 -05:00
proto/muxcore/executor/v1 feat: add proto contracts and align module bootstrap 2026-07-22 19:09:33 -05:00
.dockerignore feat: initial implementation 2026-06-13 13:24:15 -05:00
.gitignore feat: initial implementation 2026-06-13 13:24:15 -05:00
.golangci.yml feat: initial implementation 2026-06-13 13:24:15 -05:00
CHANGELOG.md Advertise settings capability (v0.1.4). 2026-08-10 04:52:49 -05:00
Dockerfile feat: initial implementation 2026-06-13 13:24:15 -05:00
go.mod Add SettingsProvider for live command allowlist. (#6) 2026-08-10 03:34:32 -05:00
go.sum Add SettingsProvider for live command allowlist. (#6) 2026-08-10 03:34:32 -05:00
LICENSE feat: add proto contracts and align module bootstrap 2026-07-22 19:09:33 -05:00
Makefile feat: add proto contracts and align module bootstrap 2026-07-22 19:09:33 -05:00
muxcore.json Advertise settings capability (v0.1.4). 2026-08-10 04:52:49 -05:00
README.md docs: add SECURITY.md and Execute cancel/timeout tests 2026-08-10 00:06:35 -05:00
SECURITY.md docs: add SECURITY.md and Execute cancel/timeout tests 2026-08-10 00:06:35 -05:00

Executor Shell

Go Version License: GPL-3.0

Generic shell command executor for the MuxCore worker pool.

A MuxCore sidecar module that executes shell commands from worker pool tasks. When a task arrives with type "shell", it runs the payload as a shell command and returns the output.


How It Works

Worker pool task ──→ executor-shell (gRPC) ──→ sh -c "<payload>"
                                                   │
                                                   ▼
                                    success → Result = stdout
                                    failure → Error = stderr (or exec error)

Capability: executor.shell
Contract: Executor (v0.4.0, min core 0.4.0)
Task type: shell


Configuration

Environment Variables

Variable Default Description
EXECUTOR_GRPC_ADDR :9602 gRPC listen address
EXECUTOR_ALLOWED_COMMANDS "" (deny all) Comma-separated command prefixes. Empty denies every command. Use * only in local tests — never in production (see SECURITY.md).

Security

Commands are checked against EXECUTOR_ALLOWED_COMMANDS before execution:

  • Empty — deny all (fail-closed default).
  • Prefixes — e.g. git,make,ls allows only payloads that start with one of those prefixes.
  • * — unrestricted (explicit opt-in).

Rejected commands are logged at WARN level.


Development

make build   # compile the module binary
make test    # run tests with race detection
make lint    # golangci-lint
make fmt     # format Go source
make tidy    # go mod tidy

Deployment

Docker

make docker      # build image
make docker-push # build and push

Systemd

Copy the service unit and binary:

cp deploy/systemd/muxcore-module.service /etc/systemd/system/executor-shell.service
cp executor-shell /usr/local/bin/executor-shell
systemctl daemon-reload
systemctl enable --now executor-shell