Overview
ShipSec Studio is an open source, no-code security workflow orchestration platform designed for security teams to build, execute, and monitor security automation workflows. Focus on security, not infrastructure. The system is composed of four main layers:Technology Stack
| Layer | Technologies |
|---|---|
| Frontend | React 19, TypeScript, Vite, Tailwind CSS, Radix UI, ReactFlow, xterm.js |
| Backend | NestJS, TypeScript, Bun runtime, PostgreSQL, Drizzle ORM, Clerk Auth |
| Worker | Node.js, TypeScript, Temporal.io, Docker containers |
| Infrastructure | PostgreSQL, Temporal, MinIO, Redis, Loki, Redpanda (Kafka) |
Monorepo Structure
Core System Components
Component SDK
Framework-agnostic component definition system with zero runtime dependencies (except Zod).- Triggers: Manual, schedule, webhook, file monitor
- Discovery: Subfinder, DNSx, Nmap, HTTPx, Katana
- Transform: JSON/CSV/text processing and data enrichment
- Output: Email, Slack, file export, database storage
Service Interfaces
Logging Infrastructure
The system implements a three-pipeline logging architecture:Terminal Streaming Pipeline
Real-time terminal output capture and delivery:- Capture: Docker container output captured as base64-encoded chunks
- Transport: Redis Streams with pattern
terminal:{runId}:{nodeRef}:{stream} - Frontend: xterm.js renders real-time terminal output with timeline synchronization
Log Streaming Architecture
Structured log transport and persistence:- Sources: Component stdout/stderr and console logs
- Multi-transport: Kafka for streaming, Loki for aggregation, PostgreSQL for metadata
- Query Interface: Frontend queries logs by run ID, node, time range, and level
Event Streaming Pipeline
Workflow lifecycle event tracking:- Event Types: NODE_STARTED, NODE_COMPLETED, NODE_FAILED, NODE_PROGRESS
- Transport: Kafka-based with per-run sequence numbering
- Timeline Generation: Events processed to create visual execution timeline
Worker Architecture
Executes components in isolated environments with real service implementations.- File Storage: MinIO integration with PostgreSQL metadata
- Secrets: HashiCorp Vault with AES-256 encryption
- Tracing: Redis/pubsub for real-time events
- Logging: Kafka, Loki, and database persistence
- Terminal: Redis streams for real-time output
Backend Services
Core Modules
- WorkflowsModule: Workflow CRUD, compilation, Temporal integration
- AuthModule: Clerk-based authentication and multi-tenancy
- SecretsModule: Encrypted secrets management with versioning
- IntegrationsModule: OAuth orchestration and token vault
- TraceModule: Event management and timeline generation
- LoggingModule: Log ingestion and processing
Key API Endpoints
| Endpoint | Description |
|---|---|
POST /api/v1/workflows | Create and compile workflows |
POST /api/v1/workflows/{id}/runs | Execute workflows |
GET /api/v1/runs/{runId}/terminal | Get terminal chunks |
GET /api/v1/runs/{runId}/logs | Get execution logs |
GET /api/v1/runs/{runId}/events | Get trace events |
GET /api/v1/runs/{runId}/stream | SSE streaming endpoint |
Frontend Architecture
Real-time Features
- Visual Builder: ReactFlow-based workflow editor with drag-and-drop
- Terminal Display: xterm.js integration for real-time terminal output
- Execution Timeline: Zustand-based timeline state with event synchronization
- Live Updates: WebSocket/SSE streaming for real-time status updates
State Management
- Timeline Store: Zustand for execution timeline state
- API State: React Query for server state management
- Component State: Local React state with hooks
Workflow Execution Flow
Workflow Replay
Data Sources for Replay
- Terminal Cast Files: Asciinema-compatible
.castfiles stored in MinIO - Structured Logs: Loki with nanosecond precision
- Trace Events: PostgreSQL with sequence numbers
- Artifacts: MinIO with component outputs
Timeline Features
- Playback controls (play, pause, seek)
- Node state visualization
- Data flow display
- Terminal seeking
- Speed control
Database Schema
Security Architecture
Multi-tenant Authentication
- Clerk Integration: Production-ready authentication
- Organization Isolation: Tenant-based data separation
- Role-Based Access: Admin, User, Viewer roles
Data Security
- Secrets Encryption: AES-256-GCM encryption at rest
- Container Isolation: Docker isolation for component execution
- Network Security: TLS encryption, proper CORS configuration
- Access Control: Fine-grained permissions and audit logging