{{ inputs.field }} placeholders. Before a statement reaches the connector driver, the executor performs two passes:
- Environment substitution —
{{ env.VAR }}placeholders are replaced with process environment values. - Input substitution —
{{ inputs.field }}placeholders are replaced with string representations of validated input values.
Execute method. No parameterized query binding occurs at the substitution layer.
Implications
- Values are inserted directly into the statement text.
- The connector receives the statement as a single string.
- Statement safety depends on query design and input validation.
- This is functionally equivalent to string interpolation — it does not provide prepared-statement injection protection.
Built-in protections
The runtime validates and sanitizes inputs before they reach connectors or scripts.Input type validation
| Check | Behavior |
|---|---|
| Required inputs | Missing required inputs produce an error before execution. |
| Type conversion | Values are converted to the declared type. Invalid conversions produce a type error. |
| Default application | Omitted optional inputs with defaults receive the default value. |
int input only accepts numbers, a boolean only accepts true/false. This eliminates injection risk for non-string types.
Credential isolation
- Connection strings are server-side only.
- Auth policy values are resolved from environment variables and never returned in responses.
- Trace attributes redact sensitive values.
Auth enforcement
- Tool-level auth runs before any input processing.
- Auth failures halt the pipeline immediately.
What the framework does not protect against
- SQL injection via string inputs. A
string-typed input has no content restriction. Malicious SQL can be injected through string placeholders. - Statement manipulation via crafted values. Any input that contributes to statement structure (not just data values) is an injection vector.
- Business logic abuse. Negative IDs, excessive limits, and semantically invalid values are not caught by type validation.
Defensive patterns
Apply the following practices to minimize the surface area exposed to untrusted input.Use strict types
Preferint, float, and boolean over string. Numeric and boolean types have constrained value spaces.
Validate strings in transforms
Forstring-typed inputs, validate format in an input transform:
Keep statements narrow
Use inputs only in value positions:Use handlers for dynamic queries
When a query needs dynamic structure, implement it as a handler with explicit sanitization:Deploy behind a gateway
Place the runtime behind an API gateway or reverse proxy with rate limiting, request size limits, IP access control, and TLS termination.Environment variable safety
{{ env.VAR }} values are substituted without sanitization. If a variable contains SQL-significant characters and is used in a statement, the same injection risk applies.
Missing variables fail execution rather than defaulting to empty strings.
Responsibility matrix
| Layer | Protection | Responsibility |
|---|---|---|
| Input type validation | Type conversion and required checks | Framework (automatic) |
| Credential isolation | Connection strings hidden from callers | Framework (automatic) |
| Auth enforcement | Pre-execution access control | Framework (configured per-tool) |
| String input sanitization | Content validation and format enforcement | Developer (input transforms) |
| Statement safety | Avoiding structural injection | Developer (query design) |
| Network security | TLS, rate limiting, access control | Operator (infrastructure) |