Loading...
Loading...
Compare original and translation side by side
| Risk | Read |
|---|---|
| LLM01 Prompt Injection | references/llm01-prompt-injection.md |
| LLM02 Sensitive Information Disclosure | references/llm02-sensitive-information-disclosure.md |
| LLM03 Training Data & Supply Chain | references/llm03-training-data-supply-chain.md |
| LLM04 Data and Model Poisoning | references/llm04-data-model-poisoning.md |
| LLM05 Improper Output Handling | references/llm05-improper-output-handling.md |
| LLM06 Excessive Agency | references/llm06-excessive-agency.md |
| LLM07 System Prompt Leakage | references/llm07-system-prompt-leakage.md |
| LLM08 Vector and Embedding Weaknesses | references/llm08-vector-embedding-weaknesses.md |
| LLM09 Misinformation | references/llm09-misinformation.md |
| LLM10 Unbounded Consumption | references/llm10-unbounded-consumption.md |
| 风险项 | 查阅链接 |
|---|---|
| LLM01 提示注入 | references/llm01-prompt-injection.md |
| LLM02 敏感信息泄露 | references/llm02-sensitive-information-disclosure.md |
| LLM03 训练数据与供应链 | references/llm03-training-data-supply-chain.md |
| LLM04 数据与模型投毒 | references/llm04-data-model-poisoning.md |
| LLM05 输出处理不当 | references/llm05-improper-output-handling.md |
| LLM06 过度代理 | references/llm06-excessive-agency.md |
| LLM07 系统提示泄露 | references/llm07-system-prompt-leakage.md |
| LLM08 向量与嵌入缺陷 | references/llm08-vector-embedding-weaknesses.md |
| LLM09 虚假信息 | references/llm09-misinformation.md |
| LLM10 无限制资源消耗 | references/llm10-unbounded-consumption.md |
| Task | Approach |
|---|---|
| Prevent prompt injection | Use delimiters, validate input, separate system/user context. See LLM01. |
| Protect sensitive data | Filter PII from training/prompts, apply output guards. See LLM02. |
| Validate LLM output | Sanitize before rendering (XSS) or executing (RCE). See LLM05. |
| Limit agency | Require human approval for destructive actions; scope tool permissions. See LLM06. |
| Control costs | Apply token limits, rate limiting, and budget caps. See LLM10. |
system_prompt = """You are a helpful assistant.
<user_input>
{sanitized_user_input}
</user_input>
Answer based only on the user input above."""prompt = f"Answer this question: {user_input}" # User can inject instructionsimport html
safe_output = html.escape(llm_response) # Prevent XSS if rendering in browser| 任务 | 实施方法 |
|---|---|
| 防范提示注入 | 使用分隔符、验证输入、分离系统与用户上下文。详见LLM01。 |
| 保护敏感数据 | 从训练数据/提示词中过滤PII信息,应用输出防护机制。详见LLM02。 |
| 验证LLM输出 | 在渲染(防范XSS)或执行(防范RCE)前进行清理。详见LLM05。 |
| 限制代理权限 | 破坏性操作需人工审批;限定工具权限范围。详见LLM06。 |
| 成本控制 | 应用令牌限制、速率限制与预算上限。详见LLM10。 |
system_prompt = """You are a helpful assistant.
<user_input>
{sanitized_user_input}
</user_input>
Answer based only on the user input above."""prompt = f"Answer this question: {user_input}" # User can inject instructionsimport html
safe_output = html.escape(llm_response) # Prevent XSS if rendering in browser