安全不靠提示词自觉——结构化规则在守卫层强制执行。
不该用的工具在 tools/list 里根本不出现,而不是调用被拒后再解释。
结构化规则在守卫出口强制执行;越权数据不进上下文,模型想编也没材料。
每次调用一条 JSONL;只记参数哈希不记原文,审计日志不成为第二个泄漏面。
行级过滤拦得住泄漏,拦不住已经发生的写。涉审写操作在执行前被挂起成审批单,独立审批人批准后才落库——审批必须在写入之前。
长连接接入,无需公网回调。sender open_id 映射到 principal,同一套守卫——安全不靠提示词。三个域已在真实飞书应用上端到端验证。
100 题越权/泄漏题库跨三个域(含对抗红队与退款分级),硬断言 + LLM-judge 双轨(judge 须先过人工校准,只能加严不能翻案)。头条:红队攻击得手率 无守卫 77.2% → 生产配置 0%,所有数据可本机复现。
守卫不试图「检测」提示注入——那是打不赢的仗;它让注入「没有后果」。以下把每道控制映射到 OWASP 与中国 TC260 的逐条编号。
框架:OWASP Top 10 for Agentic Apps 2026(ASI02/03/09/10)· OWASP LLM Top 10 2025(LLM01/02/06)· 中国 TC260《AI 智能体安全部署使用指南》(2026-07 生效:最小权限 / 高危操作人工二次确认 / 全量审计)。设计对标 lethal trifecta(Willison)与 Meta「Agents Rule of Two」的 [AB] 档(对外动作前人类校验)。EU AI Act Art.14 高风险人工监督已推迟至 2027–2028,本项目 HITL 只作中期顺风、不宣称现在受其强制。
安全产品最怕过度承诺。以下边界与 README 保持同步:
每一项「已交付」都附带可复现的验证口径。
Safety doesn't rely on prompt discipline — structured rules are enforced at the guard layer.
Off-limits tools never appear in tools/list — instead of rejecting the call and explaining afterwards.
Enforced at the guard's exit; unauthorized data never enters the context, so there's nothing to leak.
One JSONL line per call; params stored as hashes, never raw — the audit log doesn't become a second leak surface.
Row filtering stops leaks, not writes that already happened. Approval-gated writes are suspended as a ticket before execution; only an independent approver's sign-off commits them — approval must precede the write.
Long-connection integration, no public callback. Sender open_id maps to a principal behind the same guard — safety never relies on prompts. All three domains verified end-to-end on a real Feishu app.
100 leak/privilege cases across three domains (incl. adversarial red-team + graded refunds); hard assertions + LLM-judge dual track. Headline: red-team attack success 77.2% (no guard) → 0% (production). All numbers reproducible locally.
The guard doesn't try to "detect" prompt injection — an unwinnable fight; it makes injection consequence-free. Each control maps to specific OWASP and China TC260 clauses.
Frameworks: OWASP Top 10 for Agentic Apps 2026 (ASI02/03/09/10) · OWASP LLM Top 10 2025 (LLM01/02/06) · China TC260 AI-Agent Security Guide (in force 2026-07: least privilege / human 2nd-check for high-risk actions / full audit). Design tracks the lethal trifecta (Willison) and Meta's "Agents Rule of Two" [AB] tier (human validates before outbound actions). EU AI Act Art.14 human oversight is deferred to 2027–2028; this project's HITL is a mid-term tailwind, not claimed as currently mandated.
Overpromising is the worst failure mode for a security product. These limits stay in sync with the README:
Every shipped item carries a reproducible verification story.