veko-lang.org
Download Free EPUB 3.0

Part III · Performance, Cross-Compilation, Security Governance & Diagnostics

Chapter 13

Administrator Operations, Sandbox Governance & Secret Hygiene

Enforcing veko.vk allow-caps, HostSandbox fuel/memory quotas, VKP1 supply-chain trust-keys, and volatile .secret wiping

Operational guidance for building, verifying, configuring, and governing Veko 1.0 workloads across local 64-bit VKO VM deployments (oro_vm.vk), vvm WebAssembly 3.0 zero-trust sandboxes (codegen.vk), and standalone native executables (native_emit.vk & arm64_emit.vk across win-x64, win-arm64, linux-x64, linux-arm64, and macos-arm64).

CAPABILITY GOVERNANCE

Defense-in-Depth Capability Gates, .secret Firewall & Supply-Chain Trust

Compile-time allow-caps enforcement, cryptographic taint tracking, zero-trust Wasm sandboxes, and signed VKP1 packages.

COMPILE-TIME POLICY & SUPPLY CHAIN veko.vk + types.vk + pkg/vkp.vk RUNTIME SANDBOXES & SINK FIREWALLS oro_vm.vk + vvm + native PAL Static audit .secret blocked Verified deps Cap mask Sink checks Manifest Policyveko.vk allow-caps.fs .clocks .env .net .exec .ui FFI IsolationDefault-Deny .ffi Gate--allow-ffi / VEKO_ALLOW_FFI=1 Supply ChainSigned VKP1 BundlesMerkle SHA-256 + Ed25519/ML-DSA Taint FirewallCompile + Runtime .secretZero Leakage Across Sinks Runtime IsolationVM & Wasm HostSandbox--allow-* + fuel + SSRF block
Component & ModuleArchitectural Role
veko.vk allow-caps
types.vk + main.vk
Declares the exact OS capabilities permitted inside the workspace module graph.
Default-Deny .ffi Gate
lib/ffi.vk + types.vk
Keeps foreign C-ABI shared libraries disabled by default and banned in Wasm.
Signed VKP1 Bundles
lib/pkg/vkp.vk
Verifies cryptographic package signatures against pinned trust-keys before compilation.
Compile + Runtime .secret
types.vk + runtime.vk
Blocks secret-tagged values from leaving process memory in cleartext.
VM & Wasm HostSandbox
oro_vm.vk + runtime_pal*.vk
Enforces defense-in-depth host policies at runtime for scripts and plugins.

1. Build & Verification Pipeline

Veko ships with a pure-.vk build orchestrator (build.vk) that enforces static checks, multi-suite verification, documentation hygiene, and S1 == S2 self-hosting convergence:

Command / TargetActionPurpose
check (veko run build.vk -- check)Static DAG checkValidates all 76 compiler/runtime modules (src/main.vk) and strict-typed examples
test (veko run tests/run_tests.vk)Runs 18 test suitesValidates lexer, Pratt parser, types/secrets, 64-bit VKO, stdlib, PQC, TLS 1.3, reactor, durable workflows, UI/X11/clipboard/FFI, flamegraphs, veko.lock, and 3-track parity
docs (veko docs)Compiles dist/docs/Renders isolated End-User and Technical HTML suites + interactive SVG diagrams + hygiene checks
build (veko run build.vk -- build)Builds binary + docsRefreshes HTML docs and compiles a 2-stage S1 == S2 native veko binary into dist/bin/
fixed-pointFixed-point gateVerifies byte-for-byte S1 == S2 convergence for native machine code and 64-bit VKO
all (veko run build.vk -- all)Full release gateRuns check, test, docs, and build sequentially

2. Three-Backend Operational Profiles

Operators select among Veko's three execution tracks depending on trust boundary, portability, and deployment target:

  • Track A — 64-Bit VKO Bytecode VM (oro_vm.vk / --vm / .vko): Fast local tooling, interactive veko repl, doctests, dynamic eval, and precompiled 64-bit VKO execution with runtime --allow-* capability flags.
  • Track B — WebAssembly 3.0 Sandbox (codegen.vk / --wasm / vvm): Zero-trust execution for untrusted plugins and multi-tenant workloads inside vvm's HostSandbox, enforcing --fuel, --mem-pages, --allow-fs=<dir>, --allow-hosts, SSRF blocking, and strict .ffi prohibition.
  • Track C — Native x86_64 & AArch64 (native_emit.vk + arm64_emit.vk / --native): Standalone Windows PE32+ (--target=win-x64 & --target=win-arm64 0xAA64, optional --gui), static zero-libc Linux ELF64 (--target=linux-x64 & --target=linux-arm64), and ad-hoc SHA-256 signed 16 KiB Apple Silicon Mach-O (--target=macos-arm64) binaries with CPUID AVX2/SSE2/AES-NI, OS-native readiness reactors (epoll/kqueue/IOCP), and opt-in .ffi shared library trampolines.
Operational DimensionTrack A: 64-Bit VKO VM (--vm)Track B: vvm Wasm 3.0 (--wasm)Track C: Native x86_64 & ARM64 (--native)
Trust BoundaryTrusted local CLI scripts, tools, and interactive REPLUntrusted plugins, multi-tenant edge rules, and sandboxed tasksTrusted standalone OS executables (zero external compiler, JVM, or GC)
Host InterfaceGuarded VmPolicy OS PAL (fs, net, reactor, offscreen ui)WASI 0.3 + explicit HostSandbox capability allowlists (.ffi forbidden)Win32 IAT (win-x64/win-arm64), direct Linux syscalls (linux-x64/linux-arm64), or libSystem (macos-arm64)
Resource Metering--fuel=<n> instruction quota + VmPolicy sleep/output caps + deterministic ORO cleanupvvm --fuel budget + --mem-pages ceiling + --check-slabs leak gateThread-local 12-bucket ORO slab free-lists + deterministic .secret zero-wipe
Supply ChainVerifies veko.vk trust-keys on .vkp bundlesVerifies veko.vk trust-keys on .vkp bundlesVerifies veko.vk trust-keys + emits SHA-256 LC_CODE_SIGNATURE on macos-arm64

3. Security, Capability & Secret Governance

Project Manifest Confinement (veko.vk)

Across all three backends, operators enforce static build-time confinement via veko.vk:

  • Canonical Path Confinement: Project root and every resolved .vk/.vko module path are verified via canonical real-path containment so symlink and ../ escapes are rejected before parsing.
  • Least-Privilege Capability Allowlisting (allow-caps):
    • .fs — Filesystem access (os/read-*, os/write-*, os/open, os/pread, os/pwrite, os/stat, etc.)
    • .clocks — Wall/monotonic clocks and sleeps (time/*)
    • .env — Environment variables and CLI args (os/getenv, os/args)
    • .net — TCP/UDP sockets, DNS, HTTP, and readiness reactor (net/*, http/*)
    • .exec — Child process execution (os/exec)
    • .ui — Native window surfaces (ui/*; Win32 user32.dll/gdi32.dll imported only when used)
    • .ffi — Foreign C-ABI shared libraries (ffi/*; denied by default unless allow-caps = [.ffi] or --allow-ffi is set; strictly forbidden on --wasm)
  • Signed 'VKP1' Package Pinning (trust-keys): Pinning trust-keys = ['ed25519:<hex>', 'mldsa65:<hex>'] inside veko.vk ensures every .vkp dependency is Merkle-verified against trusted publisher keys before loading.

Sensitive Buffer Zeroization & .secret Firewall

Unlike garbage-collected runtimes where keys linger in uncollected heap pages:

  • No SSO Escape + Volatile Zero-Wipe: Values from os/getenv/secret and bytes/with-secret always allocate flag_secret heap slabs whose full capacity is overwritten with zeroes before returning to any free-list.
  • Automatic Redaction: print, println, mold, and log/* redact .secret values to <secret>.
  • Compile-Time & Runtime Sink Blocking: Deep taint checks block .secret values from crossing net/*, http/*, spawn, chan/send, json/encode, os/write-file, ui/present, and ffi/*.

4. Troubleshooting & Diagnostics

SymptomLikely CauseOperator Resolution
unknown word 'n-1'Missing spaces around subtraction operator -Add spaces (n - 1); Veko treats n-1 as a kebab-case word
capability error: ... requires .ffiForeign library call without explicit FFI opt-inPass --allow-ffi or declare allow-caps = [.ffi] in veko.vk (native/VM only)
docgen hygiene: decorative Unicode emojiEmoji character introduced into Markdown or HTML docsReplace with plain text or inline vector SVG icon
docgen hygiene: forbidden source extNon-Veko source filename leaked into docsRefer to pure-Veko modules (lexer.vk, parser.vk, oro_vm.vk, codegen.vk, native_emit.vk)
veko inspect unexpected precedenceMissing (...) around compound math passed to prefix wordWrap compound inline expressions as (offset + 4)