SDK Boundary Audit Findings¶
Status: audit findings and remediation plan, recorded 2026-11-30 against
source revision 6661ab9e (Go reference v2.12.0). This is an internal
engineering review, not a penetration test or independent security sign-off.
Independent containment review remains tracked in issue #8.
Method and Evidence Level¶
The findings, remediation status, and plan below are the historical 2026-11-30 snapshot. For subsequent source-tag and registry state, see the 2026-12-01 follow-up.
- Static review of the Go, Python, TypeScript, R, Fortran, Zig, Dart, PowerShell, OCaml, and C# implementations, focused on authorization binding, path containment, parsing bounds, streaming completion, and release gates.
- A surface scan of every other declared implementation for
model.generateandtool.invokecall sites; the coverage table records what that scan can and cannot support. - Local runtime probes for Python, TypeScript, R, Dart, and Zig. Each confirmed finding below names the observed behavior.
- Native suite runs for PowerShell (pwsh 7) and OCaml API snapshot; the OCaml bytecode suite was blocked by the local DkML environment and relies on hosted CI.
- Hosted CI job inspection for the application portfolio and native-language conformance runs. Skipped jobs are not recorded as passes.
- Fortran was reviewed statically only; local executable verification is restricted on this workstation and no binaries were generated for it.
Findings¶
P0: Zig approval argument aliasing bypasses reauthorization¶
language/zig/src/agent.zig:263. Interrupt copies the ToolCall struct but
shares the underlying argument map, so an approval handler that edits arguments
in place mutates the original snapshot. The later json.equals comparison then
reports "unchanged" and the second policy check is skipped. A probe recorded
one authorization, one effect, and a blocked target executed after an in-place
edit. The interrupt must carry a deep copy, or the handler must return new
arguments that are compared against the original snapshot.
P0: Zig provider numeric conversion panics¶
language/zig/src/json.zig:46. @intFromFloat on an out-of-range float (for
example a provider usage value of 1e100) panics the host process instead of
returning a controlled error. A malformed or hostile provider response can
terminate the embedding application. Conversion must fail with
ProviderError.ProviderJson or an equivalent typed error.
P0: R agent loop never authorizes model.generate¶
language/r/R/core.R (agent_run). The policy hook is consulted for
tool.invoke but not for model.generate, unlike the Go, Python, TypeScript,
and Fortran loops. A probe with a deny-all policy recorded one model call and
zero policy calls, so a policy meant to gate all model usage silently permits
it.
P0: R JSON parser and equality accept malformed or wrong values¶
language/r/R/json.R. json_parse accepts truncated literals (truX,
falsX, nulX), unterminated strings, invalid escapes, and leading-zero
numbers without error. json_equals compares only names and length for
unnamed lists, so list(1) equals list(2). Literal and string validation,
and element-wise array comparison, must be implemented and tested.
P1: TypeScript published-package smoke does not exercise tool authorization¶
language/typescript/tests/installed-smoke.js:7,
.github/workflows/release-typescript.yml:57. The smoke registers a tool but
the static model returns without a tool call, and no policy or denial path is
verified. Package install, import, and plain model generation passing do not
prove the published tarball's tool execution and authorization path works.
Source-tree tests do not substitute for artifact verification; the PHP 0.10.1
split-archive omission is the precedent. The final .tgz consumer must run
one allowed call with the expected effect and one denied call with zero
effects, and assert resolution inside the consumer directory.
P1: Zig relative path grants drop a leading ..¶
language/zig/src/runtime.zig:205. Normalization pops a parent only when the
component stack is non-empty, so ../allowed/secret normalizes to
allowed/secret and is allowed under a relative allowed grant. A probe
confirmed the denial expected by the contract does not occur. Leading ..
segments must be preserved and treated as outside the grant.
P1: R path containment is case-insensitive on every platform¶
language/r/R/core.R:157 (path_within). Both sides are lowercased, so a
grant on /tmp/allowed admits /tmp/ALLOWED/secret on case-sensitive
filesystems. A probe confirmed the acceptance. Case folding must be limited to
case-insensitive filesystems. The same file's openai_compatible stores a
timeout field that is never passed to curl (R/openaicompat.R:121-126), so
requests can hang without a bound; the option must be wired to curl's time
limits.
P1: Elixir and Erlang never authorize model.generate¶
language/elixir/lib/praxo/agent.ex and
language/erlang/src/praxo_agent.erl. Both loops call authorize only for
tool.invoke; no model.generate call site exists. A policy intended to gate
inference, cost, or provider selection is not consulted, matching the R defect
above. The application-level policy in language/elixir/application handles
model.generate itself, which masks the Core gap for that one consumer.
P2: Dart numeric representation changes are not reauthorized¶
language/dart/lib/src/json.dart:48. Json.equals compares numbers with
==, and Dart treats 1 and 1.0 as equal, while jsonDecode preserves the
int/double distinction. A middleware that changes 1 to 1.0 therefore
fails the "unchanged" check and skips reauthorization. A probe confirmed the
equality collapse. Compare decoded numeric representation, or document the
limitation. OCaml and JavaScript cannot distinguish the two representations at
all; this is inherent there and recorded as a limit, not a defect.
P2: Python root-directory grants falsely deny descendants¶
language/python/praxo/policy.py:103. _within appends os.sep to the grant
root, which double-appends when the root already ends in a separator. A
reproduced run with grant root D:\ denied
D:\profile\code\axis-vela\praxo-core\language\python. This is a false
denial, not an escape, but it shows the vector suite and native tests miss
basic path roots. Containment should compare path components, with regression
tests for drive roots, POSIX roots, UNC roots, and sibling prefixes. The
equivalent TypeScript probe timed out twice in this environment and is not
recorded as a confirmed TypeScript defect.
P2: TypeScript test manifests omit regression files¶
language/typescript/package.json:57,
.github/workflows/ci-typescript.yml:161,
.github/workflows/release-typescript.yml:53. npm test omits
behavior.test.js and tool-schema.test.js; the SDK CI and release workflows
include the former but still omit the latter, which checks that tool
parameters and risk reach the advertised tool specs. A wildcard run of all
files passed 101 tests; the risk is future regressions not blocking release.
Use one test entry point that discovers target files instead of maintaining
several hand-written lists.
P2: Shared Go HTTP client loses the default redirect hop limit¶
pkg/httpclient/client.go:69 and client.go:210. The custom CheckRedirect
rejects cross-origin hops but never inspects len(via), so Go's built-in hop
limit no longer applies. A same-origin redirect loop then waits for the total
timeout, and callers that disabled the timeout have no bound. This is a
resource-exhaustion and failure-boundary gap, not a credential leak, and it
conflicts with the hop-budget criterion in
boundary hardening.
Keep the same-origin check, add a finite hop limit, and cover redirect loops.
P2: Security support and roadmap records drifted from released facts¶
SECURITY.md:9, ROADMAP.md:3, docs/project/planning/roadmap.md:3,
docs/security/boundary-hardening.md:121. VERSION and the GitHub release
were already at Go 2.12.0 while the security policy still named 2.11.x as
current, the roadmap still named 2.11.3, and the hardening status still
described shipped changes as unreleased. The roadmap, metadata, and gate
checks all passed during the audit, so the consistency checks themselves have
a coverage gap. Current-version and support-line values should be checked
automatically, and security fixes should be recorded with implementation,
version, source SHA, artifact, and verification scope. Historical records stay
append-only; new state is added, not rewritten.
Fortran Verification Limit¶
Static review of the Fortran agent loop found the model.generate
authorization (praxo_agent.f90:190) and the final reauthorization after
middleware or approval edits (praxo_agent.f90:469-471) consistent with the
reference semantics, and governance.f90 covers denial-before-effect,
delegation depth, budget, and scope narrowing. Path policy is documented as
lexical normalization without symlink resolution (language/fortran/README.md:264),
a stated limitation rather than a hidden defect. JSON parsing is bounded
(262144 input bytes, 4096 nodes, 64 depth) and the RE2 bridge caps max_mem
at 8 MiB. Hosted fortran-conformance passed at 8497dc48. Local runtime
verification was not performed in this audit because local executable
generation is restricted; the hosted CI result is the only execution evidence
and an independent local rerun remains open.
Implementation Coverage¶
This pass does not certify every declared implementation. The table records
what was actually reviewed. "Reviewed" means line-level inspection of the agent
loop, authorization binding, and the named parser or path surface. "Surface
scan" means an automated check for model.generate and tool.invoke call
sites only. "Not audited" means no review this pass and no claim either way.
| Implementation | Status this pass | Evidence |
|---|---|---|
| Go | Reviewed (prior audit) | local tests, vet, release gate |
| Python | Reviewed | local probes, 120 native tests |
| TypeScript | Reviewed | build plus 101 tests, publish smoke gap |
| R | Reviewed | native tests, vectors, probes |
| Fortran | Static review | hosted fortran-conformance pass; no local binary |
| Zig | Reviewed | 13 agent tests, vectors, probes |
| Dart | Reviewed | vectors pass; numeric reauth gap |
| PowerShell | Reviewed | pwsh 7 wrapper tests pass; delegates to C# Core |
| OCaml | Reviewed | API snapshot pass; local run blocked by DkML env |
| C# | Reviewed for shared invariants | model auth, deep-clone snapshot, hosted tests |
| Elixir | Surface scan, finding | model auth absent in loop |
| Erlang | Surface scan, finding | model auth absent in loop |
| Java | Surface scan only | model.generate and tool.invoke present |
| Rust | Surface scan only | model.generate and tool.invoke present |
| C, C++ | Surface scan only | authorization call sites present |
| PHP, Ruby | Surface scan only | authorization call sites present |
| Swift, Julia | Surface scan only | authorization call sites present |
| Haskell | Surface scan only | model.generate present |
| Lua, Perl, Nim, V, D | Surface scan only | authorization call sites present |
| Delphi, COBOL, Objective-C | Surface scan only | authorization call sites present |
| MATLAB / Octave | Surface scan only | shared module call sites present |
| Kotlin, Scala, Groovy, Clojure, F#, OpenCL | Not audited | samples over JVM/.NET/Core |
| Lisp, Tcl, Prolog | Not audited | bridge wrappers |
| Ada, Mojo, Solidity, VBScript, FoxPro, Classic VB, Q, Assembly, Scratch, ABAP | Not audited | planned or gated, no runtime |
Surface-scan presence is not proof of correct ordering, final reauthorization,
or zero effects; those implementations still need a line-level review before
their complete label is treated as a security statement.
Remediation Status (2026-11-30)¶
Source fixes are committed but not yet released; versions are unchanged and the language release workflows still need to run the new tests. Verification below is local runtime evidence unless stated otherwise. Zig conformance was not rebuilt locally because executable generation is restricted on this workstation; hosted CI remains the release gate.
| Item | Status | Local verification |
|---|---|---|
| P0 Zig interrupt aliasing | fixed in source, unreleased | zig test src/agent_test.zig 13/13 |
| P0 Zig provider numeric panic | fixed in source, unreleased | zig test src/openaicompat_test.zig 7/7 |
P0 R model.generate authorization |
fixed in source, unreleased | Rscript language/r/tests/run_tests.R |
| P0 R JSON strictness and array equality | fixed in source, unreleased | R test suite plus vectors |
P1 Zig leading .. |
fixed in source, unreleased | zig test src/agent_test.zig |
| P1 R path case and curl timeout | fixed in source, unreleased | R test suite |
P1 Elixir model.generate authorization |
fixed in source, unreleased | Elixir test suite |
P1 Erlang model.generate authorization |
fixed in source, unreleased | python language/erlang/run-tests.py |
| P1 TypeScript publish smoke | fixed in source, unreleased | installed-smoke against a consumer install |
| P2 Dart numeric reauthorization | fixed in source, unreleased | dart run test/run.dart, vectors |
| P2 Python root containment | fixed in source, unreleased | 120 Python tests, test_path_policy.py |
| P2 Go redirect hop limit | fixed in source, unreleased | go test ./pkg/httpclient/ |
| P2 TypeScript test entry | fixed in source, unreleased | node --test tests/all.test.js 101/101 |
| P2 version consistency | fixed in source, unreleased | test_roadmap.py 11/11 |
Remaining before closure: bump and release the affected SDKs, run each new test in its release workflow, and record artifact/registry evidence. The independent containment review (issue #8) is still open.
Remediation Plan¶
- P0, before the next R and Zig releases: deep-copy or return-based Zig
interrupt arguments; controlled Zig float conversion; R
model.generateauthorization; R strict JSON literals/strings; R array-awarejson_equals. - P1: preserve and deny leading
..in Zig relative grants; platform-aware case handling and a working curl timeout in R; Elixir and Erlangmodel.generateauthorization; TypeScript published-package allow/deny consumer smoke. - P1 release gates: add a regression test per finding above to the owning
language's conformance and release workflow, so the
completematurity labels for R, Zig, Elixir, Erlang, and Dart re-earn their meaning. - P2: Dart numeric-representation reauthorization; component-based Python root matching with root/sibling-prefix vectors; single discovered TypeScript test entry; finite redirect hops in the shared Go client; automated version/support-line consistency checks.
- Coverage follow-up: line-level review of the surface-scanned and not-audited implementations before any of them is cited as a security boundary.
Out of Scope¶
- Full 31-implementation runtime re-verification.
- Live provider, workspace-provider, load, or production testing.
- A claim that fixing these items completes the independent containment review tracked in issue #8.
Current Source-Tag and Registry Status (2026-12-01)¶
The historical "unreleased" rows above describe the audit date, not today's
source tags. git merge-base --is-ancestor 3e35f58d <tag> succeeds for every
source tag below. This establishes inclusion of that remediation commit, not
new runtime, release-workflow, artifact, or independent acceptance evidence.
Registry state comes from the existing publication records,
not a new live registry audit.
| Implementation | Source tag containing 3e35f58d |
Recorded registry state |
|---|---|---|
| Go | v2.13.0 |
Go proxy v2.13.0; version matches the source tag; no new consumer smoke claimed here |
| Python | python/v0.13.0 |
PyPI 0.12.0; predates the remediation commit |
| TypeScript | typescript/v0.12.0 |
npm 0.11.0; predates the remediation commit |
| R | r/v0.13.0 |
r-universe 0.12.0, recorded build HEAD 9b417e3; newer source-tag fixes are not established for that artifact |
| Zig | zig/v0.10.0 |
No central registry; source-tag inclusion only |
| Dart | dart/v0.9.0 |
pub.dev 0.8.2; no publication of the newer source version recorded |
| Elixir | elixir/v0.12.0 |
Hex 0.11.1; predates the remediation commit |
| Erlang | erlang/v0.11.0 |
Hex 0.10.1; predates the remediation commit |
Source inclusion does not close the historical findings as independently accepted. Release/artifact checks and consumer smoke remain scoped to the exact versions and runs already recorded. Split tags and index entries are separate from registry artifacts; none inherits the source tag's verification. Issue #8 remains open. Later source-only changes are not claimed as released by this update.