{
  "schema": "aidefend-secureflow-metadata-v1",
  "flow_id": "aidefend-research-sf0096-jev-counterfeit-policy-tool-gating-bypass",
  "title": "TypeSafe AI Jev: Counterfeit Policy Lowers Injection Recall and Tool-Risk Scores",
  "subtitle": "A counterfeit rubric in untrusted input reduced Jev’s prompt-injection recall and lowered the mean risk score for a proposed tool action.",
  "summary": "Jev is a TypeSafe AI model that returns structured judgments, such as a probability that an input contains prompt injection. Datadog tested what happens when the text being judged includes a counterfeit policy of its own. Across 12,295 samples, the share of attacks that Jev detected fell from 82.90% to 3.88% using its Noul output. In a separate LangChain simulation, a user-editable profile lowered the mean risk score for a proposed file edit from 0.893 to 0.290. The research measured the gate's decisions and did not report a successful unauthorized write.",
  "reviewed": true,
  "import_status": "curated-research",
  "ai_layers": [
    "autonomous-agents",
    "ai-infrastructure"
  ],
  "risk_impact": [
    "model-evasion-bypass"
  ],
  "affected_components": [
    "TypeSafe AI Jev structured decision model (Choice, Score, Noul outputs)",
    "Prompt-injection classification schema and 12-category attack rubric",
    "LangChain tool-call risk gating middleware (is_risky >= 0.5 gate)",
    "Service-account-backed edit_workspace_file tool and user_context.profile_description input"
  ],
  "source_research": {
    "provider": "Datadog Security Labs",
    "primary_url": "https://securitylabs.datadoghq.com/articles/jev-as-a-judge-how-counterfeit-policy-steers-jev/",
    "published": "2026-10-15",
    "note": "The two controlled experiments quantify classifier recall and simulated tool-risk scores. The simulated tool description requires caller edit permission in addition to service-account write access. The report does not document a file mutation or show the distribution of the modified runs."
  },
  "attack_steps": [
    {
      "id": "craft-counterfeit-rubric",
      "title": "Construct an imitation decision policy",
      "zhTitle": "設計一段仿冒的判定規則",
      "summary": "Datadog created policy-like text that tries to redefine how Jev judges the input.",
      "zhSummary": "Datadog 研究人員設計了一段看似政策的文字，試圖改變 Jev 判斷輸入內容的方式。",
      "tactic": "AML.TA0001",
      "technique": "AML.T0065",
      "layout": {
        "x": 0,
        "y": 0
      }
    },
    {
      "id": "classifier-prepend",
      "title": "Evaluate prompt-injection samples with added policy text",
      "zhTitle": "測試加上偽造政策的提示詞注入樣本",
      "summary": "The modified inputs asked Jev to treat attacks as benign and reinterpreted the 12 categories as ordinary topics.",
      "zhSummary": "修改後的樣本夾帶假規則，把攻擊內容說成無害，並把 12 類攻擊重新解釋為日常話題。",
      "tactic": "AML.TA0005",
      "technique": "AML.T0051.000",
      "layout": {
        "x": 620,
        "y": -620
      }
    },
    {
      "id": "recall-collapse",
      "title": "Measure a drop in Noul recall to 3.88%",
      "zhTitle": "Jev 的 Noul 召回率從 82.90% 降到 3.88%",
      "summary": "The modified benchmark missed 4,463 of 4,643 attacks, including every attack sample in two datasets.",
      "zhSummary": "修改後的測試共漏掉 4,643 筆攻擊中的 4,463 筆，其中兩個資料集的攻擊樣本全數漏報。",
      "tactic": "AML.TA0007",
      "technique": "AML.T0015",
      "layout": {
        "x": 1240,
        "y": -620
      }
    },
    {
      "id": "profile-inject",
      "title": "Present counterfeit policy through the user profile",
      "zhTitle": "在個人簡介欄位放入偽造的風險定義",
      "summary": "The simulated viewer's editable profile is included in the risk judge's input. The test text argues the proposed edit should be considered harmless.",
      "zhSummary": "模擬情境中的檢視者可以編輯個人簡介，這段文字又會被送進判定模型。測試文字試圖說服模型把提議的編輯視為無害。",
      "tactic": "AML.TA0005",
      "technique": "AML.T0051.001",
      "layout": {
        "x": 620,
        "y": 620
      }
    },
    {
      "id": "unauthorized-edit",
      "title": "Present a viewer's proposed handbook edit to the gate",
      "zhTitle": "把僅有檢視權者提議的手冊編輯送交判定",
      "summary": "The tool description requires the requester to have edit rights even though the connector uses a service account with write access. The test presents the proposed edit to Jev.",
      "zhSummary": "送交 Jev 的資料包含提議的手冊編輯。工具說明仍要求呼叫者具備編輯權，即使連接器背後的服務帳號能寫入也一樣。",
      "tactic": null,
      "technique": null,
      "layout": {
        "x": 1240,
        "y": 620
      }
    },
    {
      "id": "score-suppression",
      "title": "Measure a lower tool-risk score below the threshold",
      "zhTitle": "量到平均工具風險分數低於攔截門檻",
      "summary": "Across 40 modified runs, the mean risk score fell from 0.893 to 0.290, below 0.5. The report does not document an actual file mutation.",
      "zhSummary": "加入偽造規則後，40 次測試的平均風險分數由 0.893 降到 0.290，低於 0.5。報告沒有證實檔案遭到修改。",
      "tactic": "AML.TA0007",
      "technique": "AML.T0015",
      "layout": {
        "x": 1860,
        "y": 620
      }
    }
  ],
  "threat_refs": [
    {
      "id": "AML.T0065",
      "name": "LLM Prompt Crafting"
    },
    {
      "id": "AML.T0051.000",
      "name": "Direct"
    },
    {
      "id": "AML.T0015",
      "name": "Evade AI Model"
    },
    {
      "id": "AML.T0051.001",
      "name": "Indirect"
    }
  ],
  "reader_narrative": {
    "pathCount": 2,
    "topologyNote": "Two controlled experiments test the same mechanism at different boundaries. The LangChain branch ends at the measured risk score.",
    "groups": [
      {
        "id": "craft",
        "kind": "shared",
        "eyebrow": "Shared mechanism",
        "label": "Imitate the model's judgment policy",
        "summary": "Both experiments test adversarial text that imitates the rules Jev is meant to apply.",
        "stepIds": [
          "craft-counterfeit-rubric"
        ]
      },
      {
        "id": "benchmark",
        "kind": "path",
        "eyebrow": "Experiment 1",
        "label": "Prompt-injection benchmark",
        "summary": "In the 12,295-sample benchmark, Noul recall fell from 82.90% to 3.88%.",
        "stepIds": [
          "classifier-prepend",
          "recall-collapse"
        ]
      },
      {
        "id": "langchain",
        "kind": "path",
        "eyebrow": "Experiment 2",
        "label": "Tool-risk simulation",
        "summary": "With the same proposed viewer edit, counterfeit policy text in the profile reduced the mean tool-risk score. No completed edit was reported.",
        "stepIds": [
          "profile-inject",
          "unauthorized-edit",
          "score-suppression"
        ]
      }
    ]
  }
}
