Skip to content

Boundary Hardening Design

Status: proposed design, 2026-11-29; the initial implementation shipped in Go 2.12.0. The acceptance criteria below are not a guarantee or security sign-off for capabilities a given implementation has not released. Remaining gaps found after the release are recorded in the SDK boundary audit.

PRAXO-CORE (praxo-core, praxocore) is an embeddable agent framework. This design complements the threat model and compatibility policy. It does not change the normative spec/ contract, release versions, or support matrix.

Scope

Apply the criteria to each implementation and adapter that declares the relevant capability. Go remains on its v2 module line; independent SDKs choose their own stable-release scope. Contract conformance, artifact availability, platform verification, and production evidence are separate claims.

Governance remains explicitly configured. This proposal does not make a missing policy or an empty tool scope deny by default. Plugin provenance, tenant policy, credential storage, and tool-internal authorization remain integrator-owned.

Authorization Binding

The intended sequence is original authorization, middleware/approval preparation, private final snapshot, final tool-scope check, conditional reauthorization, then execution of that snapshot. Policy and event callbacks receive separate copies.

Argument comparison must preserve JSON distinctions: boolean and number are different; array order matters; object member order does not. Numeric representation and non-JSON values require explicit compatibility review rather than accidental host-language equality. Unchanged valid calls retain their existing policy-call count unless a separately reviewed contract change says otherwise.

Acceptance tests pair allowed calls with denied final edits, including nested type changes. Assert the actual execution arguments and zero tool effects on denial. Preserve each SDK's documented sequential or batch-preparation semantics.

Bounded Parsing

External JSON and protocol frames need bounds before allocation or indexing. Validate remaining bytes, escape syntax, Unicode handling, recursion depth, container size, and arithmetic overflow. Allocation failure must propagate as an error rather than producing a partial successful value.

Retained memory and parsing work must have explicit budgets; an input-byte cap alone is insufficient. Avoid repeated full-input string allocation and repeated copy-on-append growth. Internal capacity growth is preferred over widening public APIs, but any exposed struct layout change requires ABI review.

Use small bounded malformed-input tests, sanitizer runs where supported, and fuzz seeds for truncation, nesting, escape boundaries, and many small values. Valid Unicode and ordinary documents must continue to work.

Plugin Lifecycle

Use the existing lifecycle API; do not add a wire state solely for this design. A permanently unusable response channel must close call admission, fail pending calls, and initiate bounded cleanup. Health must not continue to report usable service after terminal transport failure.

Validate decoded JSON shape before property access. EOF, oversized frames, invalid response envelopes, child exit, cancellation, and shutdown must not escape runtime callbacks as uncaught exceptions or leave blocked callers. Specify which malformed frames are ignored and which terminate the transport.

Required OS limits must be effective before untrusted code can create descendants. If a platform cannot provide the declared requirement, reject that configuration or explicitly narrow the supported guarantee. Post-start limits and process groups must not be described as hard per-tree containment. Cgroups or a launcher require separate deployment, privilege, portability, and dependency review.

HTTP And Streams

Credential-bearing adapters must define redirect behavior for default and caller-supplied clients. Prefer rejecting redirects; where same-origin redirects are supported, compare scheme, host, and effective port on every hop, bound hops, and reject HTTPS downgrade. Test custom credential headers and replayable bodies, not only Authorization.

Each stream decoder defines its protocol-specific completion evidence. Distinguish completed generation, provider-declared failure, malformed/truncated transport, and cancellation. EOF alone is not proof of success when a terminal marker or finish reason is required. Do not expose partial tool calls as executable success. Streaming chunks already delivered cannot be recalled; do not promise rollback of caller side effects after a later error.

Set separate finite budgets for frame size, cumulative bytes, decoded output, tool calls, and arguments. Enforce before retention and check cancellation while reading. Downloads and bridge input also need bounded reads. Exact defaults and configuration surfaces require consumer-size evidence and compatibility review.

OIDC examples should coalesce JWKS refreshes, throttle unknown-key refreshes, and bound any negative cache. Preserve legitimate key rotation; unknown keys never become authorized during throttling. These are service-example controls, not a new Core authentication service.

Compatibility And Evidence

Implementation must classify each change against previously documented valid usage. Do not invent shared error codes, events, or wire fields: changes to those surfaces require spec/ review and affected-SDK conformance/parity checks. Behavioral restrictions and new resource defaults need migration notes and the appropriate independently versioned SDK release.

A candidate's evidence should bind source SHA, SDK/spec version, executed check identities, platform, artifact digest, and isolated-consumer results. A successful routing workflow does not prove skipped runtime jobs passed. Keep ordinary CI dependency-aware; candidate verification must cover the declared release scope.

Install the final archive outside the source tree without local overrides. Verify required modules, version, an allowed tool effect, and a denied call with zero effects. Registry installation is a separate post-publication claim. Dependency and license evidence must match the actual artifact, not only the root Go module.

Independent containment review remains separate from regression tests. Report unsupported platforms and unexecuted checks explicitly. Follow SECURITY.md for unfixed vulnerability reports; this public proposal is not a disclosure ledger.

Implementation Status

The initial set shipped in Go 2.12.0: bounded C JSON parsing with node/work budgets, typed final authorization in Python, plugin response-channel terminal handling, non-object plugin frame handling, same-origin E2B redirects with bounded downloads, provider stream completion and cumulative budgets, bounded bridge input, pre-exec Linux rlimits, and JWKS refresh throttling. C public builder allocation failure is documented; a checked builder needs a new C minor and API baseline.

The root release workflow now runs race, staticcheck, govulncheck, and adapter-module tests/vulnerability checks on the tag commit with pinned tool versions, and verifies job results for scoped workflows that ran. The Python release workflow runs installed-artifact conformance/parity and an allow/deny smoke; the C# release verifies the packed nupkg in an isolated allow/deny consumer.

Sanitizer CI, the Linux pre-exec test, the C++ malformed-response test, and the Java service tests pass in CI. macOS runtime verification, final-package installation for the remaining SDKs, independent containment review, and post-publication registry checks remain outstanding. The Linux process group remains advisory against a child that calls setsid.