Skip to content

Governing OpenFang Agents with TapPass

Zero-code AI governance for OpenFang. one line change, full compliance.

OpenFang is an open-source Agent OS that orchestrates AI agents with tools, memory, and multi-agent messaging. TapPass adds enterprise governance: PII detection, prompt injection blocking, secret scanning, rate limiting, and audit trails.

Together, they form a compliant agent runtime: OpenFang handles execution, TapPass handles compliance.

Change one line in any OpenFang agent’s agent.toml:

[model]
provider = "openai"
model = "gpt-4o-mini"
base_url = "http://tappass.internal:9620/v1" # ← This is all you need
api_key_env = "TAPPASS_API_KEY" # ← TapPass API key, not OpenAI

That’s it. Every LLM call now flows through TapPass’s 7-step governance pipeline.

StepWhat It DoesExample
validate_inputBlocks oversized/malformed requests50KB limit, null bytes
detect_piiRedacts PII before it reaches the LLMSSN, email, CC, IBAN, phone
detect_secretsBlocks API keys and credentialsAWS keys, GitHub tokens
detect_injectionBlocks prompt injection attempts”Ignore all instructions…”
call_llmMakes the governed LLM callRate-limited, circuit-broken
scan_outputRedacts PII/secrets in LLM responsesGenerated customer records
detect_unicodeBlocks homoglyph/bidi attacksUnicode evasion attempts

PII Detection: 24 Obfuscation Techniques Defeated

Section titled “PII Detection: 24 Obfuscation Techniques Defeated”

TapPass catches PII even when agents or users try to obfuscate it:

  • Separators: 234.56.7890, 234/56/7890, 234|56|7890
  • Unicode dashes: 234–56–7890 (em dash, en dash, minus sign, 7 more)
  • Fullwidth: 234-56-7890
  • Email obfuscation: john[at]gmail[dot]com, john@gmail.com
  • URL encoding: john%40gmail.com
  • Leetspeak: j0hn@gm4il.c0m
  • Whitespace bombs: 2 3 4 - 5 6 - 7 8 9 0
  • And 17 more techniques (see Red Team Report)
Terminal window
# Start TapPass
cd auth-guard && .venv/bin/uvicorn tappass.api.main:app --port 9620
# Start OPA
opa run --server --addr :8181 policies/rego/
# OpenFang agents auto-route through TapPass via agent.toml
openfang run assistant
Terminal window
docker compose -f docker-compose.openfang.yml up -d
# Includes: TapPass + OPA + Caddy TLS
# OpenFang agents connect to: https://tappass.yourdomain.com/v1
# Add to OpenFang agent deployment:
env:
- name: OPENFANG_MODEL_BASE_URL
value: "http://tappass-service.governance.svc:9620/v1"
- name: TAPPASS_API_KEY
valueFrom:
secretKeyRef:
name: tappass-credentials
key: api-key

Every governed request produces an audit trail:

{
"agent_id": "assistant",
"model": "gpt-4o-mini",
"steps": [
{"step": "detect_pii", "detected": true, "action": "redact", "types": ["SSN"]},
{"step": "detect_injection", "detected": false},
{"step": "scan_output", "detected": false}
],
"blocked": false,
"duration_ms": 1240
}

Set up alerts for governance events:

Terminal window
export TAPPASS_ALERT_WEBHOOK_URL=https://hooks.slack.com/services/T.../B.../xxx
export TAPPASS_ALERT_WEBHOOK_TYPE=slack
PropertyStatus
Fail-closed (OPA down → block all)
Streaming PII redaction
6 message roles scanned
Multimodal content support
Rate limiting per agent
Zero crashes from malformed input✅ (25/25 fuzz tests)
100% PII detection under concurrent load