Skip to content
Development preview · 2.0.0-SNAPSHOT

Threat Model

When deploying Engine, Deploy, Durable, or Workbench, understand both the protections already provided and the work left to the application and infrastructure. This page identifies those responsibilities by data flow and threat. See Supported Surfaces for support levels and the Security Guide for configuration and operating instructions.

Component Inputs that must be trusted Privileges and data handled
Engine parser and compiler Reviewed, authorized TBBPM/BPMN definitions and extension implementations discovered from service declarations Generated Java uses the host JVM’s process, classpath, filesystem, network, and identity privileges
Deploy control plane and runtime Publication and routing commands authenticated and authorized by the host Immutable artifacts, Aliases, rollout state, and runtime selection
Durable kernel and Store Trusted definitions checked by Durable preparation, typed values, and application-provided stores, data sources, and extension implementations Run state, invocation frames within the same Run, leases, Effects, Wait-token digests, and Outbox records; raw tokens stay in protected active Outbox records until delivery succeeds or the corresponding Wait is settled
Workbench browser, gateway, and Server Authenticated operator requests forwarded by a trusted gateway Definition editing, deployment changes, execution, monitoring, and database access
Build and distribution Authorized source and release tags, pinned dependencies, and protected build credentials JARs, source archives, SBOMs (software bills of materials), checksums, and signed build provenance

Definitions, scripts (including Java), the business classes used by class actions, host components used by bean actions, extension implementations, and Store implementations are executable inputs and must be trusted. CompileFlow does not sandbox them. The application and deployment provide user authentication and authorization, tenant policy, TLS termination, database hardening, backups, and infrastructure isolation.

Protect process definitions, immutable artifact digests, Aliases and rollout state, execution variables, Durable snapshots, Effect payloads, Wait tokens, and Outbox records. Database, API, signing, and CI credentials need separate protection. Audit records and release artifacts with their SBOMs and provenance must also be protected from unauthorized changes.

Relevant actors are:

  • maintainers and build operators with repository or signing authority;
  • trusted flow authors and deployment operators;
  • authenticated application services and Workbench gateway principals;
  • embedding applications, extensions, Effect adapters, Store providers, and infrastructure administrators;
  • unauthenticated network clients, malicious or compromised dependencies, and attackers controlling an unreviewed definition, browser request, database row, artifact projection store, or CI metadata.
  1. Definitions enter through classpath, inline application input, Deploy, or Workbench. Only reviewed and authorized definitions should reach execution. The engine bounds parsing, checks the model, and calculates the source digest before compilation and execution.
  2. Publication saves an immutable Version without changing traffic. A separate routing command checks revisions before updating the rollout and Alias. The runtime resolves the Alias to an exact Version and verifies its content before loading it.
  3. Durable commits execution state, Effects, Waits, invocation frames, and Outbox records together in the owning Run’s transaction. The Store checks lease tokens when committing new execution state and rejects workers that no longer hold a valid lease.
  4. In production, browsers reach Workbench Server through a trusted gateway. It removes client-supplied internal headers and adds the server credential. The browser bundle contains no Server API key.
  5. Protected CI builds authorized source with pinned tools and dependencies. Checksums and build provenance link release artifacts to the source revision.
ID Threat Project protections What the application and deployment must do
TM-01 An untrusted definition or extension runs arbitrary code in the host Semantic checks, strict types, and an empty compiler classpath for Java scripts reduce accidental exposure; definitions still require trust Review and authorize definitions; run untrusted code in a separate OS or container environment; give the host minimal privileges
TM-02 XXE, remote schema access, path traversal, or oversized definitions disclose files or exhaust resources DTDs, external entities, and external schemas are disabled; source size is bounded; classpath input rejects schemes, parent traversal, and known network ClassLoader URLs Restrict custom ClassLoaders and artifact resolvers; set network and memory limits
TM-03 A client bypasses Workbench authentication or spoofs an internal identity Production startup requires an API key of valid length and format and a valid service account; API key digests are compared in constant time; in API_KEY mode only the configured health path and its liveness and readiness paths allow anonymous access; the Server’s service account comes from startup configuration Terminate TLS, authenticate and authorize users, strip untrusted headers, protect upstream connections, rotate credentials, and keep gateway audits for per-user accountability
TM-04 An authenticated user or service reads or changes another tenant’s data Namespaces and exact process identities avoid accidental key collisions; Workbench mutation APIs record its configured service account; embedded Deploy accepts caller-supplied audit identity Check tenant permissions before every control, execution, or query request; namespaces do not authorize access; use separate databases when needed
TM-05 An artifact is replaced, an old route overwrites a new one, or rollback runs the wrong code Version content is immutable and identified by a digest; publication and routing use explicit state changes, revision checks, and exact targets; release artifacts carry checksums and provenance Limit publication permissions, protect artifact transport and storage, inspect rollout configuration, and monitor reconciliation failures
TM-06 Retries, crashes, or lease expiry repeat external operations or lose completion results Stable Run, occurrence, and event IDs; transactions and lease checks before invocation or execution-state commits; UNKNOWN Effects retain unconfirmed outcomes; Outbox supplies stable event IDs but does not deduplicate for consumers Make retried Effects idempotent, reconcile UNKNOWN Effects with the external system, authenticate Outbox consumers, and retain external transaction evidence
TM-07 Responses, logs, browser storage, or build output leak variables, payloads, tokens, credentials, or source Public Workbench error responses omit raw business values; local preflight reports and authorized source queries still need protection; guidance prohibits sensitive logging; Workbench accepts no browser credential configuration; repository checks reject prohibited local artifacts and known insecure example secret defaults, but do not establish that arbitrary credentials are absent Encrypt transport and storage, restrict logs and backups, enforce retention and redaction, and keep credentials in a secret manager
TM-08 Expensive parsing, compilation, execution, queues, or API calls exhaust resources Definition size, compilation concurrency, worker capacity, and claim batches are bounded; in-memory execution queues are bounded, but persisted backlog needs external admission limits; execution and shutdown deadlines cannot stop code that ignores interruption Apply request limits, quotas, concurrency admission, and CPU/memory limits; plan capacity and configure alerts
TM-09 Database compromise, schema drift, or data loss damages control-plane and Durable records Transactions, versioned migrations, schema checks, optimistic concurrency, lease fencing, and crash/recovery tests Use least-privilege accounts, encrypted connections and storage, restricted administration, backup and PITR drills, and database monitoring
TM-10 A dependency, CI Action, base image, Maven Wrapper, or artifact is replaced Lockfiles and manifests, checksummed Wrapper downloads, commit-pinned Actions, digest-pinned images, dependency checks, CodeQL, SpotBugs, SBOMs, checksums, and provenance Protect repository settings and CI credentials with MFA and change approval; verify artifact provenance; assess registries, runners, and build services
TM-11 Browser content injection or a compromised gateway gives an attacker Server privileges The supplied nginx configuration sets a restrictive CSP and security headers; React receives no Server credential; the local Docker evaluation gateway replaces client-supplied API keys with its configured upstream key Review custom HTML, rendering, and gateway policies; restrict browser outbound connections; CORS and CSP cannot replace authentication

The project publishes separate dependency inventories for Maven libraries, the Workbench backend, and the production browser bundle. The backend inventory covers Server and all-in-one JARs, including embedded dependencies and the Spring Boot loader. Use checksums and build provenance to verify that each inventory corresponds to the released artifact.

Record how security findings were resolved. A dependency finding confirmed to be non-exploitable belongs in a CycloneDX VEX document linked to the affected SBOM. Report suspected vulnerabilities through the private channel in the Security Guide.