规则参考 · 安全性
提示词中的敏感数据
触发条件: 凭据(严重)或个人数据(警告)。
提示词里的一切都会离开你的系统。提示词中的凭据可能出现在服务商的日志、追踪和截图里,必须视为已泄露并轮换。
模型从不需要凭据。让你的应用去调用 API,只传入得到的数据。对于个人数据,除非任务需要真实值,否则请使用占位符。
引擎会报告每处匹配的类别和位置,但绝不报告匹配到的值。
示例提示词以及引擎的消息、解释和修复,按引擎返回的原样以英文显示。
触发它的示例
Use the token ghp_abcdefghijklmnopqrstuvwxyz0123456789 to call the GitHub API, list the open issues in acme/web, and return JSON with the keys number and title.严重 Credentials or secrets detected: token ×1.
为什么重要。 Anything in a prompt is sent to the model provider and may be logged. Leaked credentials must be rotated.
修复。 Remove them or use Sanitize to replace them with placeholders.
质量 50/100 · 37 个 token · 2 个发现
修复后的版本
List the open issues in the data below. Return JSON with the keys number and title.
<issues>
{{issues}}
</issues>质量 100/100(+50)· 27 个 token · 0 个发现
已被修复解决
sensitive_data: Credentials or secrets detected: token ×1.missing_objective: No clear objective or task was found.
本页的分数、token 数(GPT-4.1 分词器)和发现,都是在构建网站时由引擎计算的。
它如何影响分数
每个发现都会从 100 分中扣除固定的分数:严重 30,警告 10,提示 3。此规则计入安全性维度。完整公式参见评分模型。