Notion 与 Lakera Guard / NVIDIA NeMo Guardrails / Guardrails AI 企业级大模型安全护栏、Prompt 注入拦截与敏感数据防泄漏(DLP)闭环实战

2026 年 11 月 22 日

一、为什么企业大模型应用必须用 Notion 统筹 AI Guardrails 安全与 DLP 治理? #

当企业将客服问答、代码辅助与内部知识库接入大语言模型(LLM)后,Lakera Guard、NVIDIA NeMo Guardrails 与 Guardrails AI 成为拦截 **Prompt 注入(Prompt Injection)、越狱攻击(Jailbreak)、模型幻觉越界以及敏感数据防泄漏(DLP)**的关键防线。然而,在实际生产环境中,仅仅在推理网关旁路挂载护栏 SDK 往往会暴露出三类严重的治理盲区:

  1. 毫秒级常规放行流水直接回写协作平台会瞬间打爆配额:线上 AI 网关每秒处理成百上千次用户对话,若将每一次 PASS / ALLOW 的护栏检测回执逐条写入 Notion,不仅会立刻触发 Notion API 每秒 3 次的 429 限流雪崩,还会将真正高危的 System Prompt 窃取或 PII 外泄事件淹没在海量无意义日志中;
  2. 护栏告警载荷中的用户原始 Prompt 与命中密文存在严重的二次泄漏风险:当 DLP 护栏拦截到用户在对话中粘贴了客户身份证号、内部数据库 DSN 或 sk- / ntn_ API 密钥时,原始告警 Payload 往往附带了完整上下文;若未经脱敏剥离直接同步至 Notion 页面,等同于在协作知识库中留存高危明文证据;
  3. 缺乏从“护栏异常拦截激增”到“自动切断高危应用上线通道”的跨团队门禁闭环:安全团队在控制台发现了越狱绕过趋势,但应用负责人与合规审计人员缺乏统一的跨应用风险健康度视图与上线冻结锁。

将 Lakera Guard / NVIDIA NeMo Guardrails / Guardrails AI 与 Notion AI 安全治理中枢 深度打通,可以在“零正常请求刷屏、零 Prompt 隐私与密钥二次落盘”的前提下,建立“AI 应用基线建档 -> 护栏评估窗口快照幂等同步 -> 高危注入与 DLP 页顶置顶熔断 -> Formula 2.0 合规上线门禁”的工程闭环(下游私有化推理延迟与成本治理可配合参阅 Notion 与 vLLM / SGLang / NVIDIA Triton 企业级私有化大模型推理集群实战)。

AI Guardrails 安全治理模式 仅依赖推理网关控制台日志 全量检测事件直接推送群聊 人工每周抽检 Prompt 审计表 三表解耦 Notion AI 安全与 DLP 门禁中枢(推荐)
正常放行与高频探测降噪 日志保留周期短,跨模型横向对比困难 ALLOW 与低分试探刷屏导致告警麻木 人工导出滞后,无法拦截持续性自动化越狱 入口过滤常规 ALLOW 与低风险探测,仅按时间窗聚合快照
Prompt 隐私与 DLP 二次防护 日志系统常明文保存原始对话文本 群聊机器人直接暴露客户手机号或密钥 人工截图脱敏成本高且极易遗漏 入库前剥离 user_prompt/response 正文并正则擦除 PII 与密钥
越狱绕过与策略冻结协同 告警孤立在安全控制台,研发难感知 异常事件沉底,无法强制阻断迭代发布 缺乏与产品上线流水线的联动开关 DLP 泄漏或注入率超标立即派发熔断工单并页顶置顶告警
多引擎策略与合规审计追溯 Lakera 与 NeMo 规则分散在多套平台 聊天记录无法通过 SOC 2 / AI 合规审计 无法动态核算各应用拦截率与修复 SLA Formula 2.0 实时计算阻断率、DLP 归零状态与上线门禁

二、四步搭建“AI 应用基线 × 护栏快照 × 注入与 DLP 工单”三表模型 #

结合 Notion 企业级数据库架构设计规范 与 团队权限组治理指南,建议搭建 AI 应用与护栏基线主档库(DB_LLM_Guard_Policies)、护栏评估与拦截窗口快照库(DB_Guardrail_Evaluations) 与 Prompt 注入与 DLP 熔断工单库(DB_Prompt_Incidents) 三表模型。

步骤 1:设计三表核心属性与幂等业务主键 #

严格遵守**“完整对话追踪明细与向量审计留在加密 SIEM / 护栏审计存储,应用护栏策略等级、时间窗拦截统计与脱敏风险工单留在 Notion”**原则,以 {guard_engine}:{app_slug}:{env}:{window_bucket} 作为评估快照的幂等主键:

所属数据库 属性名称 属性类型 AI 安全护栏与 DLP 治理用途
DB_LLM_Guard_Policies App_Name Title 纳管大模型应用名称(如 [Prod-CS] 智能售后客服助手)
DB_LLM_Guard_Policies Policy_Key Rich Text 幂等主键:{org_slug}:{app_slug}:{env}
DB_LLM_Guard_Policies Guard_Engine Select LAKERA_GUARD / NEMO_GUARDRAILS / GUARDRAILS_AI
DB_LLM_Guard_Policies Block_Rate_Threshold Number 允许的最大护栏拦截率红线(如 5,表示 5%)
DB_LLM_Guard_Policies Guard_Kill_Switch Checkbox AI 应用熔断锁,发生 DLP 泄漏或高频越狱绕过时自动开启
DB_Guardrail_Evaluations Eval_Title Title 评估快照摘要(如 [2026-11-22T18:00] cs-bot · 拦截 1.8% / DLP 0)
DB_Guardrail_Evaluations Eval_Key Rich Text 幂等主键:{engine}:{app_slug}:{env}:{window_bucket}
DB_Guardrail_Evaluations Guard_Verdict Select HEALTHY / ELEVATED_INJECTION / DLP_VIOLATION / BYPASS_CRITICAL
DB_Guardrail_Evaluations Block_Rate_Pct Number 本统计窗口内被护栏拦截的请求占比(百分比数值)
DB_Guardrail_Evaluations DLP_Leak_Count Number 本窗口触发敏感数据泄漏(PII/密钥/内网凭证)拦截次数
DB_Guardrail_Evaluations Evaluated_At Date 本次评估窗口统计结束时间(ISO 8601)
DB_Guardrail_Evaluations Policy_Relation Relation 双向关联至 DB_LLM_Guard_Policies
DB_Prompt_Incidents Incident_Title Title 安全熔断工单(如 [DLP_SECRET] cs-bot · 检测到模型输出含 API Key)
DB_Prompt_Incidents Incident_Key Rich Text 幂等主键:{app_slug}:{attack_category}:{rule_id}:{day_bucket}
DB_Prompt_Incidents Incident_State Select OPEN / PROMPT_HARDENED / RULE_TUNED / FALSE_POSITIVE
DB_Prompt_Incidents Attack_Category Select PROMPT_INJECTION / JAILBREAK / DLP_PII_SECRET / TOXIC_HALLUCINATION
DB_Prompt_Incidents SLA_Due_At Date 安全加固与策略调优截止时间
DB_Prompt_Incidents Sanitized_Trace_Summary Rich Text 剥离对话原文并经正则擦除 PII/密钥后的安全摘要与规则 ID
DB_Prompt_Incidents Policy_Relation Relation 双向关联至 DB_LLM_Guard_Policies

步骤 2:配置原始字节流 HMAC 验签、常规放行降噪与隐私/密钥脱敏 #

  1. 严格基于原始请求字节流校验 Webhook 签名:接收来自 Lakera Guard Webhook、NeMo Guardrails 回调代理或 Guardrails AI 审计事件(事件订阅架构参阅 Notion Integration Webhooks 官方实时事件订阅实战)时,必须在 JSON 反序列化前通过 request.get_data(cache=False) 读取原始 bytes,计算 HMAC-SHA256 并使用 hmac.compare_digest() 执行常量时间验签;
  2. 入口丢弃常规放行与低置信度试探噪音:对于 verdict == "ALLOW" 的单条成功对话以及 confidence < 0.75 且 dlp_leak_count == 0 的偶发低危噪音,直接由边缘网关丢弃或归并至时间窗指标,防止耗尽 Notion API 配额;
  3. 强制剥离对话正文并清洗 PII 与模型密钥:调用 sanitize_guardrail_summary() 剔除 user_prompt、system_prompt、model_output 等长文本对话字段,同时用正则擦除 OpenAI/Anthropic sk- 密钥、Notion 令牌(ntn_ / secret_)、AWS AK/SK、JWT、邮箱与手机号,杜绝在工单中二次留存敏感信息。

步骤 3:保护 AI 应用基线页的 System Prompt 边界规范与应急降级 SOP #

DB_LLM_Guard_Policies 主档页正文中通常记录了该应用的 Colang 护栏规则版本、允许调用的外部 Tools 白名单、DLP 敏感词典清单以及模型降级开关 SOP。因此同步服务只能使用 PATCH /v1/pages/{page_id} 更新属性,严禁覆盖既有的页面正文内容。

步骤 4:基于 Notion-Version: 2026-03-11 在应用页顶置顶红色熔断警示块 #

全链路统一声明请求头 Notion-Version: 2026-03-11(升级规范参阅 Notion Views API 与 2026-03-11 接口升级工程实战)。一旦发现 DLP_Leak_Count > 0、Guard_Verdict == "BYPASS_CRITICAL" 或 Block_Rate_Pct >= Block_Rate_Threshold,立即创建或维持 OPEN 熔断工单、自动勾选 Guard_Kill_Switch,并调用 PATCH /v1/blocks/{page_id}/children 配合 position: { "type": "start" } 在页面顶部置顶红色 callout 安全警示。


三、Python 原始字节验签、PII 脱敏与三表幂等同步实战 #

以下 Python 生产级网关完整实现 request.get_data(cache=False) 原始字节 hmac.compare_digest 验签、常规放行流水过滤、对话正文剥离与 PII/密钥正则脱敏、429 指数退避重试(原理参阅 Notion API 速率限制与容错架构),以及基于 Notion-Version: 2026-03-11 的三表幂等同步:

# llm_guardrails_notion_gateway.py — Python 3.11+ Lakera / NeMo / Guardrails AI 同步网关
import hashlib
import hmac
import json
import os
import random
import re
import time
from datetime import datetime, timedelta, timezone
from typing import Any, Dict
import requests
from flask import Flask, jsonify, request

NOTION_TOKEN = os.environ["NOTION_TOKEN"]
GUARD_WEBHOOK_SECRET = os.environ["GUARD_WEBHOOK_SECRET"].encode("utf-8")
POLICIES_DS_ID = os.environ["NOTION_GUARD_POLICIES_DS_ID"]
EVALS_DS_ID = os.environ["NOTION_GUARD_EVALS_DS_ID"]
INCIDENTS_DS_ID = os.environ["NOTION_GUARD_INCIDENTS_DS_ID"]

app = Flask(__name__)


def verify_raw_hmac(raw_body: bytes, sig_header: str | None) -> bool:
    if not sig_header:
        return False
    provided = re.sub(r"^sha256=", "", sig_header.strip(), flags=re.IGNORECASE)
    expected = hmac.new(GUARD_WEBHOOK_SECRET, raw_body, hashlib.sha256).hexdigest()
    return hmac.compare_digest(expected, provided)


def sanitize_guardrail_summary(payload: Dict[str, Any]) -> str:
    safe_copy = {
        k: v
        for k, v in payload.items()
        if k.lower() not in {"user_prompt", "system_prompt", "model_output", "messages", "raw_text"}
    }
    text = json.dumps(safe_copy, ensure_ascii=False)
    text = re.sub(r"\bsk-[A-Za-z0-9_-]{16,}\b", "[REDACTED_LLM_KEY]", text)
    text = re.sub(r"\b(?:ntn_|secret_)[A-Za-z0-9_-]{16,}\b", "[REDACTED_NOTION_TOKEN]", text)
    text = re.sub(r"\bAKIA[0-9A-Z]{16}\b", "[REDACTED_AWS_KEY]", text)
    text = re.sub(r"\beyJ[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+\b", "[REDACTED_JWT]", text)
    text = re.sub(r"\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b", "[REDACTED_EMAIL]", text)
    text = re.sub(r"\b1[3-9]\d{9}\b", "[REDACTED_PHONE]", text)
    text = re.sub(r"\b(?:postgres|mysql|mongodb|rediss?)://[^\s\"']+", "[REDACTED_DSN]", text, flags=re.IGNORECASE)
    return text[:1000]


def notion_request(path: str, method: str, payload: Dict[str, Any]) -> Dict[str, Any]:
    headers = {
        "Authorization": f"Bearer {NOTION_TOKEN}",
        "Notion-Version": "2026-03-11",
        "Content-Type": "application/json",
    }
    url = f"https://api.notion.com/v1{path}"
    for attempt in range(5):
        resp = requests.request(method, url, headers=headers, json=payload, timeout=15)
        if resp.status_code == 429 and attempt < 4:
            retry_after = float(resp.headers.get("Retry-After", "1"))
            time.sleep(retry_after + (2 ** attempt) * 0.4 + random.uniform(0, 0.25))
            continue
        resp.raise_for_status()
        return resp.json()
    raise RuntimeError("Exceeded Notion API 429 retry budget")


def sync_guardrail_event(evt: Dict[str, Any]) -> Dict[str, Any]:
    if evt.get("event_type") == "SINGLE_REQUEST_ALLOW":
        return {"skipped": True, "reason": "routine-allow-traffic-filtered"}

    verdict = str(evt.get("guard_verdict", "HEALTHY")).upper()
    block_rate_pct = float(evt.get("block_rate_pct", 0.0))
    dlp_leak_count = int(evt.get("dlp_leak_count", 0))
    block_threshold = float(evt.get("block_rate_threshold", 5.0))
    confidence = float(evt.get("confidence", 1.0))

    if verdict == "HEALTHY" and dlp_leak_count == 0 and block_rate_pct < 0.5 and confidence < 0.75:
        return {"skipped": True, "reason": "low-confidence-noise-ignored"}

    engine = str(evt["guard_engine"]).upper()
    org_slug = str(evt["org_slug"]).lower()
    app_slug = str(evt["app_slug"]).lower()
    env = str(evt.get("env", "prod")).lower()
    policy_key = f"{org_slug}:{app_slug}:{env}"

    # 1. 幂等同步 AI 应用与护栏基线主档 (DB_LLM_Guard_Policies)
    pol_res = notion_request(
        f"/data_sources/{POLICIES_DS_ID}/query",
        "POST",
        {"filter": {"property": "Policy_Key", "rich_text": {"equals": policy_key}}, "page_size": 1},
    )
    pol_props: Dict[str, Any] = {
        "App_Name": {"title": [{"text": {"content": str(evt["app_display_name"])[:120]}}]},
        "Policy_Key": {"rich_text": [{"text": {"content": policy_key}}]},
        "Guard_Engine": {"select": {"name": engine}},
        "Block_Rate_Threshold": {"number": block_threshold},
    }
    if pol_res["results"]:
        policy_page_id = pol_res["results"][0]["id"]
        notion_request(f"/pages/{policy_page_id}", "PATCH", {"properties": pol_props})
    else:
        pol_props["Guard_Kill_Switch"] = {"checkbox": False}
        created = notion_request(
            "/pages",
            "POST",
            {"parent": {"type": "data_source_id", "data_source_id": POLICIES_DS_ID}, "properties": pol_props},
        )
        policy_page_id = created["id"]

    # 2. 幂等同步护栏评估窗口快照 (DB_Guardrail_Evaluations)
    window_bucket = str(evt["window_bucket"])
    eval_key = f"{engine.lower()}:{app_slug}:{env}:{window_bucket}"
    eval_res = notion_request(
        f"/data_sources/{EVALS_DS_ID}/query",
        "POST",
        {"filter": {"property": "Eval_Key", "rich_text": {"equals": eval_key}}, "page_size": 1},
    )
    eval_props: Dict[str, Any] = {
        "Eval_Title": {"title": [{"text": {"content": f"[{window_bucket}] {app_slug} · Block {block_rate_pct:.1f}% / DLP {dlp_leak_count}"[:120]}}]},
        "Eval_Key": {"rich_text": [{"text": {"content": eval_key}}]},
        "Guard_Verdict": {"select": {"name": verdict}},
        "Block_Rate_Pct": {"number": round(block_rate_pct, 2)},
        "DLP_Leak_Count": {"number": dlp_leak_count},
        "Evaluated_At": {"date": {"start": evt["evaluated_at"]}},
        "Policy_Relation": {"relation": [{"id": policy_page_id}]},
    }
    if eval_res["results"]:
        notion_request(f"/pages/{eval_res['results'][0]['id']}", "PATCH", {"properties": eval_props})
    else:
        notion_request(
            "/pages",
            "POST",
            {"parent": {"type": "data_source_id", "data_source_id": EVALS_DS_ID}, "properties": eval_props},
        )

    # 3. 触发越狱绕过、DLP 泄漏或阻断率超限:幂等派单、开启熔断锁并页顶置顶警示
    triggered = verdict in {"BYPASS_CRITICAL", "DLP_VIOLATION"} or dlp_leak_count > 0 or block_rate_pct >= block_threshold
    if triggered:
        attack_cat = str(evt.get("attack_category", "DLP_PII_SECRET" if dlp_leak_count > 0 else "PROMPT_INJECTION")).upper()
        rule_id = str(evt.get("rule_id", "default-guard-rule"))
        day_bucket = datetime.now(timezone.utc).strftime("%Y-%m-%d")
        incident_key = f"{app_slug}:{attack_cat.lower()}:{rule_id}:{day_bucket}"
        inc_res = notion_request(
            f"/data_sources/{INCIDENTS_DS_ID}/query",
            "POST",
            {"filter": {"property": "Incident_Key", "rich_text": {"equals": incident_key}}, "page_size": 1},
        )
        if not inc_res["results"]:
            sla_due = (datetime.now(timezone.utc) + timedelta(hours=12 if dlp_leak_count > 0 else 24)).strftime("%Y-%m-%d")
            notion_request(
                "/pages",
                "POST",
                {
                    "parent": {"type": "data_source_id", "data_source_id": INCIDENTS_DS_ID},
                    "properties": {
                        "Incident_Title": {"title": [{"text": {"content": f"[{attack_cat}] {app_slug} · {rule_id}"[:120]}}]},
                        "Incident_Key": {"rich_text": [{"text": {"content": incident_key}}]},
                        "Incident_State": {"select": {"name": "OPEN"}},
                        "Attack_Category": {"select": {"name": attack_cat}},
                        "SLA_Due_At": {"date": {"start": sla_due}},
                        "Sanitized_Trace_Summary": {"rich_text": [{"text": {"content": sanitize_guardrail_summary(evt)}}]},
                        "Policy_Relation": {"relation": [{"id": policy_page_id}]},
                    },
                },
            )
            notion_request(f"/pages/{policy_page_id}", "PATCH", {"properties": {"Guard_Kill_Switch": {"checkbox": True}}})
            notion_request(
                f"/blocks/{policy_page_id}/children",
                "PATCH",
                {
                    "position": {"type": "start"},
                    "children": [
                        {
                            "object": "block",
                            "type": "callout",
                            "callout": {
                                "icon": {"type": "emoji", "emoji": "🛡️"},
                                "color": "red_background",
                                "rich_text": [
                                    {
                                        "type": "text",
                                        "text": {
                                            "content": f"[AI 安全护栏熔断] 应用 {app_slug}({env}) 在窗口 {window_bucket} 触发 {verdict}(拦截率 {block_rate_pct:.1f}% · DLP {dlp_leak_count} 次),已自动开启 Guard_Kill_Switch!"
                                        },
                                    }
                                ],
                            },
                        }
                    ],
                },
            )

    return {"ok": True, "policy_page_id": policy_page_id, "triggered": triggered}


@app.post("/webhooks/llm-guardrails")
def handle_guardrails_webhook():
    raw_body = request.get_data(cache=False)
    if not verify_raw_hmac(raw_body, request.headers.get("X-Guard-Signature")):
        return jsonify({"error": "Invalid HMAC signature"}), 401
    return jsonify(sync_guardrail_event(json.loads(raw_body.decode("utf-8"))))

四、Formula 2.0 实战:AI 安全护栏与上线门禁公式 #

在 DB_LLM_Guard_Policies 中创建 Formula 2.0 属性 AI 安全护栏与上线门禁(函数语法参阅 Formula 2.0 函数与正则速查手册 与 官方公式指南),综合计算熔断开关状态、未闭环安全工单、DLP 敏感数据泄漏事件、拦截率异常阈值及遥测心跳新鲜度:

AI 护栏门禁维度 Formula 2.0 核心判定条件 安全与合规团队协同价值
熔断开关开启或存在未闭环工单 killSwitch \|\| openIncidents.length() > 0 强制冻结存在越狱绕过或敏感数据外泄隐患的 AI 应用发版
存在逾期未加固的高危工单 overdueIncidents.length() > 0 对超过安全加固 SLA 的应用发出最高级别合规逾期红牌
最新窗口出现 DLP 泄漏或越狱绕过 latestEval.prop("DLP_Leak_Count") > 0 \|\| latestEval.prop("Guard_Verdict") == "BYPASS_CRITICAL" 防止异步派单延迟导致高危敏感数据泄漏窗口被放行
护栏拦截率突破异常基线 latestEval.prop("Block_Rate_Pct") >= threshold 及时识别针对应用的大规模自动化提示词注入攻击浪涌
lets(
  killSwitch, prop("Guard_Kill_Switch"),
  threshold, prop("Block_Rate_Threshold"),
  incidents, prop("Prompt_Incidents"),
  openIncidents, incidents.filter(current.prop("Incident_State") == "OPEN"),
  overdueIncidents, openIncidents.filter(!empty(current.prop("SLA_Due_At")) && current.prop("SLA_Due_At") < now()),
  evals, prop("Guardrail_Evaluations").sort(current.prop("Evaluated_At")),
  latestEval, evals.last(),
  evalAgeMins, if(empty(latestEval) || empty(latestEval.prop("Evaluated_At")), 9999, dateBetween(now(), latestEval.prop("Evaluated_At"), "minutes")),
  ifs(
    overdueIncidents.length() > 0,
      style("🚨 AI 安全加固严重逾期:" + format(overdueIncidents.length()) + " 项注入/DLP 工单超期未闭环", "red", "bold", "red_background"),
    killSwitch || openIncidents.length() > 0,
      style("🛑 AI 护栏熔断已激活:尚有 " + format(openIncidents.length()) + " 项高危安全事件待加固", "red", "bold", "red_background"),
    !empty(latestEval) && (latestEval.prop("DLP_Leak_Count") > 0 || latestEval.prop("Guard_Verdict") == "BYPASS_CRITICAL"),
      style("⚠️ 检出 DLP 泄漏或越狱绕过:DLP " + format(latestEval.prop("DLP_Leak_Count")) + " 次 · 状态 " + latestEval.prop("Guard_Verdict"), "red", "bold"),
    !empty(latestEval) && latestEval.prop("Block_Rate_Pct") >= threshold,
      style("⚠️ 注入拦截率异常飙升:" + format(latestEval.prop("Block_Rate_Pct")) + "%(红线 " + format(threshold) + "%)", "orange", "bold"),
    evals.length() == 0,
      style("⚪ 尚无 Lakera / NeMo / Guardrails 评估快照", "gray"),
    evalAgeMins > 120,
      style("⏳ 护栏遥测失联:已超过 " + format(evalAgeMins) + " 分钟未上报评估窗口", "orange", "bold"),
    style("🟢 AI 安全护栏受控:DLP 零泄漏 · 拦截率 " + format(latestEval.prop("Block_Rate_Pct")) + "%", "green", "bold", "green_background")
  )
)

五、Lakera Guard / NeMo Guardrails / Guardrails AI 同步常见故障排查 #

在落地企业级 AI Guardrails 与 Notion 合规门禁闭环时,以下四类问题最常触发生产同步异常(通用诊断方法可参阅 Notion 常见报错与故障诊断手册):

  1. 逐条 ALLOW 对话检测打爆 Notion 429 限流:未在网关入口按事件类型与健康阈值过滤常规放行流量。解法:在入口直接丢弃 SINGLE_REQUEST_ALLOW,仅按 window_bucket 定时汇总同步评估快照;
  2. DLP 告警把客户手机号、邮箱或模型 API Key 原文写入 Notion:直接将原始检测 Payload 序列化写入工单备注属性。解法:入库前必须调用 sanitize_guardrail_summary() 剥离 user_prompt、system_prompt、model_output 并用正则擦除各类密钥与 PII;
  3. 同一波自动化越狱攻击每分钟生成几十条重复 OPEN 工单:工单主键混入了精确到秒的时间戳或 request_id。解法:以 {app_slug}:{attack_category}:{rule_id}:{day_bucket} 作为 Incident_Key 幂等主键,同日同类规则攻击自动合并为单条追踪工单;
  4. 安全团队已加固 System Prompt 并调优规则,但应用门禁仍显示红色阻断:只更新了新的健康评估快照,忘记流转历史工单并复位熔断开关。解法:在 DB_Prompt_Incidents 将工单流转为 PROMPT_HARDENED 或 RULE_TUNED,并取消勾选 DB_LLM_Guard_Policies 的 Guard_Kill_Switch。

❓ 常见问题与答疑 (FAQ)

高频疑难解析与避坑指南
A

完全不需要。绝大多数核心功能在免费 Free 计划中均可完整体验与实操练习,无需额外付费购买 Plus 或团队版。