跟踪标记审查门
- 作者仓库星标 0
- 作者更新于 2026年8月24日 23:09
- 作者仓库 skills
- 领域
- 人工智能
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @trailofbits · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 即装即用
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
第 1 步:解析输入
接受两个引用、一个分支名称、一个提交范围或之前/之后目录。不必要时不要检查分支。首选 `git diff`、`git show` 和 git 工作树,遵循 `graph-evolution` 快照工作流程。
第 2 步:建立图表证据
在图形分析之前/之后运行 `graph-evolution` 或等效的 Trailmark。两个快照都必须运行`engine.preanalysis()`,以便污点、特权边界、爆炸半径、复杂性和入口点信号可用。记录 Trailmark 版本和任何功能探测。如果图构建失败,则发出`UNKNOWN`。
第 3 步:使变更正常化
将证据规范化为: 添加、删除和修改的节点 添加和删除的边 入口点集更改 污点成员资格更改
第 4 步:应用 Gate 规则
应用references/gate-rules.md 中的规则。门判定为: 判定 · 含义 `FAIL` · 高风险结构回归在接受之前需要审查 `WARN` · 有意义的图形更改需要审阅者注意
第 5 步:发出数据包
使用references/output-format.md编写数据包,然后将其交给分支审阅者。将此数据包与`differential-review`或其他 PR 审核流程结合使用时,请使用引用/review-integration.md。
# Trailmark Review Gate
Apply deterministic security gate rules to Trailmark structural diff evidence.
This skill does not replace line-level review. It produces a compact structural
packet reviewers can cite while they inspect the code.
## When to Use
- Reviewing a branch, pull request, release diff, or fix commit
- Checking whether a change expands attack surface
- Looking for removed validation or authorization on reachable paths
- Comparing before/after taint, privilege-boundary, blast-radius, or
complexity signals
- Producing graph evidence for a differential review
## When NOT to Use
- Single-snapshot analysis. Use `trailmark` or `trailmark-structural`.
- Text-diff review only. Use `differential-review`.
- Full vulnerability discovery. Use an audit or bug-finding workflow.
- One static finding. Use `trailmark-finding-triage`.
- Tooling is unavailable and the user wants manual review only.
## Rationalizations to Reject
| Rationalization | Why It Is Wrong | Required Action |
|---|---|---|
| "The line diff is small, so no graph gate is needed" | Small changes can create new call paths | Compare before/after graphs |
| "Graph gate passed, so the PR is secure" | The gate only checks structural regressions | Still perform line-level review |
| "Trailmark failed, so pass the gate" | Tool failure is unknown risk, not success | Emit `UNKNOWN` |
| "Tests pass, so removed validation is fine" | Tests may miss affected entrypoint paths | Review the removed path manually |
| "Only new code matters" | Removed auth, validation, and callers can be higher risk than additions | Review removals and path changes |
## Workflow
```
Review Gate Progress:
- [ ] Step 1: Resolve before/after inputs
- [ ] Step 2: Build graph-evolution evidence
- [ ] Step 3: Normalize structural changes
- [ ] Step 4: Apply gate rules
- [ ] Step 5: Emit review packet and actions
```
### Step 1: Resolve Inputs
Accept two refs, a branch name, a commit range, or before/after directories.
Do not check out branches unnecessarily. Prefer `git diff`, `git show`, and
git worktrees, following the `graph-evolution` snapshot workflow.
### Step 2: Build Graph Evidence
Run `graph-evolution` or equivalent Trailmark before/after graph analysis.
Both snapshots must run `engine.preanalysis()` so taint, privilege-boundary,
blast-radius, complexity, and entrypoint signals are available.
Record Trailmark version and any feature probes. If graph construction fails,
emit `UNKNOWN`.
### Step 3: Normalize Changes
Normalize evidence into:
- added, removed, and modified nodes
- added and removed edges
- entrypoint set changes
- taint membership changes
- privilege-boundary membership changes
- blast-radius changes
- complexity changes
- newly reachable sensitive sinks
- unresolved, proxy, or dynamic edge changes
### Step 4: Apply Gate Rules
Apply the rules in [references/gate-rules.md](references/gate-rules.md).
Gate verdicts are:
| Verdict | Meaning |
|---|---|
| `FAIL` | A high-risk structural regression needs review before acceptance |
| `WARN` | A meaningful graph change needs reviewer attention |
| `PASS` | No configured structural gate fired |
| `UNKNOWN` | Trailmark failed or evidence is too incomplete |
### Step 5: Emit Packet
Write the packet using
[references/output-format.md](references/output-format.md), then hand it to
the branch reviewer. Use
[references/review-integration.md](references/review-integration.md) when
combining this packet with `differential-review` or another PR review process.
## Requirements
- Never mutate the user's working branch while comparing refs.
- Never report `PASS` when Trailmark failed.
- Separate graph evidence from manual security judgment.
- Include exact changed nodes or paths for every `FAIL` and `WARN`.
- Include limitations when parser, proxy, unresolved-call, or dynamic-dispatch
uncertainty affects the verdict.
章节与文件索引
按说明文件中的顺序排列。
何时使用
何时不使用
拒绝的理由
第 1 步:解析输入
第 2 步:建立图表证据
文件/命令 -> trailmark · trailmark-structural · differential-review · trailmark-finding-triage · UNKNOWN · git diff · git show · graph-evolution
内容校验值 -> 9de62276a97c
当前原文的自动摘译,尚未人工审校。
何时使用
审查分支、拉取请求、发布差异或修复提交 检查更改是否扩大了攻击面 寻找可访问路径上已删除的验证或授权 比较污点、权限边界、爆炸半径或复杂性信号之前/之后
何时不使用
单快照分析。使用
trailmark或trailmark-structural。仅文本差异审查。使用differential-review。全面的漏洞发现。使用审核或错误查找工作流程。一项静态发现。使用trailmark-finding-triage。工具不可用,用户只需要手动审核。拒绝的理由
合理化 · 错误的原因 · 所需的操作 “行差异很小,因此不需要图门” · 小改动可以创建新的调用路径 · 比较图之前/之后“图门已通过,因此 PR 是安全的” · 门仅检查结构回归 · 仍然执行行级别审查 “Trailmark 失败,因此通过门” · 工具失败是未知风险,而不是成功 · 发出
UNKNOWN“测试通过,因此删除验证很好” · 测试可能会错过受影响的入口点路径 · 手动查看已删除的路径第 2 步:建立图表证据
在图形分析之前/之后运行
graph-evolution或等效的Trailmark。两个快照都必须运行engine.preanalysis(),以便污点、特权边界、爆炸半径、复杂性和入口点信号可用。记录 Trailmark 版本和任何功能探测。如果图构建失败,则发出UNKNOWN。