踪迹变异邻域
- 作者仓库星标 0
- 作者更新于 2026年8月24日 23:09
- 作者仓库 skills
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @trailofbits · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- macOS · Linux · Windows
- 运行环境要求
- Node.js
- 检测到的文件与系统行为
-
- 只读
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:标准化并结合种子
接受从`trailmark-finding-triage`查找文本、文件/行、函数名称或输出。将种子绑定到 Trailmark 节点并用简单的语言记录根本原因。如果种子没有具体的图形绑定,请在发明变体之前停止。
第 2 步:扩展社区
使用references/neighborhood-patterns.md中的维度:共享调用者共享被调用者和接收器入口点路径邻居
第 3 步:对候选人进行排名
排名参考/ranking.md。优先考虑入口点可达、受污染、边界相邻、高爆炸半径、共享接收器、相同接口和近距离候选者。惩罚测试、模拟、生成、供应商、无法访问和仅限内部信任的候选者。
第 4 步:提取模式指导
总结什么应该从语法上搜索,什么需要语义审查。使用 CodeQL 或 SARIF 生成工具确定后续是否属于:`variant-analysis` `semgrep-rule-creator` `static-analysis`
第 5 步:发出切换数据包
使用references/output-format.md。包括排名的候选者、纳入原因、排除、限制和变异分析交接。
# Trailmark Variant Neighborhood
Expand one seed issue into graph-derived variant candidates. This skill
generates review targets, not confirmed findings.
## When to Use
- A finding is confirmed or plausible and variants may exist
- The vulnerable pattern depends on call context
- The issue involves a shared sink, source, validator, interface, override,
trait, hook, handler, adapter, or critical type
- The next step is to seed `variant-analysis`, `semgrep-rule-creator`,
`static-analysis`, or manual review
## When NOT to Use
- No seed issue exists. Use discovery or triage first.
- The pattern is purely syntactic and already obvious. Use
`semgrep-rule-creator` directly.
- The question is exploit-chain composition across multiple findings. Use a
composition workflow.
- The goal is remediation verification. Use a remediation-review workflow.
- The seed cannot be bound to a graph node.
## Rationalizations to Reject
| Rationalization | Why It Is Wrong | Required Action |
|---|---|---|
| "Nearby code means variant" | Proximity is only a candidate reason | Rank it as a review target |
| "Only exact same names matter" | Variants often share sinks or preconditions, not names | Expand across callers, callees, interfaces, and types |
| "Every candidate is a finding" | This skill outputs candidates for review | Avoid vulnerability claims |
| "Unreachable candidates can be ignored completely" | They may become reachable after refactors | Rank lower or list as deferred |
| "Graph candidates replace semantic pattern work" | Graph structure finds locations, not root-cause semantics | Hand off to variant-analysis, Semgrep, CodeQL, or manual review |
## Workflow
```
Variant Neighborhood Progress:
- [ ] Step 1: Normalize and bind the seed
- [ ] Step 2: Expand graph neighborhoods
- [ ] Step 3: Rank candidates
- [ ] Step 4: Extract variant pattern guidance
- [ ] Step 5: Emit handoff packet
```
### Step 1: Normalize And Bind The Seed
Accept finding text, file/line, function name, or output from
`trailmark-finding-triage`. Bind the seed to a Trailmark node and record the
root cause in plain language.
If the seed has no concrete graph binding, stop before inventing variants.
### Step 2: Expand Neighborhoods
Use the dimensions in
[references/neighborhood-patterns.md](references/neighborhood-patterns.md):
- shared callers
- shared callees and sinks
- entrypoint path neighbors
- interface, override, trait, and implementation siblings
- file or module cluster neighbors
- taint or privilege-boundary peers
- type and state-reference neighbors
Bound expansion to avoid candidate floods.
### Step 3: Rank Candidates
Rank with [references/ranking.md](references/ranking.md). Prioritize
entrypoint-reachable, tainted, boundary-adjacent, high-blast-radius, shared
sink, same-interface, and close-distance candidates. Penalize test, mock,
generated, vendor, unreachable, and trusted-internal-only candidates.
### Step 4: Extract Pattern Guidance
Summarize what should be searched for syntactically and what requires semantic
review. Identify whether follow-up belongs in:
- `variant-analysis`
- `semgrep-rule-creator`
- `static-analysis` with CodeQL or SARIF-producing tools
- manual review
### Step 5: Emit Handoff Packet
Use [references/output-format.md](references/output-format.md). Include
ranked candidates, inclusion reasons, exclusions, limitations, and the
variant-analysis handoff.
## Stop Conditions
- No graph binding exists
- Candidate count is too high and the root cause is underspecified
- Trailmark cannot analyze the target language
- The seed is only in test, generated, or vendor code and the user did not say
that code is in scope
章节与文件索引
按说明文件中的顺序排列。
何时使用
何时不使用
拒绝的理由
第 1 步:标准化并结合种子
第 2 步:扩展社区
文件/命令 -> variant-analysis · semgrep-rule-creator · static-analysis · trailmark-finding-triage
内容校验值 -> e927038dc1be
当前原文的自动摘译,尚未人工审校。
何时使用
发现结果已确认或合理,并且可能存在变体 易受攻击的模式取决于调用上下文 问题涉及共享接收器、源、验证器、接口、覆盖、特征、钩子、处理程序、适配器或关键类型 下一步是播种
variant-analysis、semgrep-rule-creator,何时不使用
不存在种子问题。首先使用发现或分类。该模式纯粹是语法上的并且已经很明显了。直接使用
semgrep-rule-creator。问题是跨多个发现的利用链组成。使用合成工作流程。拒绝的理由
合理化 · 为什么错误 · 需要采取的行动 “附近的代码意味着变体” · 邻近性只是候选原因 · 将其列为审查目标 “只有完全相同的名称才重要” · 变体通常共享接收器或先决条件,而不是名称 · 跨调用者、被调用者、接口和类型扩展 “每个候选者都是一个发现” · 该技能输出供审查的候选者 · 避免漏洞声明 “无法访问的候选者可以完全忽略” · 重构后它们可能变得可访问 · 排名较低或列为延期