Skip to main content
Hyperterse uses textual substitution for {{ inputs.field }} placeholders. Before a statement reaches the connector driver, the executor performs two passes:
  1. Environment substitution — {{ env.VAR }} placeholders are replaced with process environment values.
  2. Input substitution — {{ inputs.field }} placeholders are replaced with string representations of validated input values.
The resulting statement is a complete string passed to the connector’s 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

Hyperterse validates and sanitizes inputs before they reach connectors or scripts.

Input type validation

Type validation constrains the value space: an 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 stop the request 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

Prefer int, float, and boolean over string. Numeric and boolean types have constrained value spaces.

Validate strings in transforms

For string-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 Hyperterse 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