The Problem Security‑orchestration teams need a shared, extensible automation console that can be self‑hosted without re‑inventing the underlying workflow engine. Existing SOAR tools are often closed, hard to extend, or require heavyweight infrastructure.
What This Does Shuffle provides a web UI (React) and a Go‑based backend that together expose a workflow editor, app marketplace, and API gateway. The UI lives under frontend/ (entry point frontend/src/index.js → frontend/src/App.jsx). The server starts from backend/go-app/main.go, reads configuration from .env, and talks to an OpenSearch instance defined in backend/database/opensearch/docker-compose.yml. Dockerfiles (backend/Dockerfile, frontend/Dockerfile) and a top‑level docker‑compose.yml orchestrate the whole stack.
How It Is Wired
| Component | Responsibility | Key imports / calls |
|---|---|---|
backend/go-app/main.go | Starts the HTTP API, loads env vars, registers routes | imports backend/go-app/docker.go, backend/go-app/walkoff.go |
backend/go-app/docker.go | Wraps Docker client for app execution | calls github.com/docker/docker/client (pinned v28.3.3) |
frontend/src/App.jsx | Root React component, mounts router and context providers | imports frontend/src/theme.jsx (hub, 111 dependents) and frontend/src/context/ContextApi.jsx (hub, 67 dependents) |
frontend/src/theme.jsx | Supplies MUI theme; heavily imported, low churn | no outbound imports (instability 0) |
frontend/src/context/ContextApi.jsx | Global state, used by most UI parts | no outbound imports (instability 0) |
frontend/src/views/Workflows2.jsx | Workflow editor UI – oversized (5 449 lines) and deepest nesting (22) | participates in import cycle with WorkflowTemplatePopup.jsx and WorkflowValidationTimeline.jsx |
backend/app_gen/python‑lib/baseline | Example Python app generator, built into Docker image | invoked by CI for testing app generation |
The import graph shows 177 internal modules with 7 circular dependencies; the most volatile hub is frontend/src/theme.jsx. The workflow editor (Workflows2.jsx) sits in a cycle, increasing blast radius for any change.
How To Use It
# Clone the repo
git clone https://github.com/moses-y/Shuffle
cd Shuffle
# Install UI deps
cd frontend && npm ci && cd ..
# Build Go backend
cd backend/go-app && go build -o shuffle && cd ..
# Bring up the stack (OpenSearch + UI + API)
docker compose up -d
Configuration – copy .env.example (not present, create one) and set at minimum:
SHUFFLE_DOWNLOAD_WORKFLOW_PASSWORD=…
SHUFFLE_OPENSEARCH_PASSWORD=…
OPENSEARCH_INITIAL_ADMIN_PASSWORD=…
Run – the API is reachable at http://localhost:8080, UI at http://localhost:3000. For development, start the UI with npm start inside frontend/ and the backend with go run ./backend/go-app/main.go.
Real‑World Use A SOC can deploy Shuffle on‑premises, register its existing Splunk and TheHive instances as “apps” via the OpenAPI app generator, then author a workflow that triggers a phishing‑email enrichment pipeline: the UI creates the workflow, the backend spins a Docker container for the enrichment app, stores results in OpenSearch, and posts a Slack notification—all within a single end‑to‑end run.
Code Health & Issues
Measured static findings
- High – Hub module:
frontend/src/theme.jsx(111 dependents). Keep it tiny. - High – Deep nesting:
frontend/src/views/Workflows2.jsx(max depth 22). Refactor to early returns. - High – Oversized file:
frontend/src/views/Workflows2.jsx(5 449 lines). Split by responsibility. - Medium – Empty catch:
frontend/src/views/Workflows2.jsx&frontend/src/components/ShuffleCodeEditor1.jsx. Add logging or rethrow. - High – Import cycle:
frontend/src/views/Workflows2.jsx↔WorkflowTemplatePopup.jsx↔WorkflowValidationTimeline.jsx. Break the cycle.
Code‑health audit
- Critical – Vulnerable Go deps (
golang.org/x/crypto@0.45.0,google.golang.org/grpc@1.72.2). Upgrade. - Critical – Committed credentials in
.env. Rotate and remove from repo. - Critical – Secrets in
.github/workflows/quick-testing.yml. Move toworkflow_runor gated environment. - High – Unpinned GitHub Actions (
docker/setup-buildx-action@v3). Pin to SHA. - High – Additional vulnerable Go packages (e.g.,
github.com/go-jose/go-jose/v4@4.1.3). Upgrade. - High – Docker Compose uses privileged mode and host networking. Limit capabilities and publish ports explicitly.
- High –
.envtracked in Git. Remove, add to.gitignore, provide example file. - High – CI never runs tests. Add a test step to existing workflows.
- Medium – GITHUB_TOKEN permissions not scoped. Declare least‑privilege (
contents: read). - Medium – Base images in
backend/Dockerfileuse mutable tags (golang:1.24,alpine:latest). Pin by digest.
The Bottom Line Shuffle is a functional, container‑ready SOAR platform with a clear UI/backend split, but the codebase suffers from large, tightly coupled UI modules, several import cycles, and serious secret‑management lapses. It is suitable for teams comfortable tightening the CI pipeline, rotating credentials, and refactoring the workflow editor before extending it in production.