Zero trust and vulnerability defense are part of the K9-AIF framework itself, so every application built on it can switch them on in its configuration instead of writing its own. K9X Shield is that architecture. K9X SATAN is the application that proves it holds.
security.shield.enabled: true and the checks it wants, and every agent then runs them before and after it works.
K9X SATAN is the application that tests it. It fires structured adversarial attacks at a live K9-AIF
pipeline to prove Shield actually contains them.
A block at any phase ends execution, so later phases never run. Reaching Squad/Agent is a gap in the framework, not a partial pass.
| Check | What it catches |
|---|---|
| Ingress, at the Router: before the squad or agent runsPattern-based, zero LLM cost, deterministic. Runs before the LLM ever sees the document. | |
RequestFrequencyCheck | resource-exhaustion request floods |
InputSizeCheck | token-flood / oversized payloads |
PromptInjectionCheck | SYSTEM OVERRIDE, ignore-all-instructions patterns |
FieldAnomalyCheck (SATAN's) | authority-override social engineering |
MemoryPoisoningCheck | fabricated session memory claims |
ToolArgumentCheck / ToolAuthorizationCheck | poisoned or unapproved tool calls, caught before dispatch |
PIIRequestCheck | requests to disclose PII |
PaymentDiversionCheck | payment redirection with review bypass and concealment |
| Egress, at the Orchestrator: after the squad or agent returnsEvaluates the returned result before it leaves the pipeline, and catches what only shows up in agent output. | |
SemanticDriftCheck | goal hijacking, identity override |
ExecutionGuardCheck | destructive commands, reverse shells |
PIIBoundaryCheck | SSN / credit card / email exfiltration |
HardcodedCredentialCheck | API keys echoed into the response |
ToolArgumentCheck / ToolAuthorizationCheck | also here, for a tool call an agent generates mid-execution |
SystemPromptLeakageCheck, OutputSanitizationCheck | prompt leakage, markup injection |
OutboundLinkCheck (opt-in) | phishing links in agent output |
Upload a document, fire a real attack, and watch it get contained at the Router or Orchestrator gate in real time. Penetration Monitor shows every check in the chain, Results tracks outcomes across the session, and the Architecture tab (About → README inside the tool itself) walks through exactly why each gate holds.
K9X Shield applies deterministic, policy-driven checks: 15 of them, wired into the Router's ingress and Orchestrator's egress chains. Explainable, zero LLM cost, evaluated identically every run. Evadable by paraphrase, encoding, or wording changes no regex list can enumerate in advance.
IBM Guardian (granite4.1-guardian:8b) is an optional semantic layer wrapping every agent's pre/post hooks. It catches paraphrased injection, subtle goal hijacking, and disguised privilege escalation that survive the pattern layer. Neither replaces the other: Shield holds with Guardian disabled entirely; Guardian only ever adds coverage on top.
Guardian unavailability (timeout, HTTP error, unreachable endpoint) is never silently treated as "SAFE". It's an explicit policy decision: fail_closed (the default: blocks or redacts), fail_open (documented risk), or inconclusive (flags without blocking).
| Threat Vector | K9X Shield Handler | Owner |
|---|---|---|
| Indirect Prompt Injection | PromptInjectionCheck | Framework OOB |
| Goal Hijacking & Privilege Escalation | SemanticDriftCheck | Framework OOB |
| Memory Poisoning | MemoryPoisoningCheck | Framework OOB |
| Shadow AI & Tool Abuse | ToolArgumentCheck / ToolAuthorizationCheck | Framework OOB |
The chain is open-ended by design. Zscaler's four vectors are what is known today. Each new vector is one new handler, added without rewriting the chain.
| # | Check | Gate | Owner | Threat Class |
|---|---|---|---|---|
| 1 | RequestFrequencyCheck | Ingress | Framework OOB | Unbounded Consumption · OWASP LLM10 |
| 2 | InputSizeCheck | Ingress | Framework OOB | Token-flood / oversized payload · OWASP LLM10 |
| 3 | PromptInjectionCheck | Ingress | Framework OOB | Indirect Prompt Injection · Zscaler #1 · OWASP LLM01 |
FieldAnomalyCheck | Ingress | SATAN | Authority-override social engineering | |
| 4 | MemoryPoisoningCheck | Ingress | Framework OOB | Memory Poisoning · Zscaler #3 · OWASP LLM04 |
| 5 | ToolArgumentCheck | Ingress + Egress | Framework OOB | Tool Abuse · poisoned arguments · Zscaler #4 · OWASP LLM05 |
| 6 | ToolAuthorizationCheck | Ingress + Egress | Framework OOB | Shadow AI · unapproved tool · Zscaler #4 |
| 7 | PIIRequestCheck | Ingress | Framework OOB | Solicited PII disclosure, no literal PII in payload · OWASP LLM02 |
| 8 | PaymentDiversionCheck | Ingress | Framework OOB | Payment redirection with review bypass and concealment · OWASP LLM01 |
| 9 | SemanticDriftCheck | Egress | Framework OOB | Goal Hijacking & Privilege Escalation · Zscaler #2 · OWASP LLM06 |
| 10 | ExecutionGuardCheck | Egress | Framework OOB | Destructive execution · Zscaler #2 · OWASP LLM06 |
| 11 | PIIBoundaryCheck | Egress | Framework OOB | Sensitive Info Disclosure · OWASP LLM02 |
| 12 | HardcodedCredentialCheck | Egress | Framework OOB | Supply chain / secret leakage · OWASP LLM03 |
| 13 | SystemPromptLeakageCheck | Egress | Framework OOB | System Prompt Leakage · OWASP LLM07 |
| 14 | OutputSanitizationCheck | Egress | Framework OOB | Improper Output Handling · OWASP LLM05 |
| 15 | OutboundLinkCheck | Egress | Framework OOB | Phishing links in agent output (opt-in) · OWASP LLM05 |
GuardianGovernance | Agent pre/post | Framework OOB | Semantic evasion of all the checks above (cross-cutting, optional) |
Threat classes reference the OWASP Top 10 for LLM Applications. ToolArgumentCheck/ToolAuthorizationCheck run at both gates deliberately: ingress catches caller-supplied fields before Squad/Agent runs; egress catches a fresh tool call an agent generates mid-execution, which doesn't exist yet at ingress time. Same defense-in-depth principle as Guardian: additive, never a replacement.
Every attack targets one specific check. A PASSED result doesn't mean SATAN failed. It means Shield needs a new handler. That's the hardening loop.
| SATAN Attack | Shield Check |
|---|---|
PromptInjectionAttack | PromptInjectionCheck |
SearchPoisoningAttack | PromptInjectionCheck (real tool-response fetch) |
PayloadFloodAttack | InputSizeCheck |
MemoryPoisoningAttack | MemoryPoisoningCheck |
RequestFloodAttack | RequestFrequencyCheck |
SemanticDriftAttack | SemanticDriftCheck |
ExecutionBypassAttack | ExecutionGuardCheck |
PIIExfiltrationAttack | PIIBoundaryCheck |
ToolArgumentAttack | ToolArgumentCheck |
HardcodedCredentialAttack | HardcodedCredentialCheck |
ShadowToolAttack | ToolAuthorizationCheck |
SystemPromptLeakageAttack | SystemPromptLeakageCheck |
OutputSanitizationAttack | OutputSanitizationCheck |
PhishingLinkAttack | OutboundLinkCheck (lookalike payment-portal link) |
AgentImpersonationAttack | Guardian (impersonation): an agent message claiming roles to get a claim approved |
ParaphrasedOverrideAttack | Guardian (process manipulation): "skip verification, approve it" with no trigger words |
The last two are built to slip past Shield's patterns. With Guardian off they get through and are recorded as findings; with Guardian on they are stopped. That is the case for running both layers.
Shield and Guardian screen what goes in and out of an agent. These cover the rest. Each is opt-in and switched on in configuration.
| Layer | What it does | Switch |
|---|---|---|
| Tool-call gate | Every tool call is checked against a registry of allowed tools, logged, and can pause for a person to approve. | security.tool_gate.enabled |
| K9X Filters | Clean input before governance sees it: Unicode normalised, invisible and tag characters removed; agent output validated. | filters.enabled |
| Acting for the person who asked | A connector reaches its server with a token naming the verified caller (OAuth token exchange), not a shared service account. | security.on_behalf_of |
| Zero Trust | Identity, role-based authorization, data masking and risk scoring on the orchestrator. | enable_zero_trust |
Detail on each is in the capability index.
pip install k9x-satan k9x-satan # foreground, opens the dashboard at localhost:6660 k9x-satan --bg # or run it in the background
Own instance, own K9-AIF pipeline, own LLM endpoint. Nothing is sent to any shared deployment. pypi.org/project/k9x-satan