ArchitectureSecurity Model

Core Concepts & Architecture

Understand the theoretical foundation and security guarantees of SICTACK: why prompt filters fail, how canonical action hashes prevent replay attacks, and why fail-closed execution boundaries protect production systems.

1. The Execution Boundary

Modern Large Language Models (LLMs) are probabilistic and inherently vulnerable to prompt injection, jailbreaking, and indirect prompt injection through untrusted external data (such as emails, scraped websites, or database records).

Relying solely on system prompts or prompt-level guardrails is fundamentally insecure: an attacker who compromises the model's linguistic context can trick it into invoking dangerous tools.

The SICTACK Principle

Security enforcement must occur at the point of execution, outside the LLM's probabilistic reasoning loop.

SICTACK operates as a deterministic gatekeeper between the model's generated tool invocation and the actual runtime execution environment. Even if the model is 100% convinced it should drop a database table, SICTACK intercepts the tool call, verifies policies and permissions deterministically, and halts the call before a single byte touches external systems.

2. Zero-Trust Agent Identity

In an enterprise ecosystem, not all agents have the same privileges. A customer-facing support agent should never share the permissions of an automated accounting reconciliation worker.

SICTACK binds every execution request to an authenticated agent_id and a set of explicit capability scopes (permissions). Policy evaluation takes into account:

  • The identity of the calling agent (agent_id)
  • The granular permissions possessed by that agent (permissions)
  • The target tool name and exact JSON argument payload
  • The active task-scoped intent authorization context

3. Intent Authorization Contexts

Traditional API gateways grant broad static permissions (e.g., "can write to database"). However, an agent should only be allowed to modify a database when it is actively executing a specific authorized workflow.

Intent Contexts are short-lived, task-scoped execution authorization windows created via POST /api/v1/intent-contexts. Each context defines:

Time-To-Live (TTL)

Automatically expires after the task completes or timeout expires.

Allowed Tool Scope

Restricts tool execution strictly to tools needed for this specific goal.

Task Correlation

Correlates all downstream tool calls and audit events to a single user goal.

4. Canonical Action Hashes

To prevent parameter tampering and ensure verifiable auditing, SICTACK computes a deterministic SHA-256 hash over every tool invocation:

action_hash_concept.py
# Canonical Hash Calculation Mechanism
import hashlib
import json

# Arguments are sorted by key to guarantee identical bytes regardless of key insertion order
canonical_payload = json.dumps(
    {"tool_name": "transfer_funds", "arguments": {"amount": 250.0, "recipient": "ACC-9921"}},
    sort_keys=True,
    separators=(",", ":")
)
action_hash = hashlib.sha256(canonical_payload.encode("utf-8")).hexdigest()
# -> "a7f3b890c21e..."

Because arguments are strictly sorted and formatted prior to hashing, identical arguments produce identical hashes regardless of dictionary key ordering, while any modification to an argument (e.g. changing amount=250.0 to amount=250000.0) produces a completely different hash.

5. Deterministic Policy Engine

Policy evaluation is non-probabilistic. Rules are evaluated sequentially:

ActionBehaviorException / Outcome
allowTool execution proceeds immediatelyNone (Returns tool result)
require_approvalSuspends execution, creates an approval request ticket bound to action hashRaises ApprovalRequiredError
denyHalts execution immediately, logs security threat eventRaises PermissionDeniedError

6. Approval Lifecycle & Replay Defense

Human-in-the-loop approvals are guarded by four rigorous cryptographic constraints:

Single-Use Token Guarantee

When an operator approves a request, an approval token is issued. Upon calling execute_with_approval, the token is consumed (consumed = True). Any subsequent execution attempt with that same approval ID raises an ApprovalReplayError.

Cryptographic Parameter Binding

The approval request stores the exact action_hash. When the approval is presented to execute the action, SICTACK recomputes the hash of the current payload. If an attacker modifies even a single parameter value, an ApprovalMismatchError is raised.

TTL & Expiration Enforcement

Approvals carry an expires_at timestamp (default 300 seconds). Presenting an approval after expiration raises an ApprovalExpiredError.

7. Fail-Closed Architecture

SICTACK follows a strict fail-closed philosophy:

Guaranteed Denial on Failure

If an unknown tool is invoked, if a network timeout occurs connecting to the centralized gateway, if a policy evaluation encounters invalid syntax, or if an approval is missing or unverified, SICTACK always denies execution. It never fails open under any circumstances.