凡自治之物 · LGD 治理学 · 创造术家族 | 评测协议:skill-quality-gate
English
Prompt Injection Drill
When to use
- Before a model/agent goes live, for security baseline checks and prompt-defense validation.
- In red-team penetration testing, to actively simulate role override and instruction tampering.
- For apps handling sensitive data or high-privilege actions, to run full injection-risk triage and hardening.
How to use
- Main script:
python scripts/prompt_injection_drill.py. - Pass the target system context; use
--modeto select attack categories (e.g. encoding bypass). - Ensure the Python environment can load the script and its modules.
Workflow
- Pass the system prompt under test as the analysis target.
- Configure drill parameters for the 8 injection categories to cover.
- Run the script to generate attack cases and expected behaviors.
- Compare the generated cases against the system's actual responses.
- Identify defense failures or logic flaws; record abnormal trigger paths.
- Summarize into a red-team self-test report for the go-live decision.
Evidence & safety
- Evidence: TBD; Version: 1.0.1; Security: no independent scan (TBD).
中文
提示词注入演练器
何时用
- 模型/智能体正式上线前做安全基线检查与 Prompt 防御能力验证。
- 红队渗透测试时主动模拟角色覆盖、指令篡改等高危场景挖掘漏洞。
- 处理敏感数据或高权限业务的应用做全面注入风险排查与加固评估。
用法
- 主脚本:
python scripts/prompt_injection_drill.py。 - 传入待测系统上下文;用
--mode指定攻击类别(如编码绕过)。 - 确保 Python 环境能加载脚本与模块。
流程
传入待测 System Prompt → 配置 8 类注入覆盖方向 → 运行脚本生成攻击用例与期望行为清单 → 对照验证实际响应 → 识别防御失效并记录异常路径 → 汇总红队自测报告作为上线依据。
证据与安全声明
- 证据:TBD;版本:1.0.1;安全:未做独立安全扫描(TBD)。
