跳转到正文
报告库
用途分类 / 其他用途

Tdd Skill 安全审计

作者说它能做什么(原文)

Test-driven development. Use when the user wants to build features or fix bugs test-first, mentions "red-green-refactor", or wants integration tests.

第三方安全检查结论

这次检查未发现明显风险

已检查文件
4
发现的风险
0
会不会运行危险命令?检查是否下载程序后直接运行、让他人远程控制电脑,或藏起要运行的命令。未发现风险
会不会泄露文件和密钥?检查是否发送含密码或密钥的文件,以及代码里是否直接写了密钥。未发现风险
会不会删除文件或一直在后台运行?检查是否大范围删除文件、改写磁盘,或设置自动启动。未发现风险
会不会绕过安全保护?检查是否跳过网站安全验证、开放过多文件权限,或取消操作前的确认。未发现风险
会不会误导 AI 或隐藏内容?检查工作说明是否要求 AI 忽略你的指令、干扰检查结果,或夹带看不见的文字。未发现风险
会不会偷偷改推广链接或收款方?检查是否强制替换推广链接或收款对象,同时要求隐瞒更改。未发现风险

Skill 逻辑拆解

4 个说明模块

该技能将自身定位为测试驱动开发指南,要求按“先写失败测试,再写最少实现”的单测试垂直切片循环工作,且不鼓励提前添加功能。

查看原文
SKILL.md:36来自说明文档打开原文件
- **Red before green.** Write the failing test first, then only enough code to pass it. Don't anticipate future tests or add speculative features.- **One slice at a time.** One seam, one test, one minimal implementation per cycle.- **Refactoring is not part of the loop.** It belongs to the review stage (see the `code-review` skill), not the red → green implementation cycle.

在编写测试前,它要求与用户确认要测试的公共边界,因此测试范围需要用户明确同意。

查看原文
SKILL.md:22来自说明文档打开原文件
**Test only at pre-agreed seams.** Before writing any test, write down the seams under test and confirm them with the user. No test is written at an unconfirmed seam. You can't test everything, so agreeing the seams up front is how testing effort lands on the critical paths and complex logic instead of every edge case.Ask: "What's the public interface, and which seams should we test?"

该技能建议读取项目已有的 CONTEXT.md 和相关 ADR,以便测试术语和接口约束与项目约定一致;所提供内容没有要求修改或上传这些文件。

查看原文
SKILL.md:10来自说明文档打开原文件
When exploring the codebase, read `CONTEXT.md` (if it exists) so test names and interface vocabulary match the project's domain language, and respect ADRs in the area you're touching.

配套指南建议仅在外部系统边界使用模拟,并明确反对模拟内部模块;其中的网络请求和 Stripe 密钥均处于教学示例中,不是要求执行的操作。

查看原文
mocking.md:3来自说明文档打开原文件
Mock at **system boundaries** only:- External APIs (payment, email, etc.)- Databases (sometimes - prefer test DB)- Time/randomness- File system (sometimes)Don't mock:- Your own classes/modules- Internal collaborators- Anything you control
mocking.md:24来自说明文档打开原文件
```typescript// Easy to mockfunction processPayment(order, paymentClient) {  return paymentClient.charge(order.total);}// Hard to mockfunction processPayment(order) {  const client = new StripeClient(process.env.STRIPE_KEY);  return client.charge(order.total);}```
从这里开始 · 工作说明SKILL.md
tdd
连线表示工作说明包含的模块,不是实际运行顺序。点击模块可查看原文。

文件引用关系图

2 处引用
哪些文件发起引用引用了什么
连线表示真实的文件引用,不是运行顺序。点击节点可高亮相关连线,并查看具体文件和原文位置。虚线表示还有文件需要定位。
文件与检查记录4 个文件

检查范围与遗漏

逐文件查看涉及的内容

下方列出本次涉及的原文范围;纳入检查不代表已查清所有问题。

  • SKILL.md已纳入全文
  • mocking.md已纳入全文
  • tests.md已纳入全文
  • agents/openai.yaml已纳入全文

这份报告只针对上方版本。我们看了拿到的代码和说明文件,没有实际运行 Skill,也没有检查它另外安装的软件包。因此,这不是“保证安全”的承诺;换了版本或使用环境,结果也可能不同。

  • SKILL.md工作说明
  • agents/openai.yaml配套文件
  • mocking.md配套文件
  • tests.md配套文件

代码和说明中提到的操作

读取密钥或账号配置
mocking.md:32来自说明文档打开原文件
function processPayment(order) {  const client = new StripeClient(process.env.STRIPE_KEY);  return client.charge(order.total);
连接外部网站
mocking.md:44来自说明文档打开原文件
const api = {  getUser: (id) => fetch(`/users/${id}`),  getOrders: (userId) => fetch(`/users/${userId}/orders`),
mocking.md:45来自说明文档打开原文件
  getUser: (id) => fetch(`/users/${id}`),  getOrders: (userId) => fetch(`/users/${userId}/orders`),  createOrder: (data) => fetch('/orders', { method: 'POST', body: data }),
mocking.md:46来自说明文档打开原文件
  getOrders: (userId) => fetch(`/users/${userId}/orders`),  createOrder: (data) => fetch('/orders', { method: 'POST', body: data }),};
读取了多少行
181
文件校验值(用于核对版本)
139750cdb3ba21145ee43a1b0431353b59638bdbccc963b5e2e46e2a03e7903f