Edictum
Security & Compliance

Security Overview

Edictum's threat model, security controls, and compliance posture. What it defends against, what it does not, and the evidence behind it.

AI Assistance

Right page if: you need a unified view of Edictum's security architecture -- threat model, controls, test results, and compliance mapping. Wrong page if: you need the detailed behavior of a specific security feature -- see the linked pages below for fail-closed guarantees, adversarial testing, or compliance mappings. Gotcha: Edictum enforces contracts on tool calls, not on LLM text generation. It is one layer in a defense-in-depth stack. Model safety, OS sandboxing, and network policies handle the other layers.

Edictum is a deterministic enforcement layer between an AI agent's decision to act and the action itself. Contracts are evaluated outside the LLM, on structured data (tool name, arguments, principal), not on natural language.

Threat Coverage

ThreatControlContract type
Unauthorized tool executionPreconditions deny before executiontype: pre
Data exfiltration via outputPostconditions redact sensitive patternstype: post
Privilege escalationPrincipal-based contracts enforce role permissionstype: pre
Rate abuse / runaway agentsSession contracts cap per-tool, per-session, per-attempttype: session
Path traversal / file accessSandbox contracts with within/not_within boundariestype: sandbox
Secret leakageBuilt-in deny_sensitive_reads() for .env, .ssh/, .aws/credentialstype: pre
Command injectionBashClassifier detects shell operators; sandbox command allowliststype: sandbox
Contract tamperingSHA-256 version hashing; Ed25519 bundle signing (console, server-side; SDK verification planned)Infrastructure
Unauthorized sub-agent spawningContracts restrict tools that create agentstype: pre

Out of Scope

Edictum operates at the tool-call layer. These threats exist at other layers and require other controls:

ThreatWhy out of scopeUse instead
Write side effects already completedPostconditions run after execution; WRITE actions already donePreconditions + sandbox to deny BEFORE execution
Kernel-level sandboxingIn-process library; no OS isolationgVisor, Firecracker, seccomp, AppArmor
LLM hallucination (text output)No enforcement point for text-only responsesContent moderation, RAG, output filters
Network-level attacksDoes not inspect network trafficKubernetes NetworkPolicy, service meshes, WAF
Prompt injection on text responsesOnly enforces on tool-call executionInput sanitization, prompt engineering

Adversarial Testing

Four scenarios tested against GPT-4.1, DeepSeek v3.2, and Qwen3 235B with identical contract bundles:

ScenarioResult
Retry after deny (agent retries a denied tool call)All retries denied across all models
PII exfiltration (agent tries to leak data via allowed tools)Caught by postcondition PII patterns
Cross-tool chain (multi-step exfiltration)PII redacted from output
Role escalation (agent claims higher privilege)Principal check denied escalation

DeepSeek was more aggressive than GPT-4.1 in exfiltration attempts — model safety is complementary to contracts, not a replacement.

The core library has 114 @pytest.mark.security tests covering shell metacharacter bypasses, sandbox symlink escapes, input injection, backend failure modes, and session concurrency. The console has 43+ adversarial tests across 8 security boundaries (S1-S8).

See Adversarial Testing for full scenarios and results.

Fail-Closed Design

Every ambiguous failure within contract evaluation results in deny. False positives are retryable. False negatives may not be. Note: when no contracts match a tool call, the default is allow — contracts are opt-in. Add a catch-all tool: "*", effect: deny contract for deny-by-default behavior.

FailureOutcome
Contract evaluation errorDeny (with policy_error: true in audit)
Malformed YAML bundleReject load, keep previous contracts
Type mismatch in conditionDeny (sentinel evaluates to true)
Console unreachableAgents continue with cached contracts
Session storage errorDeny
Unknown contract typeSkip (silently ignored)
No matching contractsAllow (contracts are opt-in)

To enforce deny-all-by-default, add a catch-all contract: tool: "*", effect: deny.

See Fail-Closed Guarantees for all seven scenarios.

Console Security Boundaries

The console enforces 8 security boundaries, each with dedicated adversarial tests:

BoundaryThreatDefense
S1: Session validationAccount takeoverRedis session tokens; forged/expired cookies rejected
S2: API key authUnauthorized agent accessRevoked keys excluded; malformed prefixes rejected
S3: Tenant isolationCross-tenant data leakEvery query filtered by tenant_id; returns 404, not 403
S4: Approval stateUnauthorized tool executionImmutable once decided; double-approve returns 409
S5: SSE channelContract/event leakEvents filtered by env + tenant_id
S6: Bundle signingTampered contract deploymentEd25519 signatures (server-side); private key encrypted at rest (NaCl SecretBox). SDK verification planned.
S7: Bootstrap lockPost-bootstrap privilege escalationAdmin creation only when zero users exist
S8: Rate limitingCredential brute forcePer-IP sliding window (Redis sorted sets)

See Console Security Model for details.

Known Limitations

LimitationImpactMitigation
String-based path matchingRelies on realpath() + prefix comparisonResolves symlinks and ..; catches common traversals
Heuristic bash parsingBashClassifier is not AST-basedDetects 14 shell operators; sandbox command allowlists add depth
TOCTOU race (symlinks)Symlink created between eval and execution could escapeOS-level sandboxing (gVisor, seccomp) for kernel enforcement
Postcondition WRITE fallbackredact/deny effects downgrade to warn for WRITE/IRREVERSIBLE toolsUse preconditions to deny dangerous writes before execution

Compliance

Edictum maps to four compliance frameworks:

  • EU AI Act (Articles 9, 14) — risk identification, mitigation, documentation, human oversight
  • SOC 2 (CC6) — logical access, credentials, authorization, audit trail
  • OWASP Top 10 for LLM Applications (2025) — prompt injection, insecure output, unbounded consumption, access control
  • OWASP Top 10 for Agentic Applications (2026) — 6 of 10 risks mitigated

See Compliance Mapping for detailed evidence and configuration per framework.

Defense in Depth

Edictum is one layer. A complete security posture combines:

LayerToolWhat it covers
LLM safetyModel provider safety filtersHarmful text generation
Tool-call enforcementEdictumWhat the agent is allowed to do
OS sandboxinggVisor, Firecracker, seccompProcess isolation, syscall filtering
Network policiesK8s NetworkPolicy, WAFTraffic filtering, egress control
Input validationApplication codeSchema validation, sanitization

Next Steps

Last updated on

On this page