Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

[Feature] Content-level governance boundary — PII detection, prompt injection defense, and cost budgets for Bot tool arguments

オープン
#86 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
30/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
typescript

調査の方向性

まず、issue に記載されているサーバーゲートウェイパイプラインの位置を特定します。特に、CEL 評価の後で computer call の前にある箇所を確認し、既存の boundary plugin インターフェースをレビューします。提案されている gateway plugin、boundary preset、agent middleware のエントリポイントを比較します。統合パスの方針と、そのコンテンツガバナンスの動作が定義され、適切なプロジェクトテストでカバーされれば、作業は完了です。

索引モデルが issue の本文から書いたものです。

説明

Problem

OpenBot's gateway handles infrastructure-level governance brilliantly — CEL policies on browser URLs, file paths, shell commands, and MCP tool classification. But there's a gap at the content level:

  1. PII in tool arguments — A Bot can pass an SSN, credit card number, or email to a tool without the gateway noticing, because CEL evaluates tool.name and page.url, not the argument content itself.

  2. Prompt injection via tool inputs — If a retrieved document or user message contains "ignore previous instructions...", that flows through the AG-UI endpoint into the Bot's tool arguments. The gateway sees a valid tool call to a permitted target — the adversarial content is invisible to CEL.

  3. Per-session cost budgets — The gateway records actions but doesn't enforce cumulative spend limits. A Bot can loop tool calls indefinitely without hitting a cost ceiling.

  4. Secret leakage in arguments — A Bot might pass api_key=sk-abc123... as a tool argument. The gateway correctly redacts secrets from the audit trail, but doesn't prevent the call from executing with the secret in-flight.

Proposed Solution

Add a content-level governance evaluator that runs alongside CEL, inspecting the content of tool arguments (not just tool names and targets). This would fire between "policy evaluated" and "call the computer" in the gateway pipeline.

One implementation: TealTiger — deterministic, in-process, no LLM in the evaluation path, <2ms per check. Already provides:

Check What It Catches
PII detection SSN, credit card, email, phone in tool args
Secret detection API keys, tokens, credentials
Prompt injection Instruction override, DAN, delimiter injection, system prompt override (8 patterns)
Cost budget Cumulative session spend with hard-stop
Argument validation SQL injection, path traversal in tool inputs

It could integrate as:

Option A — Gateway plugin:

// In the server gateway, after CEL evaluation, before calling computer
const contentDecision = await tealtigerEvaluate({
  toolName: resolvedTarget.tool,
  arguments: resolvedTarget.input,
  botId: bot.id,
  sessionCost: auditRow.cumulativeCost,
});
if (contentDecision.action === "DENY") {
  return refuse(contentDecision.reason);
}

Option B — Boundary preset:
A preset at /admin/boundaries that enables content-level checks:

# Content governance preset
name: "Content Protection"
rules:
  - scope: tool_arguments
    check: pii
    action: deny
    categories: [ssn, credit_card, email]
  - scope: tool_arguments
    check: prompt_injection
    action: deny
  - scope: session
    check: cost_budget
    action: deny
    max_usd: 5.00

Option C — Agent-level middleware:
The AG-UI agent (LangGraph, etc.) wraps itself with TealTiger middleware before registering as a Bot endpoint. Content governance happens inside the agent, infrastructure governance happens at the gateway. Defense-in-depth.

Use Cases
  • Financial services Bot handling account data — must not leak PII in tool arguments to third-party MCP servers
  • Research Bot consuming external documents — needs injection defense before those documents influence tool calls
  • Multi-Bot deployment with cost allocation — each Bot needs a per-session budget that hard-stops regardless of CEL rules
  • Compliance audit — need evidence that content-level checks were evaluated (not just that the URL/tool was permitted)
Why not just extend CEL?

CEL is great for structural checks (tool.name == "browser_navigate" && page.host != "internal.company.com"). But content scanning requires:

  • Regex pattern matching across variable-length text (PII/injection)
  • Stateful tracking (cumulative cost)
  • Confidence thresholds (injection detection isn't binary)

These are better served by a purpose-built content evaluator running alongside CEL rather than shoehorning them into CEL expressions.

Additional Context
  • TealTiger: https://github.com/agentguard-ai/tealtiger (Apache 2.0)
  • Already integrated with AG2 (built-in), Haystack, LangChain, CrewAI, Strands
  • NVIDIA Inception member
  • No external server required — runs in-process
  • Happy to contribute a PR once the boundary plugin interface stabilizes

This is complementary to existing governance, not a replacement. CEL handles infrastructure boundaries. Content evaluation handles what's inside the calls that pass those boundaries.

主要言語
TypeScript
スター
6.6k
フォーク
914
平均マージ
17時間 52分
マージ済み PR(30日)
155

環境構築

  • Dockerfile または Docker Compose ファイルあり
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CopilotKit/OpenBot のほかの issue

CopilotKit/OpenBot の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。