← redevops.iowhitepaper v10 →
Under the hood · security · whitepaper v10 · contracts v0.3.x

Security & Enforcement

Monitor-first enforcement over one normalized runtime-event history — because every agent surface is different, and post-hoc telemetry is not an enforcement boundary
This doc specifies the security model that the v10 reference-first harness and the whitepaper-v9 runtime-event contract depend on. The RuntimeEvent contract ships in Python (agentic_os/mission/events.py); the DecisionGate, TrajectoryEngine and CoverageMatrix are implemented in Go (go/events · go/evaluation); Python parity now ships in the v0.2.0 Governance plane.

The one idea. Every supported agent surface — live or persisted — normalizes into the same typed, replayable event history, and enforcement is a separately-declared capability of that surface, not an assumption. Detection is broad and forensic; blocking is opt-in, rule-specific, and only real where the host exposes a synchronous pre-action gate.

1. One normalized event history

Hooks, plugins, telemetry, and on-disk session artifacts all normalize into one RuntimeEvent envelope (event_id · event_type · schema_version · mission_id · session_id · parent_event_id · actor · capability_id · artifact_handles · source_runtime · source_agent · timestamp · visibility · policy_context · result_status · evidence_refs), specialized as DereferenceEvent, CapabilityInvocationEvent, ToolResultEvent, PolicyDecisionEvent, and so on. The rule is normalize first; evaluate and reconstruct second — so the same policy and forensic queries run over live hooks and over an imported transcript. Events are content-addressed and appended to a physically-ordered ledger that never erases a rewind, an abandoned branch, or a superseded proposal.

2. Monitor-first; three effects

The default is OBSERVE. The three effects are OBSERVE · REQUIRE_REVIEW · DENY, and DENY is permitted only where the action has not yet occurred, the payload is fully typed, evaluation completed cleanly, the control channel is supported, the decision record was durably accepted, and the host can honor the result.

EventPossible effect
DereferenceEvent before expansionDENY-capable
Capability invocation before a side effectDENY-capable
Tool result after executionOBSERVE only
Imported transcriptOBSERVE only
Scratch → durable promotionDENY / REQUIRE_REVIEW
Public artifact publicationDENY / REQUIRE_REVIEW

Severity is orthogonal to enforceability. A critical finding detected only after the action is unblockable; a low-severity but irreversible action may still need a human gate. Enforcement is never derived from severity.

3. The clean-decision gate

A DecisionGate returns one of ALLOW · DENY · NO_OVERRIDE · REQUIRE_REVIEW · UNABLE_TO_DECIDE. It denies only when every required step succeeded cleanly — input parsing, rule evaluation, evidence persistence, audit persistence, and correlation-state access — so a malformed input or an internal error suppresses the deny rather than faking a safety decision.

DecisionGate inputs:
  input_valid · capability_supported · rule_evaluation_complete
  evidence_persisted · audit_event_persisted · correlation_state_available
  host_can_enforce · no_relevant_internal_error

  clean & DENY & host_can_enforce   -> DENY
  clean & DENY & !host_can_enforce  -> NO_OVERRIDE   (detected, cannot block)
  not clean                         -> UNABLE_TO_DECIDE
                                       (fail-open or fail-closed, declared per surface)

UNABLE_TO_DECIDE is the point: an internal failure must never render as an affirmative ALLOW. For high-risk surfaces, policy declares that it fails closed.

4. Trajectory (sequence) rules

Single-event rules catch "write protected file" or "dereference private artifact." Trajectory rules catch multi-step behavior and cite the exact events that formed the sequence:

A TrajectoryRule declares its ordered steps, a within time window, correlation_keys that must share a value across the match, an effect, a severity, and an enforcement_mode. Its findings feed Discovery Runtime as inputs — a risky sequence motivates a Residual and an Investigation, never automatic truth.

5. Enforcement uses a stricter subset than detection

Two parsers. The detection parser is broad and tolerant — it surfaces arbitrary scripts and dynamic tool chains for forensics. The enforcement parser is narrow, static, and deterministic — it blocks only on typed tool calls, statically-parsed commands, known targets, and bounded parameters. Ambiguous or dynamic cases route to REQUIRE_REVIEW or monitor-only, so enforcement never denies on text that may not execute. This is part of the whitepaper-v9 SandboxProfile spec (network-denied default for code analysis, privilege drop, immutable input snapshots, output-artifact allowlists, secret non-serialization).

6. Don't leak operator detail into the control channel

The model-facing denial stays minimal — "Action denied. Do not retry or attempt an equivalent action." Rule ids, evidence, the matched trajectory, the policy version, affected artifacts, and rationale travel a separate operator ledger. This prevents the model from adapting around exact rules, avoids leaking secrets or policy, keeps control payloads small, and preserves full human auditability. An approved, safe explanation may optionally be exposed.

7. Reference authorization

Reference-first context improves security only if handles are capability-safe. Every dereference carries a visibility/tenancy check; projections are least-privilege; leases are short-lived and purpose-restricted; and — critically — no authority is inherited merely because a model possesses an identifier. The gate defends against reference-substitution and stale-handle attacks, and each dereference is an auditable DereferenceEvent.

8. Per-host coverage matrix

"Supports agent X" must never imply complete visibility. An authoritative matrix records, per integration, whether it offers typed calls, live events, at-rest replay, a pre-action gate (which alone makes real DENY possible), subagent capture, hosted-tool capture, and known gaps.

IntegrationTypedLiveAt-restPre-action gateSubagentsKnown gaps
Sidekickyesyesyesyesyeshosted-tool bodies not captured
OpenAI Responses · Codexyes—yes—dependsno synchronous pre-action hook → monitor-only
OpenClaw · Claude Code · Gemini CLIadapter-specific — coverage documented per adaptervaries by adapter

9. Portable forensic bundles — and their limits

A Mission Case Bundle packages a mission's ContextViews, dereference/capability/tool events, policy decisions, artifact handles, findings, and logs behind a SHA-256 manifest, with build · verify · timeline · replay · diff. It is valuable for audits, incident review, benchmark reproduction, and provider disputes.

Important limit, stated plainly: a manifest proves the bundle's internal consistency — not its completeness or source authenticity. Coverage is bounded by what each surface actually exposes (see the matrix).

10. v0.3.0 — one canonical, cross-runtime security contract

Everything above described a model; v0.3.0 makes it a contract. The primitives that were spread across the runtimes — identity, ABAC, sandbox, tenancy, policy, the decision effects, the trajectory rules — are canonicalized into the open runtime-contracts protocol layer as byte-identical, content-addressed shapes that every runtime (Python and Go) reproduces hash-for-hash. It stays opt-in — a security-free mission is byte-identical to before and carries no new dependency — but is fail-closed once declared: the moment a capability or mission declares isolation, required authority, a policy, or a digest pin, it can no longer be silently bypassed.

Canonical contractWhat it fixes by construction
SecurityDecision / SecurityVerdictDeny-wins combination; one decision type every plane returns and every runtime agrees on.
AuthorityContextA delegation chain that only ever narrows — narrow() refuses to widen scope, budget, or lifetime, so child ⊆ parent is an invariant, not a check. Every side effect resolves to one chain_ref.
RuntimeSecurityEvent + SecurityTrajectoryThe runtime's own record, emitted at the boundary from the registry-declared surface — hashes, never raw payloads, and not agent-reported, so a compromised operator cannot lie by omission.
GovernanceDisposition + ContainmentALLOW · REQUIRE_REVIEW · NO_OVERRIDE · DENY drives a containment state machine (RUNNING→CONTAINING→CONTAINED→REVIEW→RECOVERED); NO_OVERRIDE refuses any later recovery.
CredentialGrantA leased reference (scope · authority · material hash) — never the secret, and its canonical form omits the live redemption handle so no fingerprint carries a token.
CapabilityDescriptor.admit()Supply-chain gate: a content-digest that no longer matches its pin is DENY (substitution / poisoned rebuild); untrusted provenance is DENY; below trust-floor is REQUIRE_REVIEW.

Intent-aware runtime security

Because the runtime knows the intended plan, it compares plan vs observed: a capability that runs but was never planned is a divergence signal, surfaced as REQUIRE_REVIEW even when each individual call was permitted. Correctness is a property of the trajectory, not the single step — correlate() folds a series of individually-permissible events (sensitive read → external egress) into a disposition.

The epistemic layer — evidence may not grant itself authority

Retrieved evidence may influence belief, but it may never grant itself authority. Adversarial validators screen every evidence item for prompt/instruction injection, self-granted authority, hidden embedded instructions, source spoofing (a trusted-source claim without a verifiable hash), poisoned tool metadata, classification escalation, and cross-source contradiction — conservative by construction, so a match is REQUIRE_REVIEW or DENY, never a silent pass.

The shapes are open; the enforcement is a plugin. The canonical contracts live in runtime-contracts; the real sandbox, the Vault-backed credential broker, the identity/ABAC plane, the correlation-policy tuning, and the OWASP pattern corpus are injected enforcement planes. Absent a plane, behaviour is unchanged — but a declared isolation/authority/pin with no plane wired fails closed rather than running unconfined.

Two versions diverge from the same contracts. The open runtime — the contracts, protocol shapes, and reference implementations — is AGPL and inspectable: runtime-contracts, agentic-os, context-runtime. The production enforcement behind the seams — sandbox, credential broker, correlation/SIEM, OWASP corpus, deployment adapters — is the private Enterprise Edition. Same protocol, stronger private enforcement behind the same seams.

11. Mission-native OpenTelemetry correlation

Security, replay, governance and cost optimization all depend on one causal record. So the telemetry substrate is built on a single rule: the Mission is the root trace, and every deployment substrate nests underneath it. Discovery, planner decisions, context/evidence choices, governance verdicts, capability invocations and reconciliation are spans in one tree rooted at the Mission; when a node deploys through Argo Workflows, Kubernetes, Terraform, a cloud API or an edge device, that substrate's spans hang below the causing node — never the other way around. One tree answers both "why did we decide to deploy?" and "which pod/artifact/synchronization operation took 4 seconds?".

The identity is a W3C-Trace-Context-compatible TraceContext in the open contract, minted by the Mission and only ever propagated down (there is no operation that adopts an incoming substrate trace as the root). Trace ids are content-addressed, like every other runtime identity — so a replay reproduces the exact trace instead of a fresh random one. Native telemetry is the semantic source of truth; OpenTelemetry is the interoperability/export layer. The same canonical event feeds three sinks with no re-derived semantics:

Canonical Runtime Event  (RuntimeSecurityEvent + TraceContext)
        │
        ├──► runtime event / artifact store
        ├──► governance / security
        └──► OpenTelemetry exporter ──► Argo / K8s / app spans ──► Tempo / Jaeger

Two plugins, not one Argo-specific one, so no sink invents its own event meaning: runtime-telemetry (the canonical bridge + OTel export) and deployment-argo (the Argo execution adapter — it propagates the Mission traceparent+baggage into the workflow, nests Argo's controller/pod/artifact spans under the Mission node, and captures the workflow UID as execution evidence). Argo sits behind a version guard because its own tracing is labelled beta and may change incompatibly — below the collector's supported Argo version, or with no collector, it degrades to baggage-only propagation, so the Mission telemetry contract is never bound to Argo's current span schema. OTel correlation is on by default; the substrate adapter is optional per deployment backend.

12. The execution membrane — the side-effect boundary

Everything above decides whether an action is admissible. The membrane governs the last step — the physical side effect — and answers a second question semantic governance cannot: even if the agent is wrong or compromised, what can it physically reach? An approved capability does not run against ambient credentials on an open host; it runs against a signed ExecutionEnvelope.

Approved capability
      │
ExecutionEnvelope   mission · plan · authority · credential-refs · idempotency · expiry
      │             + ExecutionConstraint  (network · filesystem · resource)
      ▼
Execution membrane  validate binding → resolve credential (server-side) → contain → execute
      │
ExecutionReceipt    envelope-bound · attestable  — a replaceable executor cannot self-certify

The envelope's identity is the content hash of its own canonical form, so tamper-evidence is a property of the type, not a wrapper around it: change any field — parameters, capability, authority, target, expiry — and it is a different envelope no authority ever issued. Credentials travel as references — the model and the agent never hold a reusable secret; the broker resolves it server-side, after authority and policy, only inside the boundary. The receipt is bound to the envelope by hash so it enters the Mission ledger without trusting the executor's word; for a remote or untrusted host, an attestation is what makes it believable.

Containment is deny-by-default and driven by one canonical ExecutionConstraint (an empty constraint grants nothing). The open runtime ships a rootless reference membrane — an env-scrubbed subprocess with setrlimit resource ceilings and a contained working directory — honestly scoped to a trusted host: it defends against a compromised agent escalating beyond its capability, not against a malicious host. The hardened tier — OS namespaces / seccomp / a microVM, and remote-attested execution — is the enterprise runner, and it derives from and composes the open one over the same ExecutionConstraint, so open and enterprise are one containment model, not two.

Verification as a planner choice

The cost-based planning that already selects retrieval and models extends to verification: a ladder of verify.* capabilities ordered by assurance — STRUCTURAL → DETERMINISTIC → EVIDENTIAL → SEMANTIC → ENSEMBLE → HUMAN — from which the planner picks the cheapest sufficient verifier for each action's risk. Two rules keep that from becoming "let the model pick a cheap check": it is fail-closed (nothing below the required tier counts; no sufficient verifier means the action is not promoted), and a lone model verdict is never the final gate (a non-deterministic judgment is evidence, not proof — a deterministic check, an ensemble, or a human must close it). A gating verifier runs before the side effect, so a failing check withholds the envelope rather than annotating an action that already happened.

The properties are benchmarked, not asserted. On a trusted host the membrane admits no unauthorized side effect, exposes no reusable credential to the agent, produces no duplicate side effect under crash-and-replay, and refuses every tampered or expired envelope. The verification ladder reaches blanket-human safety — no false admission — at a small fraction of blanket-human cost, where an "always semantic judge" baseline admits flaws above its tier.

What this is not

The event stream is raw normalized observation, not the durable knowledge model. RuntimeEvents stay distinct from Finding / Investigation / Evidence; an event may motivate a Finding but never becomes organizational truth automatically. And a flat expression language is fine for endpoint rules but is not the runtime's universal semantics — typed capabilities, composition rules, graph relations, and deterministic operators are richer.

ReDevOps security model — whitepaper v10, contracts v0.3.x. The RuntimeEvent contract ships in Python (agentic_os/mission/events.py); the TrajectoryEngine · DecisionGate · MissionCaseBundle · CoverageMatrix are implemented in Go (go/events · go/evaluation, self-test suite green), with Python parity now shipped in the v0.2.0 Governance plane (byte-identical conformance). The v0.3.0 canonical security contracts (§10) — SecurityDecision · AuthorityContext · RuntimeSecurityEvent · CredentialGrant · Containment and the adversarial validators — ship in the open runtime-contracts protocol layer with Python↔Go conformance; the enforcement planes (sandbox, credential broker, correlation/SIEM, OWASP corpus, identity) are the private injected layer. The execution boundary (§12) — ExecutionEnvelope · ExecutionReceipt · ExecutionConstraint and the verification ladder (AssuranceTier · VerifierDescriptor · is_sufficient) — ships in the open runtime-contracts, with the rootless reference membrane and the verification planner in agentic_os.mission (Python reference; the hardened sandbox is an enterprise runner over the same constraint). Companion to whitepaper v10 and the v9 amendment.