sqrl
by DataSQRL
Overview
A build tool and CLI for compiling, running, and testing DataSQRL projects, including the deployment of GraphQL, REST, and Micro-Context Protocol (MCP) API servers, Flink stream processing jobs, and database interactions.
Installation
sqrl runEnvironment Variables
- SQRL_DEBUG
- SQRL_JVM_TOOL_OPTS
- SQRL_JVM_ARGS
- DATA_PATH
- UDF_PATH
- BUILD_UID
- BUILD_GID
- KAFKA_BOOTSTRAP_SERVERS
- KAFKA_GROUP_ID
- POSTGRES_VERSION
- POSTGRES_HOST
- POSTGRES_PORT
- POSTGRES_DATABASE
- POSTGRES_AUTHORITY
- POSTGRES_JDBC_URL
- POSTGRES_USERNAME
- POSTGRES_PASSWORD
- DUCKDB_EXTENSIONS_DIR
Security Notes
1. Dynamic Code Generation: The `FlinkExecFunctionFactory` and `CodeGenBridge` classes dynamically generate Flink `FlatMapFunction`s at runtime based on `RexNode` expressions. While `RexNode`s are internal Calcite representations, the security relies heavily on robust validation and sanitization of the initial input to the compiler to prevent code injection vulnerabilities. 2. External Command Execution: The `JBangPreprocessor` invokes the `jbang` CLI tool to compile Java User-Defined Functions (UDFs) into JARs. The `OsProcessManager` also executes `rpk` (Redpanda/Kafka) and `psql` (PostgreSQL) commands. If an attacker can control file paths or arguments passed to these external commands, it could lead to arbitrary command execution. 3. Default Insecure Passwords: `OsProcessManager.java` uses hardcoded default `postgres` username and password for initializing the PostgreSQL database. While this is acceptable for local development/containerized environments, it poses a significant security risk if not explicitly overridden with strong credentials in production deployments. 4. File System Operations: The `FilePreprocessingPipeline` and `Packager` perform various file system operations like copying, creating, and deleting directories. This introduces potential for path traversal vulnerabilities if user-controlled input is used to construct file paths without proper validation. 5. Network Exposure: The server exposes HTTP, GraphQL, REST, and MCP endpoints. While authentication (JWT, OAuth2) and CORS handlers are implemented, the overall security depends on the robustness of these implementations and proper configuration. Overall, the dynamic code generation and external command execution are high-risk areas. The default insecure database credentials make it unsafe for non-development environments.
Similar Servers
DBchat
Transforms a database into an intelligent conversational partner, enabling natural language queries, instant answers, and data visualizations via MCP clients.
enhanced-postgres-mcp-server
This server acts as a Model Context Protocol interface for PostgreSQL, enabling LLMs to query data, modify records, and manage database schema objects with read and write capabilities.
nlp2sql
Converting natural language queries to optimized SQL for enterprise databases using multiple AI providers.
mcp-server-generator
Generate Model Context Protocol (MCP) servers from database datasources for integration with AI agents, using a visual canvas interface for tool creation and management.