<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Owasp on Tarragon</title><link>https://tarrragon.github.io/blog/tags/owasp/</link><description>Recent content in Owasp on Tarragon</description><generator>Hugo -- gohugo.io</generator><language>zh-TW</language><copyright>Tarragon (CC BY 4.0)</copyright><lastBuildDate>Tue, 12 May 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://tarrragon.github.io/blog/tags/owasp/index.xml" rel="self" type="application/rss+xml"/><item><title>OWASP LLM Top 10</title><link>https://tarrragon.github.io/blog/llm/knowledge-cards/owasp-llm-top10/</link><pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/llm/knowledge-cards/owasp-llm-top10/</guid><description>&lt;p>OWASP LLM Top 10 的核心概念是「&lt;strong>Open Worldwide Application Security Project 發布的 LLM 應用最常見 10 大資安風險清單&lt;/strong>」。2023 首發、2025 更新版是業界跟企業安全溝通的共同詞彙、是 production LLM 應用做 threat modeling 跟合規溝通的標準入口。&lt;/p>
&lt;h2 id="概念位置">概念位置&lt;/h2>
&lt;p>2025 版的 10 項（簡述）：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>編號&lt;/th>
 &lt;th>名稱&lt;/th>
 &lt;th>簡述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>LLM01&lt;/td>
 &lt;td>Prompt Injection&lt;/td>
 &lt;td>把惡意指令藏進 LLM 會讀到的內容、間接影響模型行為&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM02&lt;/td>
 &lt;td>Sensitive Information Disclosure&lt;/td>
 &lt;td>LLM 輸出洩漏訓練資料 / system prompt / PII&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM03&lt;/td>
 &lt;td>Supply Chain&lt;/td>
 &lt;td>模型 / 訓練資料 / 工具 / dependency 供應鏈攻擊&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM04&lt;/td>
 &lt;td>Data and Model Poisoning&lt;/td>
 &lt;td>訓練資料污染、模型行為被植入後門&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM05&lt;/td>
 &lt;td>Improper Output Handling&lt;/td>
 &lt;td>LLM 輸出未驗證直接執行（XSS / SQLi / RCE）&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM06&lt;/td>
 &lt;td>Excessive Agency&lt;/td>
 &lt;td>Agent 工具權限過大、副作用不可控&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM07&lt;/td>
 &lt;td>System Prompt Leakage&lt;/td>
 &lt;td>System prompt 被使用者誘導露出&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM08&lt;/td>
 &lt;td>Vector and Embedding Weaknesses&lt;/td>
 &lt;td>Vector DB / embedding pipeline 的攻擊面&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM09&lt;/td>
 &lt;td>Misinformation&lt;/td>
 &lt;td>Hallucination / 過度信任 LLM 輸出&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM10&lt;/td>
 &lt;td>Unbounded Consumption&lt;/td>
 &lt;td>Resource exhaustion / cost runaway（DoS / 燒錢）&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="跟模組六的-mapping">跟模組六的 mapping&lt;/h2>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>OWASP&lt;/th>
 &lt;th>模組六章節&lt;/th>
 &lt;th>補充&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>LLM01 Prompt Injection&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/llm/06-security/prompt-injection-in-ide/" data-link-title="6.3 IDE 場景的 prompt injection" data-link-desc="個人 dev 場景下 IDE 寫 code 工作流的 prompt injection：codebase 內容、外部文件、剪貼簿作為攻擊面、跟雲端 LLM 場景的差異">6.3 IDE 場景 prompt injection&lt;/a>&lt;/td>
 &lt;td>直接對應&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM02 Sensitive Disclosure&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/llm/06-security/cross-cloud-local-data-boundary/" data-link-title="6.4 跨雲端 / 本地的資料邊界" data-link-desc="個人 dev 場景下混用雲端 LLM 跟本地 LLM 時的 prompt 洩漏點：Continue.dev 多 provider 設定、隱私資料流、按敏感度分流的判讀">6.4 跨雲端資料邊界&lt;/a>&lt;/td>
 &lt;td>加 &lt;a href="https://tarrragon.github.io/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安&lt;/a>&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM03 Supply Chain&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/llm/06-security/model-supply-chain-trust/" data-link-title="6.0 模型供應鏈與信任邊界" data-link-desc="個人 dev 用本地 LLM 時的模型權重來源信任：GGUF 完整性、Hugging Face / Ollama registry 信任、量化版本污染、檔案完整性檢查">6.0 模型供應鏈&lt;/a>&lt;/td>
 &lt;td>直接對應&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM04 Data/Model Poisoning&lt;/td>
 &lt;td>部分（限本地 dev、production 訓練屬 backend/07）&lt;/td>
 &lt;td>M6 cover 模型來源信任、不 cover 訓練毒化&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM05 Improper Output&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2 tool use 權限&lt;/a>&lt;/td>
 &lt;td>直接對應&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM06 Excessive Agency&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2&lt;/a> + &lt;a href="https://tarrragon.github.io/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent 架構&lt;/a>&lt;/td>
 &lt;td>跨原理 + 安全&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM07 System Prompt Leakage&lt;/td>
 &lt;td>部分（&lt;a href="https://tarrragon.github.io/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 coding agent harness&lt;/a>）&lt;/td>
 &lt;td>M6 沒專章、屬 scaffold 設計&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM08 Vector / Embedding&lt;/td>
 &lt;td>部分（&lt;a href="https://tarrragon.github.io/blog/llm/04-applications/rag-principles/" data-link-title="4.1 RAG 原理：retrieval &amp;#43; augmentation 模式" data-link-desc="為什麼模型需要外掛知識、語意相似 vs 字面相似、chunking 的本質取捨、retrieval 失敗的根本原因">4.1 RAG&lt;/a> + &lt;a href="https://tarrragon.github.io/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安&lt;/a>）&lt;/td>
 &lt;td>跨原理 + 應用&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM09 Misinformation&lt;/td>
 &lt;td>&lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/hallucination/" data-link-title="Hallucination" data-link-desc="LLM 生成內容看起來合理但事實錯誤、引用不存在的來源、虛構不存在的 entity 的現象">hallucination&lt;/a> 卡 + &lt;a href="https://tarrragon.github.io/blog/llm/04-applications/llm-as-judge/" data-link-title="4.21 LLM-as-Judge 評估方法" data-link-desc="LLM 評估 LLM 的 production eval 方法：rubric design、pairwise / direct scoring、三大 bias 緩解、跟 trace 串接的閉環、calibration">4.21 LLM-as-judge&lt;/a>&lt;/td>
 &lt;td>跨卡 + 應用&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM10 Unbounded Consumption&lt;/td>
 &lt;td>部分（&lt;a href="https://tarrragon.github.io/blog/llm/04-applications/prompt-caching-engineering/" data-link-title="4.18 Prompt caching 工程實務：cost / latency 最大槓桿" data-link-desc="Prompt cache 怎麼運作、cache_control 設計、coding agent 跟 long-context 的 cache pattern、anti-pattern 跟 cache miss 訊號">4.18 prompt caching&lt;/a> + &lt;a href="https://tarrragon.github.io/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安 abuse&lt;/a>）&lt;/td>
 &lt;td>M6 沒專章、屬 abuse 緩解&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;h2 id="設計責任">設計責任&lt;/h2>
&lt;p>讀企業 LLM 安全 / 合規文件 / vendor security audit 看到「OWASP LLM Top 10」就是這 framing。寫 code 場景的判讀：&lt;/p></description><content:encoded><![CDATA[<p>OWASP LLM Top 10 的核心概念是「<strong>Open Worldwide Application Security Project 發布的 LLM 應用最常見 10 大資安風險清單</strong>」。2023 首發、2025 更新版是業界跟企業安全溝通的共同詞彙、是 production LLM 應用做 threat modeling 跟合規溝通的標準入口。</p>
<h2 id="概念位置">概念位置</h2>
<p>2025 版的 10 項（簡述）：</p>
<table>
  <thead>
      <tr>
          <th>編號</th>
          <th>名稱</th>
          <th>簡述</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>LLM01</td>
          <td>Prompt Injection</td>
          <td>把惡意指令藏進 LLM 會讀到的內容、間接影響模型行為</td>
      </tr>
      <tr>
          <td>LLM02</td>
          <td>Sensitive Information Disclosure</td>
          <td>LLM 輸出洩漏訓練資料 / system prompt / PII</td>
      </tr>
      <tr>
          <td>LLM03</td>
          <td>Supply Chain</td>
          <td>模型 / 訓練資料 / 工具 / dependency 供應鏈攻擊</td>
      </tr>
      <tr>
          <td>LLM04</td>
          <td>Data and Model Poisoning</td>
          <td>訓練資料污染、模型行為被植入後門</td>
      </tr>
      <tr>
          <td>LLM05</td>
          <td>Improper Output Handling</td>
          <td>LLM 輸出未驗證直接執行（XSS / SQLi / RCE）</td>
      </tr>
      <tr>
          <td>LLM06</td>
          <td>Excessive Agency</td>
          <td>Agent 工具權限過大、副作用不可控</td>
      </tr>
      <tr>
          <td>LLM07</td>
          <td>System Prompt Leakage</td>
          <td>System prompt 被使用者誘導露出</td>
      </tr>
      <tr>
          <td>LLM08</td>
          <td>Vector and Embedding Weaknesses</td>
          <td>Vector DB / embedding pipeline 的攻擊面</td>
      </tr>
      <tr>
          <td>LLM09</td>
          <td>Misinformation</td>
          <td>Hallucination / 過度信任 LLM 輸出</td>
      </tr>
      <tr>
          <td>LLM10</td>
          <td>Unbounded Consumption</td>
          <td>Resource exhaustion / cost runaway（DoS / 燒錢）</td>
      </tr>
  </tbody>
</table>
<h2 id="跟模組六的-mapping">跟模組六的 mapping</h2>
<table>
  <thead>
      <tr>
          <th>OWASP</th>
          <th>模組六章節</th>
          <th>補充</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>LLM01 Prompt Injection</td>
          <td><a href="/blog/llm/06-security/prompt-injection-in-ide/" data-link-title="6.3 IDE 場景的 prompt injection" data-link-desc="個人 dev 場景下 IDE 寫 code 工作流的 prompt injection：codebase 內容、外部文件、剪貼簿作為攻擊面、跟雲端 LLM 場景的差異">6.3 IDE 場景 prompt injection</a></td>
          <td>直接對應</td>
      </tr>
      <tr>
          <td>LLM02 Sensitive Disclosure</td>
          <td><a href="/blog/llm/06-security/cross-cloud-local-data-boundary/" data-link-title="6.4 跨雲端 / 本地的資料邊界" data-link-desc="個人 dev 場景下混用雲端 LLM 跟本地 LLM 時的 prompt 洩漏點：Continue.dev 多 provider 設定、隱私資料流、按敏感度分流的判讀">6.4 跨雲端資料邊界</a></td>
          <td>加 <a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安</a></td>
      </tr>
      <tr>
          <td>LLM03 Supply Chain</td>
          <td><a href="/blog/llm/06-security/model-supply-chain-trust/" data-link-title="6.0 模型供應鏈與信任邊界" data-link-desc="個人 dev 用本地 LLM 時的模型權重來源信任：GGUF 完整性、Hugging Face / Ollama registry 信任、量化版本污染、檔案完整性檢查">6.0 模型供應鏈</a></td>
          <td>直接對應</td>
      </tr>
      <tr>
          <td>LLM04 Data/Model Poisoning</td>
          <td>部分（限本地 dev、production 訓練屬 backend/07）</td>
          <td>M6 cover 模型來源信任、不 cover 訓練毒化</td>
      </tr>
      <tr>
          <td>LLM05 Improper Output</td>
          <td><a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2 tool use 權限</a></td>
          <td>直接對應</td>
      </tr>
      <tr>
          <td>LLM06 Excessive Agency</td>
          <td><a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2</a> + <a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent 架構</a></td>
          <td>跨原理 + 安全</td>
      </tr>
      <tr>
          <td>LLM07 System Prompt Leakage</td>
          <td>部分（<a href="/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 coding agent harness</a>）</td>
          <td>M6 沒專章、屬 scaffold 設計</td>
      </tr>
      <tr>
          <td>LLM08 Vector / Embedding</td>
          <td>部分（<a href="/blog/llm/04-applications/rag-principles/" data-link-title="4.1 RAG 原理：retrieval &#43; augmentation 模式" data-link-desc="為什麼模型需要外掛知識、語意相似 vs 字面相似、chunking 的本質取捨、retrieval 失敗的根本原因">4.1 RAG</a> + <a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安</a>）</td>
          <td>跨原理 + 應用</td>
      </tr>
      <tr>
          <td>LLM09 Misinformation</td>
          <td><a href="/blog/llm/knowledge-cards/hallucination/" data-link-title="Hallucination" data-link-desc="LLM 生成內容看起來合理但事實錯誤、引用不存在的來源、虛構不存在的 entity 的現象">hallucination</a> 卡 + <a href="/blog/llm/04-applications/llm-as-judge/" data-link-title="4.21 LLM-as-Judge 評估方法" data-link-desc="LLM 評估 LLM 的 production eval 方法：rubric design、pairwise / direct scoring、三大 bias 緩解、跟 trace 串接的閉環、calibration">4.21 LLM-as-judge</a></td>
          <td>跨卡 + 應用</td>
      </tr>
      <tr>
          <td>LLM10 Unbounded Consumption</td>
          <td>部分（<a href="/blog/llm/04-applications/prompt-caching-engineering/" data-link-title="4.18 Prompt caching 工程實務：cost / latency 最大槓桿" data-link-desc="Prompt cache 怎麼運作、cache_control 設計、coding agent 跟 long-context 的 cache pattern、anti-pattern 跟 cache miss 訊號">4.18 prompt caching</a> + <a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安 abuse</a>）</td>
          <td>M6 沒專章、屬 abuse 緩解</td>
      </tr>
  </tbody>
</table>
<h2 id="設計責任">設計責任</h2>
<p>讀企業 LLM 安全 / 合規文件 / vendor security audit 看到「OWASP LLM Top 10」就是這 framing。寫 code 場景的判讀：</p>
<ol>
<li><strong>跟企業溝通必備</strong>：安全 team / vendor audit 都用 OWASP 編號、能 map 自己應用到 LLM01-LLM10 就能 align 對話</li>
<li><strong>不是 production 才需要看</strong>：個人 dev 也適用大部分（LLM01 prompt injection、LLM03 supply chain、LLM06 excessive agency 對個人都直接相關）</li>
<li><strong>跟 <a href="/blog/llm/06-security/owasp-llm-top10-mapping/" data-link-title="6.6 OWASP LLM Top 10 對照圖" data-link-desc="把模組六的本地 dev 視角安全章節對照到 OWASP LLM Top 10 2025、補出個人 dev 場景跟企業合規溝通的共同詞彙">6.6 OWASP 對照章節</a> 的關係</strong>：本卡是定義 + mapping、章節是詳細 mapping + 個人 dev 場景的對應 control</li>
</ol>
]]></content:encoded></item><item><title>Prompt Injection</title><link>https://tarrragon.github.io/blog/llm/knowledge-cards/prompt-injection/</link><pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/llm/knowledge-cards/prompt-injection/</guid><description>&lt;p>Prompt injection 的核心概念是「攻擊者把惡意指令藏進 LLM 會讀到的內容（檔案、網頁、issue、tool 回傳）、誘導 LLM 忽略原本的 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/system-prompt/" data-link-title="System Prompt" data-link-desc="LLM application 中由開發者預設、不直接顯示給使用者的指令層、定義模型的角色、行為規範、輸出格式">system prompt&lt;/a>、改執行攻擊者意圖的動作」。OWASP &lt;a href="https://owasp.org/www-project-top-10-for-large-language-model-applications/">LLM Top 10&lt;/a> 把它列為 LLM01、是 LLM application 安全的頭號威脅。&lt;/p>
&lt;h2 id="概念位置">概念位置&lt;/h2>
&lt;p>Prompt injection 的兩種主要形態：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>形態&lt;/th>
 &lt;th>描述&lt;/th>
 &lt;th>個人 dev 場景的觸發路徑&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>Direct injection&lt;/td>
 &lt;td>使用者自己 prompt 內含惡意指令&lt;/td>
 &lt;td>較少發生、主要是測試場景&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>Indirect injection&lt;/td>
 &lt;td>LLM 讀到的別人內容含惡意指令&lt;/td>
 &lt;td>主要威脅形態&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;p>Indirect injection 的常見入口：&lt;/p>
&lt;ol>
&lt;li>&lt;strong>檔案內容&lt;/strong>：codebase 中的 README、依賴的 package README、PDF / Word 文件&lt;/li>
&lt;li>&lt;strong>Web 內容&lt;/strong>：tool 抓的網頁、社群留言、PR 描述&lt;/li>
&lt;li>&lt;strong>tool 回傳結果&lt;/strong>：DB 查詢結果、API response、其他 service 回傳&lt;/li>
&lt;li>&lt;strong>使用者貼上內容&lt;/strong>：從外部複製貼上、帶進惡意 prompt&lt;/li>
&lt;li>&lt;strong>agent 自我循環中累積&lt;/strong>：sub-agent 回傳、長 agent loop 中前段 injection 影響後段&lt;/li>
&lt;/ol>
&lt;blockquote>
&lt;p>&lt;strong>事實查核註&lt;/strong>：prompt injection 的攻擊形態跟研究進展快速演進、本卡描述參考 &lt;a href="https://owasp.org/www-project-top-10-for-large-language-model-applications/">OWASP LLM Top 10 LLM01&lt;/a> 跟 Greshake et al. 的「Indirect Prompt Injection」論文、引用前以對應的最新版本為準。&lt;/p>&lt;/blockquote>
&lt;p>實際造成影響的不是 injection 本身、是 LLM 輸出後的下游動作：&lt;/p>





&lt;div class="highlight">&lt;pre tabindex="0" class="chroma">&lt;code class="language-text" data-lang="text">&lt;span class="line">&lt;span class="ln">1&lt;/span>&lt;span class="cl">injection → LLM 輸出 → 下游動作（這裡才是真正攻擊面）
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">2&lt;/span>&lt;span class="cl"> ├── 使用者照建議貼到 shell 跑
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">3&lt;/span>&lt;span class="cl"> ├── tool use 自動執行
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">4&lt;/span>&lt;span class="cl"> ├── 寫進 commit / 文件
&lt;/span>&lt;/span>&lt;span class="line">&lt;span class="ln">5&lt;/span>&lt;span class="cl"> └── 觸發下一個 agent&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="設計責任">設計責任&lt;/h2>
&lt;p>理解 prompt injection 後可以解釋兩個現象：為什麼「擋住 injection」對 production LLM application 是不切實際的目標（外部內容會持續引入）、為什麼防禦重點應該放在「下游動作的可逆性 + review checkpoint」（injection 不可完全擋住、但後果可以收斂）。&lt;/p>
&lt;p>防禦設計的層次：&lt;/p>
&lt;ol>
&lt;li>&lt;strong>降低觸發率&lt;/strong>：明確標記 untrusted 內容、強化模型對齊（vendor 端責任）。&lt;/li>
&lt;li>&lt;strong>限制能力上限&lt;/strong>：&lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/tool-use/" data-link-title="Tool Use" data-link-desc="LLM 透過結構化呼叫外部工具（讀檔、查資料庫、發 API request）來擴展能力的設計、function calling 跟 MCP 是常見實作">tool use&lt;/a> 白名單、副作用可逆性、agent loop 步數限制。&lt;/li>
&lt;li>&lt;strong>後果可控&lt;/strong>：人為 review checkpoint、自動偵測異常（見 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/llm-as-service-detection-coverage/" data-link-title="LLM Service 偵測訊號覆蓋" data-link-desc="production LLM 服務的 detection 訊號設計：tool call 異常模式、prompt injection 觸發徵兆、abuse 跟濫用模式、跟既有 detection-coverage 框架的接合">LLM Service 偵測訊號覆蓋&lt;/a>）。&lt;/li>
&lt;/ol>
&lt;p>詳見 &lt;a href="https://tarrragon.github.io/blog/llm/06-security/prompt-injection-in-ide/" data-link-title="6.3 IDE 場景的 prompt injection" data-link-desc="個人 dev 場景下 IDE 寫 code 工作流的 prompt injection：codebase 內容、外部文件、剪貼簿作為攻擊面、跟雲端 LLM 場景的差異">6.3 IDE 場景的 prompt injection&lt;/a> 跟 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/llm-prompt-injection-in-agent/" data-link-title="LLM Agent Prompt Injection 後果治理" data-link-desc="production LLM agent 場景的 prompt injection 後果：tool spec 設計、agent loop 限制、review checkpoint、跟 incident workflow 的接合">LLM Agent Prompt Injection 後果治理&lt;/a>。&lt;/p></description><content:encoded><![CDATA[<p>Prompt injection 的核心概念是「攻擊者把惡意指令藏進 LLM 會讀到的內容（檔案、網頁、issue、tool 回傳）、誘導 LLM 忽略原本的 <a href="/blog/llm/knowledge-cards/system-prompt/" data-link-title="System Prompt" data-link-desc="LLM application 中由開發者預設、不直接顯示給使用者的指令層、定義模型的角色、行為規範、輸出格式">system prompt</a>、改執行攻擊者意圖的動作」。OWASP <a href="https://owasp.org/www-project-top-10-for-large-language-model-applications/">LLM Top 10</a> 把它列為 LLM01、是 LLM application 安全的頭號威脅。</p>
<h2 id="概念位置">概念位置</h2>
<p>Prompt injection 的兩種主要形態：</p>
<table>
  <thead>
      <tr>
          <th>形態</th>
          <th>描述</th>
          <th>個人 dev 場景的觸發路徑</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>Direct injection</td>
          <td>使用者自己 prompt 內含惡意指令</td>
          <td>較少發生、主要是測試場景</td>
      </tr>
      <tr>
          <td>Indirect injection</td>
          <td>LLM 讀到的別人內容含惡意指令</td>
          <td>主要威脅形態</td>
      </tr>
  </tbody>
</table>
<p>Indirect injection 的常見入口：</p>
<ol>
<li><strong>檔案內容</strong>：codebase 中的 README、依賴的 package README、PDF / Word 文件</li>
<li><strong>Web 內容</strong>：tool 抓的網頁、社群留言、PR 描述</li>
<li><strong>tool 回傳結果</strong>：DB 查詢結果、API response、其他 service 回傳</li>
<li><strong>使用者貼上內容</strong>：從外部複製貼上、帶進惡意 prompt</li>
<li><strong>agent 自我循環中累積</strong>：sub-agent 回傳、長 agent loop 中前段 injection 影響後段</li>
</ol>
<blockquote>
<p><strong>事實查核註</strong>：prompt injection 的攻擊形態跟研究進展快速演進、本卡描述參考 <a href="https://owasp.org/www-project-top-10-for-large-language-model-applications/">OWASP LLM Top 10 LLM01</a> 跟 Greshake et al. 的「Indirect Prompt Injection」論文、引用前以對應的最新版本為準。</p></blockquote>
<p>實際造成影響的不是 injection 本身、是 LLM 輸出後的下游動作：</p>





<div class="highlight"><pre tabindex="0" class="chroma"><code class="language-text" data-lang="text"><span class="line"><span class="ln">1</span><span class="cl">injection → LLM 輸出 → 下游動作（這裡才是真正攻擊面）
</span></span><span class="line"><span class="ln">2</span><span class="cl">                       ├── 使用者照建議貼到 shell 跑
</span></span><span class="line"><span class="ln">3</span><span class="cl">                       ├── tool use 自動執行
</span></span><span class="line"><span class="ln">4</span><span class="cl">                       ├── 寫進 commit / 文件
</span></span><span class="line"><span class="ln">5</span><span class="cl">                       └── 觸發下一個 agent</span></span></code></pre></div><h2 id="設計責任">設計責任</h2>
<p>理解 prompt injection 後可以解釋兩個現象：為什麼「擋住 injection」對 production LLM application 是不切實際的目標（外部內容會持續引入）、為什麼防禦重點應該放在「下游動作的可逆性 + review checkpoint」（injection 不可完全擋住、但後果可以收斂）。</p>
<p>防禦設計的層次：</p>
<ol>
<li><strong>降低觸發率</strong>：明確標記 untrusted 內容、強化模型對齊（vendor 端責任）。</li>
<li><strong>限制能力上限</strong>：<a href="/blog/llm/knowledge-cards/tool-use/" data-link-title="Tool Use" data-link-desc="LLM 透過結構化呼叫外部工具（讀檔、查資料庫、發 API request）來擴展能力的設計、function calling 跟 MCP 是常見實作">tool use</a> 白名單、副作用可逆性、agent loop 步數限制。</li>
<li><strong>後果可控</strong>：人為 review checkpoint、自動偵測異常（見 <a href="/blog/backend/07-security-data-protection/llm-as-service-detection-coverage/" data-link-title="LLM Service 偵測訊號覆蓋" data-link-desc="production LLM 服務的 detection 訊號設計：tool call 異常模式、prompt injection 觸發徵兆、abuse 跟濫用模式、跟既有 detection-coverage 框架的接合">LLM Service 偵測訊號覆蓋</a>）。</li>
</ol>
<p>詳見 <a href="/blog/llm/06-security/prompt-injection-in-ide/" data-link-title="6.3 IDE 場景的 prompt injection" data-link-desc="個人 dev 場景下 IDE 寫 code 工作流的 prompt injection：codebase 內容、外部文件、剪貼簿作為攻擊面、跟雲端 LLM 場景的差異">6.3 IDE 場景的 prompt injection</a> 跟 <a href="/blog/backend/07-security-data-protection/llm-prompt-injection-in-agent/" data-link-title="LLM Agent Prompt Injection 後果治理" data-link-desc="production LLM agent 場景的 prompt injection 後果：tool spec 設計、agent loop 限制、review checkpoint、跟 incident workflow 的接合">LLM Agent Prompt Injection 後果治理</a>。</p>
]]></content:encoded></item><item><title>6.6 OWASP LLM Top 10 對照圖</title><link>https://tarrragon.github.io/blog/llm/06-security/owasp-llm-top10-mapping/</link><pubDate>Tue, 12 May 2026 00:00:00 +0000</pubDate><guid>https://tarrragon.github.io/blog/llm/06-security/owasp-llm-top10-mapping/</guid><description>&lt;p>模組六前面六章是「個人 dev 視角」的本地 LLM 安全議題、用本 blog 自己的 framing 組織。但企業 / 合規 / vendor audit 場景的共同詞彙是 &lt;a href="https://tarrragon.github.io/blog/llm/knowledge-cards/owasp-llm-top10/" data-link-title="OWASP LLM Top 10" data-link-desc="LLM 應用最常見 10 大資安風險的業界共同詞彙、跟模組六本地 dev 視角的 mapping 表">OWASP LLM Top 10&lt;/a>（2023 首發、2025 更新版）。本章把模組六 + 模組四相關章節對照到 OWASP 編號、補出「同議題、不同詞彙」的 mapping、讓讀者跟企業安全 team 溝通時能 align。&lt;/p>
&lt;h2 id="本章目標">本章目標&lt;/h2>
&lt;p>讀完本章後、你應該能：&lt;/p>
&lt;ol>
&lt;li>對照 OWASP LLM Top 10（LLM01-LLM10）跟自己工作流的具體風險。&lt;/li>
&lt;li>看到 enterprise security audit 報告用 OWASP 編號、能 map 到模組六章節找對應 control。&lt;/li>
&lt;li>知道哪些 OWASP 項目模組六完整覆蓋、哪些只覆蓋部分、哪些屬其他模組或 backend/07。&lt;/li>
&lt;/ol>
&lt;h2 id="owasp-llm-top-10-2025">OWASP LLM Top 10 2025&lt;/h2>
&lt;p>OWASP（Open Worldwide Application Security Project）的 LLM 應用安全清單、2025 更新版：&lt;/p>
&lt;table>
 &lt;thead>
 &lt;tr>
 &lt;th>編號&lt;/th>
 &lt;th>名稱&lt;/th>
 &lt;th>一句話描述&lt;/th>
 &lt;/tr>
 &lt;/thead>
 &lt;tbody>
 &lt;tr>
 &lt;td>LLM01&lt;/td>
 &lt;td>Prompt Injection&lt;/td>
 &lt;td>惡意指令藏進 LLM 會讀到的內容、間接影響模型行為&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM02&lt;/td>
 &lt;td>Sensitive Information Disclosure&lt;/td>
 &lt;td>LLM 輸出洩漏訓練資料 / system prompt / PII / 機密&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM03&lt;/td>
 &lt;td>Supply Chain&lt;/td>
 &lt;td>模型 / 訓練資料 / 工具 / dependency 供應鏈攻擊&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM04&lt;/td>
 &lt;td>Data and Model Poisoning&lt;/td>
 &lt;td>訓練資料污染、模型行為被植入後門&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM05&lt;/td>
 &lt;td>Improper Output Handling&lt;/td>
 &lt;td>LLM 輸出未驗證直接執行（XSS / SQLi / RCE）&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM06&lt;/td>
 &lt;td>Excessive Agency&lt;/td>
 &lt;td>Agent 工具權限過大、副作用不可控&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM07&lt;/td>
 &lt;td>System Prompt Leakage&lt;/td>
 &lt;td>System prompt 被使用者誘導露出&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM08&lt;/td>
 &lt;td>Vector and Embedding Weaknesses&lt;/td>
 &lt;td>Vector DB / embedding pipeline 的攻擊面&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM09&lt;/td>
 &lt;td>Misinformation&lt;/td>
 &lt;td>Hallucination / 過度信任 LLM 輸出&lt;/td>
 &lt;/tr>
 &lt;tr>
 &lt;td>LLM10&lt;/td>
 &lt;td>Unbounded Consumption&lt;/td>
 &lt;td>Resource exhaustion / cost runaway（DoS / 燒錢）&lt;/td>
 &lt;/tr>
 &lt;/tbody>
&lt;/table>
&lt;blockquote>
&lt;p>&lt;strong>事實查核註&lt;/strong>：OWASP 列表會定期更新（2023 → 2025、未來會有新版）、引用前以 &lt;a href="https://owasp.org/www-project-top-10-for-large-language-model-applications/">OWASP LLM Top 10&lt;/a> 當前版為準。&lt;/p>&lt;/blockquote>
&lt;h2 id="詳細-mapping">詳細 mapping&lt;/h2>
&lt;h3 id="llm01-prompt-injection">LLM01 Prompt Injection&lt;/h3>
&lt;p>&lt;strong>OWASP 範圍&lt;/strong>：使用者輸入 / 外部資料 / RAG retrieved content 中藏指令、影響模型行為。包含 direct injection（user 自己注）跟 indirect injection（內容裡有人塞）。&lt;/p>
&lt;p>&lt;strong>模組六對應&lt;/strong>：&lt;/p>
&lt;ul>
&lt;li>&lt;strong>主章節&lt;/strong>：&lt;a href="https://tarrragon.github.io/blog/llm/06-security/prompt-injection-in-ide/" data-link-title="6.3 IDE 場景的 prompt injection" data-link-desc="個人 dev 場景下 IDE 寫 code 工作流的 prompt injection：codebase 內容、外部文件、剪貼簿作為攻擊面、跟雲端 LLM 場景的差異">6.3 IDE 場景的 prompt injection&lt;/a>&lt;/li>
&lt;li>&lt;strong>覆蓋&lt;/strong>：間接注入（codebase / 第三方依賴 / issue / 剪貼簿 / web fetch）、本地 LLM 跟雲端 LLM 的抵抗能力差異、IDE 場景的具體入口&lt;/li>
&lt;li>&lt;strong>不在 M6 範圍&lt;/strong>：production agent 場景的 prompt injection 後果（資料外洩 / 誤觸 tool）見 &lt;a href="https://tarrragon.github.io/blog/backend/07-security-data-protection/llm-prompt-injection-in-agent/" data-link-title="LLM Agent Prompt Injection 後果治理" data-link-desc="production LLM agent 場景的 prompt injection 後果：tool spec 設計、agent loop 限制、review checkpoint、跟 incident workflow 的接合">backend/07 LLM agent prompt injection&lt;/a>&lt;/li>
&lt;/ul>
&lt;p>&lt;strong>個人 dev 場景的最低 control&lt;/strong>：RAG exclude &lt;code>.env&lt;/code> / secrets、tool use 加 confirm（見 &lt;a href="https://tarrragon.github.io/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2&lt;/a>）、agent loop 設 max steps、untrusted 來源內容明確標記&lt;/p></description><content:encoded><![CDATA[<p>模組六前面六章是「個人 dev 視角」的本地 LLM 安全議題、用本 blog 自己的 framing 組織。但企業 / 合規 / vendor audit 場景的共同詞彙是 <a href="/blog/llm/knowledge-cards/owasp-llm-top10/" data-link-title="OWASP LLM Top 10" data-link-desc="LLM 應用最常見 10 大資安風險的業界共同詞彙、跟模組六本地 dev 視角的 mapping 表">OWASP LLM Top 10</a>（2023 首發、2025 更新版）。本章把模組六 + 模組四相關章節對照到 OWASP 編號、補出「同議題、不同詞彙」的 mapping、讓讀者跟企業安全 team 溝通時能 align。</p>
<h2 id="本章目標">本章目標</h2>
<p>讀完本章後、你應該能：</p>
<ol>
<li>對照 OWASP LLM Top 10（LLM01-LLM10）跟自己工作流的具體風險。</li>
<li>看到 enterprise security audit 報告用 OWASP 編號、能 map 到模組六章節找對應 control。</li>
<li>知道哪些 OWASP 項目模組六完整覆蓋、哪些只覆蓋部分、哪些屬其他模組或 backend/07。</li>
</ol>
<h2 id="owasp-llm-top-10-2025">OWASP LLM Top 10 2025</h2>
<p>OWASP（Open Worldwide Application Security Project）的 LLM 應用安全清單、2025 更新版：</p>
<table>
  <thead>
      <tr>
          <th>編號</th>
          <th>名稱</th>
          <th>一句話描述</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>LLM01</td>
          <td>Prompt Injection</td>
          <td>惡意指令藏進 LLM 會讀到的內容、間接影響模型行為</td>
      </tr>
      <tr>
          <td>LLM02</td>
          <td>Sensitive Information Disclosure</td>
          <td>LLM 輸出洩漏訓練資料 / system prompt / PII / 機密</td>
      </tr>
      <tr>
          <td>LLM03</td>
          <td>Supply Chain</td>
          <td>模型 / 訓練資料 / 工具 / dependency 供應鏈攻擊</td>
      </tr>
      <tr>
          <td>LLM04</td>
          <td>Data and Model Poisoning</td>
          <td>訓練資料污染、模型行為被植入後門</td>
      </tr>
      <tr>
          <td>LLM05</td>
          <td>Improper Output Handling</td>
          <td>LLM 輸出未驗證直接執行（XSS / SQLi / RCE）</td>
      </tr>
      <tr>
          <td>LLM06</td>
          <td>Excessive Agency</td>
          <td>Agent 工具權限過大、副作用不可控</td>
      </tr>
      <tr>
          <td>LLM07</td>
          <td>System Prompt Leakage</td>
          <td>System prompt 被使用者誘導露出</td>
      </tr>
      <tr>
          <td>LLM08</td>
          <td>Vector and Embedding Weaknesses</td>
          <td>Vector DB / embedding pipeline 的攻擊面</td>
      </tr>
      <tr>
          <td>LLM09</td>
          <td>Misinformation</td>
          <td>Hallucination / 過度信任 LLM 輸出</td>
      </tr>
      <tr>
          <td>LLM10</td>
          <td>Unbounded Consumption</td>
          <td>Resource exhaustion / cost runaway（DoS / 燒錢）</td>
      </tr>
  </tbody>
</table>
<blockquote>
<p><strong>事實查核註</strong>：OWASP 列表會定期更新（2023 → 2025、未來會有新版）、引用前以 <a href="https://owasp.org/www-project-top-10-for-large-language-model-applications/">OWASP LLM Top 10</a> 當前版為準。</p></blockquote>
<h2 id="詳細-mapping">詳細 mapping</h2>
<h3 id="llm01-prompt-injection">LLM01 Prompt Injection</h3>
<p><strong>OWASP 範圍</strong>：使用者輸入 / 外部資料 / RAG retrieved content 中藏指令、影響模型行為。包含 direct injection（user 自己注）跟 indirect injection（內容裡有人塞）。</p>
<p><strong>模組六對應</strong>：</p>
<ul>
<li><strong>主章節</strong>：<a href="/blog/llm/06-security/prompt-injection-in-ide/" data-link-title="6.3 IDE 場景的 prompt injection" data-link-desc="個人 dev 場景下 IDE 寫 code 工作流的 prompt injection：codebase 內容、外部文件、剪貼簿作為攻擊面、跟雲端 LLM 場景的差異">6.3 IDE 場景的 prompt injection</a></li>
<li><strong>覆蓋</strong>：間接注入（codebase / 第三方依賴 / issue / 剪貼簿 / web fetch）、本地 LLM 跟雲端 LLM 的抵抗能力差異、IDE 場景的具體入口</li>
<li><strong>不在 M6 範圍</strong>：production agent 場景的 prompt injection 後果（資料外洩 / 誤觸 tool）見 <a href="/blog/backend/07-security-data-protection/llm-prompt-injection-in-agent/" data-link-title="LLM Agent Prompt Injection 後果治理" data-link-desc="production LLM agent 場景的 prompt injection 後果：tool spec 設計、agent loop 限制、review checkpoint、跟 incident workflow 的接合">backend/07 LLM agent prompt injection</a></li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：RAG exclude <code>.env</code> / secrets、tool use 加 confirm（見 <a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2</a>）、agent loop 設 max steps、untrusted 來源內容明確標記</p>
<h3 id="llm02-sensitive-information-disclosure">LLM02 Sensitive Information Disclosure</h3>
<p><strong>OWASP 範圍</strong>：模型輸出洩漏訓練資料、system prompt、PII、商業機密、API key。</p>
<p><strong>模組六對應</strong>：</p>
<ul>
<li><strong>主章節</strong>：<a href="/blog/llm/06-security/cross-cloud-local-data-boundary/" data-link-title="6.4 跨雲端 / 本地的資料邊界" data-link-desc="個人 dev 場景下混用雲端 LLM 跟本地 LLM 時的 prompt 洩漏點：Continue.dev 多 provider 設定、隱私資料流、按敏感度分流的判讀">6.4 跨雲端 / 本地的資料邊界</a></li>
<li><strong>覆蓋</strong>：跨雲端 prompt 邊界、第三方 plugin 偷送 prompt、API key 不放在前端 JS</li>
<li><strong>補充章節</strong>：<a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 / serverless RAG 資安</a> 的 API key 暴露段、user query 隱私段</li>
<li><strong>不在 M6 範圍</strong>：企業合規（GDPR / HIPAA / SOC 2）的逐條檢核屬 <a href="/blog/backend/07-security-data-protection/" data-link-title="模組七：資安與資料保護" data-link-desc="以問題驅動方式擴充資安知識網：先定義服務環節問題，再以案例作為觸發式參考">backend/07</a></li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：本地敏感任務不送雲端、雲端 model 明確標記、API key 從環境變數讀</p>
<h3 id="llm03-supply-chain">LLM03 Supply Chain</h3>
<p><strong>OWASP 範圍</strong>：模型權重、訓練資料、tokenizer、dependency 套件、MCP server 等的供應鏈風險。</p>
<p><strong>模組六對應</strong>：</p>
<ul>
<li><strong>主章節</strong>：<a href="/blog/llm/06-security/model-supply-chain-trust/" data-link-title="6.0 模型供應鏈與信任邊界" data-link-desc="個人 dev 用本地 LLM 時的模型權重來源信任：GGUF 完整性、Hugging Face / Ollama registry 信任、量化版本污染、檔案完整性檢查">6.0 模型供應鏈與信任邊界</a></li>
<li><strong>覆蓋</strong>：GGUF / HuggingFace / Ollama registry 信任、量化版本污染、權重完整性、MCP server 信任</li>
<li><strong>補充</strong>：<a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安</a> 的 client-side LLM 模型 CDN 信任段</li>
<li><strong>不在 M6 範圍</strong>：production 模型 release / SBOM / artifact provenance 屬 <a href="/blog/backend/07-security-data-protection/supply-chain-integrity-and-artifact-trust/" data-link-title="7.12 供應鏈完整性與 Artifact 信任" data-link-desc="定義 build provenance、artifact 信任與交付鏈風險問題">backend/07 supply chain</a></li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：選主流作者 / 量化者、下載後 hash 比對、MCP server 跑 sandbox</p>
<h3 id="llm04-data-and-model-poisoning">LLM04 Data and Model Poisoning</h3>
<p><strong>OWASP 範圍</strong>：訓練資料被植入惡意樣本、fine-tune 資料污染、模型行為後門。</p>
<p><strong>模組六對應</strong>：<strong>部分覆蓋</strong></p>
<ul>
<li><strong>覆蓋</strong>：<a href="/blog/llm/06-security/model-supply-chain-trust/" data-link-title="6.0 模型供應鏈與信任邊界" data-link-desc="個人 dev 用本地 LLM 時的模型權重來源信任：GGUF 完整性、Hugging Face / Ollama registry 信任、量化版本污染、檔案完整性檢查">6.0 模型供應鏈</a> 的「量化版本污染」段、選主流作者的 framing</li>
<li><strong>不在 M6 範圍</strong>：自己 train base model 或 large-scale fine-tune 的資料治理屬研究 / production team 範圍、見 <a href="/blog/llm/03-theoretical-foundations/training-pipeline/" data-link-title="3.4 訓練流程：pre-train → SFT → RLHF" data-link-desc="LLM 的三階段訓練：預訓練、指令微調、人類反饋強化學習；各階段目標與最新替代方案">3.4 訓練流程</a> 概念 + <a href="/blog/llm/01-local-llm-services/hands-on/local-fine-tuning/" data-link-title="Hands-on：用 QLoRA 在本機 fine-tune coding 模型" data-link-desc="Apple Silicon Mac / PC 獨立 GPU 上跑 QLoRA fine-tune 的完整流程：環境、資料、訓練、evaluation、合併、部署到 Ollama">1.x hands-on local-fine-tune</a> 的小規模 fine-tune 注意事項</li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：個人 dev 多用既有模型、threat model 不涵蓋自訓 base、用主流作者降低 poisoning 風險</p>
<h3 id="llm05-improper-output-handling">LLM05 Improper Output Handling</h3>
<p><strong>OWASP 範圍</strong>：把 LLM 輸出直接餵給下游系統（執行、render、SQL query）、若 LLM 輸出含惡意內容、下游 XSS / SQLi / RCE。</p>
<p><strong>模組六對應</strong>：</p>
<ul>
<li><strong>主章節</strong>：<a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2 tool use 與 MCP server 的權限模型</a></li>
<li><strong>覆蓋</strong>：tool 副作用範圍 spectrum、可逆性、confirm 機制</li>
<li><strong>補充原理</strong>：<a href="/blog/llm/04-applications/tool-use-principles/" data-link-title="4.3 Tool use 原理：LLM 跟外部世界互動" data-link-desc="Structured output 是 LLM 跨入工程系統的橋、function calling 取捨、為什麼本地小模型 tool use 表現崩潰">4.3 tool use 副作用範圍設計</a></li>
<li><strong>不在 M6 範圍</strong>：web app 場景的 output sanitization、CSP、render escape 屬一般 web 安全 + <a href="/blog/backend/07-security-data-protection/" data-link-title="模組七：資安與資料保護" data-link-desc="以問題驅動方式擴充資安知識網：先定義服務環節問題，再以案例作為觸發式參考">backend/07</a></li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：副作用類 tool 加 confirm、shell 命令前 review、git track + diff</p>
<h3 id="llm06-excessive-agency">LLM06 Excessive Agency</h3>
<p><strong>OWASP 範圍</strong>：Agent 工具權限過大、副作用範圍超出需求、agent loop 太自主沒人類審查。</p>
<p><strong>模組六對應</strong>：</p>
<ul>
<li><strong>主章節</strong>：<a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2 tool use 權限</a> + <a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 Agent 跟人類審查協作</a></li>
<li><strong>覆蓋</strong>：sandbox / 白名單 / 副作用可逆性、agent 人類審查 spectrum、coding agent 的 permission boundary（<a href="/blog/llm/01-local-llm-services/hands-on/permission-boundary/" data-link-title="Hands-on：Ollama 改檔案 / 寫程式碼的權限邊界在哪" data-link-desc="四組對照實驗：Ollama 自己沒 FS / shell 權限、wrapper 才有；--dry-run / --confirm / --auto 三檔審查粒度的取捨">hands-on</a>）</li>
<li><strong>補充</strong>：<a href="/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 coding agent harness</a> 的 permission boundary 設計</li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：副作用 tool 加 confirm、agent max steps、production-level tool 不放在 dev agent 可達範圍</p>
<h3 id="llm07-system-prompt-leakage">LLM07 System Prompt Leakage</h3>
<p><strong>OWASP 範圍</strong>：使用者透過 prompt engineering 誘導 LLM 露出 system prompt 內容、暴露商業邏輯 / 提示工程 know-how。</p>
<p><strong>模組六對應</strong>：<strong>部分</strong></p>
<ul>
<li><strong>覆蓋</strong>：<a href="/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 coding agent harness</a> 的 scaffold 設計提到 system prompt 是核心元件、但沒專門講 leakage</li>
<li><strong>不在 M6 範圍</strong>：sysprompt leak 主要是 production 商業祕密議題、屬 backend/07 / 各 vendor docs</li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：不要把 secret（API key、internal info）寫在 system prompt、敏感邏輯放後端而非 prompt</p>
<h3 id="llm08-vector-and-embedding-weaknesses">LLM08 Vector and Embedding Weaknesses</h3>
<p><strong>OWASP 範圍</strong>：Vector DB 被污染、embedding model 被攻擊、retrieval pipeline 被注入毒文件、跨租戶 vector 污染。</p>
<p><strong>模組六對應</strong>：<strong>部分</strong></p>
<ul>
<li><strong>覆蓋</strong>：<a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安</a> 的「第三方 SaaS 信任」段、跨租戶 isolation 議題</li>
<li><strong>補充原理</strong>：<a href="/blog/llm/04-applications/rag-principles/" data-link-title="4.1 RAG 原理：retrieval &#43; augmentation 模式" data-link-desc="為什麼模型需要外掛知識、語意相似 vs 字面相似、chunking 的本質取捨、retrieval 失敗的根本原因">4.1 RAG 原理</a> 的失敗模式、<a href="/blog/llm/04-applications/embedding-model-internals/" data-link-title="4.12 Embedding model 內部：訓練、選型、in-domain fine-tune" data-link-desc="Embedding model 怎麼訓練（contrastive learning &#43; hard negative mining）、怎麼挑（MTEB / 大小 / domain）、何時該自己 fine-tune">4.12 embedding model 內部</a></li>
<li><strong>不在 M6 範圍</strong>：production multi-tenant vector DB 屬 <a href="/blog/backend/07-security-data-protection/llm-multi-tenant-isolation/" data-link-title="LLM 多租戶推論隔離" data-link-desc="production LLM 服務的多租戶隔離：KV cache 不共享、log / model artifact 隔離、跨用戶 prompt 洩漏面">backend/07 多租戶 isolation</a></li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：RAG ingestion 加 PII / secret filter、vector DB 選 search-only key、不混跨 user vector</p>
<h3 id="llm09-misinformation">LLM09 Misinformation</h3>
<p><strong>OWASP 範圍</strong>：LLM hallucination 被當真實、使用者過度信任輸出做 critical 決定。</p>
<p><strong>模組六對應</strong>：<strong>跨章節</strong></p>
<ul>
<li><strong>概念基礎</strong>：<a href="/blog/llm/knowledge-cards/hallucination/" data-link-title="Hallucination" data-link-desc="LLM 生成內容看起來合理但事實錯誤、引用不存在的來源、虛構不存在的 entity 的現象">hallucination 卡</a></li>
<li><strong>評估方法</strong>：<a href="/blog/llm/04-applications/benchmarking-and-evaluation/" data-link-title="4.14 Benchmarking 與評估方法論" data-link-desc="判讀 model card benchmark 數字、做自己工作流的 in-house benchmark、量測本地推論速度的完整方法論">4.14 benchmarking</a> + <a href="/blog/llm/04-applications/llm-as-judge/" data-link-title="4.21 LLM-as-Judge 評估方法" data-link-desc="LLM 評估 LLM 的 production eval 方法：rubric design、pairwise / direct scoring、三大 bias 緩解、跟 trace 串接的閉環、calibration">4.21 LLM-as-judge</a></li>
<li><strong>應用層緩解</strong>：<a href="/blog/llm/04-applications/rag-principles/" data-link-title="4.1 RAG 原理：retrieval &#43; augmentation 模式" data-link-desc="為什麼模型需要外掛知識、語意相似 vs 字面相似、chunking 的本質取捨、retrieval 失敗的根本原因">4.1 RAG</a>（給 LLM 外掛真實知識）、<a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent</a> 的人類審查 spectrum</li>
<li><strong>不在 M6 範圍</strong>：M6 預設 dev 自己驗證輸出、不專章寫</li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：critical 任務人類 review、複雜推理用 reasoning model、code 生成必跑 test</p>
<h3 id="llm10-unbounded-consumption">LLM10 Unbounded Consumption</h3>
<p><strong>OWASP 範圍</strong>：Resource exhaustion（context / token / GPU memory 燒爆）、cost runaway（API quota 被偷用 / agent 無限 loop 燒錢）。</p>
<p><strong>模組六對應</strong>：<strong>部分</strong></p>
<ul>
<li><strong>覆蓋</strong>：<a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安</a> 的「rate limit / abuse」段、靜態前端被 scrape 後燒 LLM quota 的情境</li>
<li><strong>補充</strong>：<a href="/blog/llm/04-applications/prompt-caching-engineering/" data-link-title="4.18 Prompt caching 工程實務：cost / latency 最大槓桿" data-link-desc="Prompt cache 怎麼運作、cache_control 設計、coding agent 跟 long-context 的 cache pattern、anti-pattern 跟 cache miss 訊號">4.18 prompt caching</a>（<a href="/blog/llm/knowledge-cards/prompt-cache/" data-link-title="Prompt Cache" data-link-desc="重複出現的 prompt prefix 在推論伺服器或 LLM 服務端被 cache、後續 query 跳過 prefill、大幅降 cost 跟 TTFT">Prompt Cache</a>、cost 控制）、<a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent</a> 的 termination（max steps / cost cap）、<a href="/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 coding agent harness</a> 的 budget management</li>
<li><strong>不在 M6 範圍</strong>：production rate limiting / DDoS 防護屬 <a href="/blog/backend/07-security-data-protection/entrypoint-and-server-protection/" data-link-title="7.3 入口治理與伺服器防護" data-link-desc="以問題驅動方式整理對外入口、管理平面與伺服器邊界">backend/07 entrypoint protection</a></li>
</ul>
<p><strong>個人 dev 場景的最低 control</strong>：agent 設 max_steps / max_cost、API key 不放前端 JS、用 edge function 加 rate limit</p>
<h2 id="速查表">速查表</h2>
<p>按 OWASP 編號排序、給定 OWASP 項目可快速找對應 control 章節：</p>
<table>
  <thead>
      <tr>
          <th>OWASP</th>
          <th>主章節</th>
          <th>補充章節 / 卡片</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>LLM01</td>
          <td><a href="/blog/llm/06-security/prompt-injection-in-ide/" data-link-title="6.3 IDE 場景的 prompt injection" data-link-desc="個人 dev 場景下 IDE 寫 code 工作流的 prompt injection：codebase 內容、外部文件、剪貼簿作為攻擊面、跟雲端 LLM 場景的差異">6.3</a></td>
          <td><a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 agent loop</a>、<a href="/blog/llm/01-local-llm-services/hands-on/permission-boundary/" data-link-title="Hands-on：Ollama 改檔案 / 寫程式碼的權限邊界在哪" data-link-desc="四組對照實驗：Ollama 自己沒 FS / shell 權限、wrapper 才有；--dry-run / --confirm / --auto 三檔審查粒度的取捨">hands-on permission-boundary</a></td>
      </tr>
      <tr>
          <td>LLM02</td>
          <td><a href="/blog/llm/06-security/cross-cloud-local-data-boundary/" data-link-title="6.4 跨雲端 / 本地的資料邊界" data-link-desc="個人 dev 場景下混用雲端 LLM 跟本地 LLM 時的 prompt 洩漏點：Continue.dev 多 provider 設定、隱私資料流、按敏感度分流的判讀">6.4</a></td>
          <td><a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG</a>、<a href="/blog/llm/00-foundations/privacy-data-flow/" data-link-title="0.7 隱私 / 資安的資料流原理" data-link-desc="從「位置」到「資料流」的思考升級：信任邊界、合約模型、零信任原則套用到 LLM 工作流">0.7</a></td>
      </tr>
      <tr>
          <td>LLM03</td>
          <td><a href="/blog/llm/06-security/model-supply-chain-trust/" data-link-title="6.0 模型供應鏈與信任邊界" data-link-desc="個人 dev 用本地 LLM 時的模型權重來源信任：GGUF 完整性、Hugging Face / Ollama registry 信任、量化版本污染、檔案完整性檢查">6.0</a></td>
          <td><a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 client-side LLM 段</a></td>
      </tr>
      <tr>
          <td>LLM04</td>
          <td><a href="/blog/llm/06-security/model-supply-chain-trust/" data-link-title="6.0 模型供應鏈與信任邊界" data-link-desc="個人 dev 用本地 LLM 時的模型權重來源信任：GGUF 完整性、Hugging Face / Ollama registry 信任、量化版本污染、檔案完整性檢查">6.0</a> 部分</td>
          <td><a href="/blog/llm/03-theoretical-foundations/training-pipeline/" data-link-title="3.4 訓練流程：pre-train → SFT → RLHF" data-link-desc="LLM 的三階段訓練：預訓練、指令微調、人類反饋強化學習；各階段目標與最新替代方案">3.4 訓練流程</a>、<a href="/blog/llm/01-local-llm-services/hands-on/local-fine-tuning/" data-link-title="Hands-on：用 QLoRA 在本機 fine-tune coding 模型" data-link-desc="Apple Silicon Mac / PC 獨立 GPU 上跑 QLoRA fine-tune 的完整流程：環境、資料、訓練、evaluation、合併、部署到 Ollama">hands-on fine-tune</a></td>
      </tr>
      <tr>
          <td>LLM05</td>
          <td><a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2</a></td>
          <td><a href="/blog/llm/04-applications/tool-use-principles/" data-link-title="4.3 Tool use 原理：LLM 跟外部世界互動" data-link-desc="Structured output 是 LLM 跨入工程系統的橋、function calling 取捨、為什麼本地小模型 tool use 表現崩潰">4.3 tool use 原理</a></td>
      </tr>
      <tr>
          <td>LLM06</td>
          <td><a href="/blog/llm/06-security/tool-use-permission-model/" data-link-title="6.2 tool use 與 MCP server 的權限模型" data-link-desc="個人 dev 場景下 tool use / MCP server 的副作用權限：檔案系統 / shell / 網路存取邊界、第三方 MCP 信任、副作用的可逆性">6.2</a> + <a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4</a></td>
          <td><a href="/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 coding agent harness</a>、<a href="/blog/llm/01-local-llm-services/hands-on/permission-boundary/" data-link-title="Hands-on：Ollama 改檔案 / 寫程式碼的權限邊界在哪" data-link-desc="四組對照實驗：Ollama 自己沒 FS / shell 權限、wrapper 才有；--dry-run / --confirm / --auto 三檔審查粒度的取捨">hands-on permission-boundary</a></td>
      </tr>
      <tr>
          <td>LLM07</td>
          <td><a href="/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 scaffold</a> 部分</td>
          <td><a href="/blog/llm/knowledge-cards/system-prompt/" data-link-title="System Prompt" data-link-desc="LLM application 中由開發者預設、不直接顯示給使用者的指令層、定義模型的角色、行為規範、輸出格式">system prompt 卡</a></td>
      </tr>
      <tr>
          <td>LLM08</td>
          <td><a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安</a> 部分</td>
          <td><a href="/blog/llm/04-applications/rag-principles/" data-link-title="4.1 RAG 原理：retrieval &#43; augmentation 模式" data-link-desc="為什麼模型需要外掛知識、語意相似 vs 字面相似、chunking 的本質取捨、retrieval 失敗的根本原因">4.1 RAG</a>、<a href="/blog/llm/04-applications/embedding-model-internals/" data-link-title="4.12 Embedding model 內部：訓練、選型、in-domain fine-tune" data-link-desc="Embedding model 怎麼訓練（contrastive learning &#43; hard negative mining）、怎麼挑（MTEB / 大小 / domain）、何時該自己 fine-tune">4.12 embedding</a></td>
      </tr>
      <tr>
          <td>LLM09</td>
          <td><a href="/blog/llm/knowledge-cards/hallucination/" data-link-title="Hallucination" data-link-desc="LLM 生成內容看起來合理但事實錯誤、引用不存在的來源、虛構不存在的 entity 的現象">hallucination 卡</a> + <a href="/blog/llm/04-applications/llm-as-judge/" data-link-title="4.21 LLM-as-Judge 評估方法" data-link-desc="LLM 評估 LLM 的 production eval 方法：rubric design、pairwise / direct scoring、三大 bias 緩解、跟 trace 串接的閉環、calibration">4.21</a></td>
          <td><a href="/blog/llm/04-applications/rag-principles/" data-link-title="4.1 RAG 原理：retrieval &#43; augmentation 模式" data-link-desc="為什麼模型需要外掛知識、語意相似 vs 字面相似、chunking 的本質取捨、retrieval 失敗的根本原因">4.1 RAG</a>、<a href="/blog/llm/04-applications/benchmarking-and-evaluation/" data-link-title="4.14 Benchmarking 與評估方法論" data-link-desc="判讀 model card benchmark 數字、做自己工作流的 in-house benchmark、量測本地推論速度的完整方法論">4.14 benchmarking</a></td>
      </tr>
      <tr>
          <td>LLM10</td>
          <td><a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 abuse 段</a> + <a href="/blog/llm/04-applications/prompt-caching-engineering/" data-link-title="4.18 Prompt caching 工程實務：cost / latency 最大槓桿" data-link-desc="Prompt cache 怎麼運作、cache_control 設計、coding agent 跟 long-context 的 cache pattern、anti-pattern 跟 cache miss 訊號">4.18 caching</a></td>
          <td><a href="/blog/llm/04-applications/agent-architecture/" data-link-title="4.4 Agent 架構原理" data-link-desc="Agent loop 結構、失敗模式、什麼任務適合 vs 不適合、跟人類審查的協作模型">4.4 termination</a>、<a href="/blog/llm/04-applications/coding-agent-harness/" data-link-title="4.17 Coding agent harness：scaffold / context engineering / subagent" data-link-desc="Coding agent 的內部設計：scaffold vs harness 分層、context budget 25% 規則、subagent 拓樸、跟 Claude Code / Cursor / Aider 的 mapping">4.17 budget</a></td>
      </tr>
  </tbody>
</table>
<h2 id="跟-backend07-的分工再述">跟 backend/07 的分工再述</h2>
<p>模組六是「<strong>個人 dev 視角</strong>」、跟 <a href="/blog/backend/07-security-data-protection/" data-link-title="模組七：資安與資料保護" data-link-desc="以問題驅動方式擴充資安知識網：先定義服務環節問題，再以案例作為觸發式參考">backend 模組七 資安</a> 是分工關係（<a href="/blog/llm/06-security/routing-to-production-security/" data-link-title="6.5 跨進 production 的 routing 中樞" data-link-desc="個人 dev → 團隊 → production LLM 服務的三層演化、跟 backend/07 對應卡片的 routing 清單">6.5 routing-to-production-security</a> 有詳細）：</p>
<table>
  <thead>
      <tr>
          <th>場景</th>
          <th>看哪</th>
      </tr>
  </thead>
  <tbody>
      <tr>
          <td>個人 dev 在自己機器跑、純粹本地</td>
          <td>模組六 + 模組四</td>
      </tr>
      <tr>
          <td>個人 dev 用雲端 API、自己機器跑</td>
          <td>模組六 + 模組四 + <a href="/blog/llm/04-applications/static-and-serverless-rag-deployment/" data-link-title="4.16 靜態 / serverless RAG deployment：架構選擇與資安取捨" data-link-desc="沒 backend 的場景怎麼做 RAG：四種 deployment 方案、API key 暴露問題、CORS / abuse / 第三方信任、跟模組六的 routing">4.16 靜態 RAG 資安</a></td>
      </tr>
      <tr>
          <td>團隊內部部署 LLM、給內部用戶用</td>
          <td>模組六 + <a href="/blog/backend/07-security-data-protection/" data-link-title="模組七：資安與資料保護" data-link-desc="以問題驅動方式擴充資安知識網：先定義服務環節問題，再以案例作為觸發式參考">backend/07 部分</a></td>
      </tr>
      <tr>
          <td>Production multi-tenant LLM 服務</td>
          <td><a href="/blog/backend/07-security-data-protection/" data-link-title="模組七：資安與資料保護" data-link-desc="以問題驅動方式擴充資安知識網：先定義服務環節問題，再以案例作為觸發式參考">backend/07 全部</a>（多租戶 isolation、合規、incident）</td>
      </tr>
  </tbody>
</table>
<p>OWASP LLM Top 10 是兩邊共用詞彙、不限本地或 production。</p>
<h2 id="何時過時--何時不過時">何時過時 / 何時不過時</h2>
<p><strong>不會過時的部分</strong>：</p>
<ul>
<li>OWASP LLM Top 10 作為企業合規溝通共同詞彙的地位</li>
<li>本章 mapping 表的 framing（每個 OWASP 項對應模組六哪章 / 部分覆蓋 / 跨模組）</li>
<li>模組六跟 backend/07 的分工</li>
</ul>
<p><strong>會變的部分</strong>：</p>
<ul>
<li>OWASP 清單本身（2023 → 2025 → 未來新版、項目可能調整）</li>
<li>具體 vendor security audit 的範本（不同 vendor / industry 不同）</li>
<li>跟其他 framework（NIST AI RMF、ISO/IEC 42001）的對照</li>
</ul>
<h2 id="下一步">下一步</h2>
<p>本章是模組六最後一章。production 多租戶服務化資安見 <a href="/blog/backend/07-security-data-protection/" data-link-title="模組七：資安與資料保護" data-link-desc="以問題驅動方式擴充資安知識網：先定義服務環節問題，再以案例作為觸發式參考">backend 模組七</a>。</p>
]]></content:encoded></item></channel></rss>