Trailmark Review Gate
Trail of BitsOfficialPublished by Trail of Bits
- Skill
- Review and audit
- Security
- CC-BY-SA-4.0
- No issues found
AutoGineer summary
Written by AutoGineer from the skill’s own files, not by the author
The Trailmark Review Gate is a security-focused tool designed to identify structural regressions in codebases by comparing graph-level evidence between two states, such as a pull request and its base branch. Unlike traditional line-by-line code reviews, this skill analyzes changes in entrypoints, tainted paths, privilege boundaries, and blast radius to highlight potential security risks that might be missed by simple text diffs. It produces a structured review packet that provides reviewers with actionable insights and specific targets for manual inspection, ensuring that structural changes are thoroughly vetted before code is merged.
What it does
- Detects new untrusted entrypoints and reachable sensitive sinks.
- Identifies removed authorization or validation calls on reachable paths.
- Monitors privilege-boundary drift and taint membership changes.
- Tracks blast-radius and complexity growth in sensitive code areas.
- Generates a structured review packet for human auditors.
- Applies deterministic gate rules to provide a PASS, WARN, FAIL, or UNKNOWN verdict.
When to use it
- During pull request reviews to catch structural security regressions.
- When evaluating the impact of remediation commits on system security.
- Before merging branches to ensure no new attack surfaces were introduced.
- When comparing release diffs to maintain security posture across versions.
Advantages
- Catches structural risks that are often invisible in standard line-based diffs.
- Reduces manual effort by focusing reviewer attention on high-risk structural changes.
- Provides deterministic, evidence-based gate verdicts.
- Maintains a clear separation between automated graph evidence and manual security judgment.
Usage examples
- “Run the review gate on the current pull request against the main branch.”
- The agent analyzes the structural differences between the branches and outputs a report detailing any triggered security rules, such as new reachable sensitive sinks or removed validation calls.
- “Check this fix commit for structural security regressions.”
- The agent compares the commit against the previous state, identifying if the fix inadvertently expanded the blast radius or introduced new untrusted entrypoints.
Install
Download the skill as a ZIP:
https://mp-staging.autogineer.com/agent-skills/trailofbits/trailmark-review-gate/downloadUnzip it into the cross-client skills folder of your project:
mkdir -p .agents/skills && unzip trailmark-review-gate.zip -d .agents/skills
Documentation by Trail of Bits
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
trailmarkortrailmark-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 actionsStep 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. 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, then hand it to
the branch reviewer. Use
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
PASSwhen Trailmark failed.Separate graph evidence from manual security judgment.
Include exact changed nodes or paths for every
FAILandWARN.Include limitations when parser, proxy, unresolved-call, or dynamic-dispatch uncertainty affects the verdict.
Files
- ATTRIBUTION.mdAdded by AutoGineer945 B
- LICENSELicence file added by AutoGineer19.7 KiB
- SKILL.md4.3 KiB
- agents/openai.yaml246 B
- assets/trail-of-bits-mark.svg3.0 KiB
- references/gate-rules.md2.2 KiB
- references/output-format.md1.0 KiB
- references/review-integration.md1.4 KiB
ATTRIBUTION.md
Attribution
This folder is an unmodified copy of the Agent Skill "trailmark-review-gate", distributed by AutoGineer (https://autogineer.com/agent-skills).
Commit: e4dd0bb5b15535f7c5a0834187dffba6ac37e4ff
Published by: Trail of Bits (https://github.com/trailofbits)
Publisher: Trail of Bits (https://github.com/trailofbits)
Licence: Creative Commons Attribution-ShareAlike 4.0 International (https://github.com/trailofbits/skills/blob/e4dd0bb5b15535f7c5a0834187dffba6ac37e4ff/LICENSE)
Licence evidence: repository licence LICENSE
Retrieved: 2026-11-07
The skill's own files are unmodified copies. AutoGineer is not affiliated with or endorsed by the author or the publisher.
Files added by AutoGineer
ATTRIBUTION.md: this file, written by AutoGineer
LICENSE: copied from LICENSE
Requirements and compatibility
Works with: Claude Code, Claude apps, OpenAI Codex, GitHub Copilot, Cursor, Gemini CLI, Kiro, OpenCode, Goose, Amp, Roo Code, JetBrains Junie, Factory Droid, Devin (ex-Windsurf), Mistral Vibe, OpenHands, Letta
“Works with” means the tool reads the open Agent Skills format; a skill written for one tool may use features others lack.
Needs: Declares allowed tools, Needs a command-line tool
Security
No issues found by our static scan· No issues found
A static scan is not a guarantee. Skills are third-party content: review a skill before you let an agent use it.
Attribution and licence
- Published by
- Trail of Bits
- Publisher
- Trail of Bits (Official)
- Source
- trailofbits/skills · plugins/trailmark/skills/trailmark-review-gate · commit e4dd0bb
- Licence
- Creative Commons Attribution-ShareAlike 4.0 International (redistribution allowed)
- LICENSE (added by AutoGineer from LICENSE)
- ATTRIBUTION.md (written by AutoGineer)
- Synced
AutoGineer is not affiliated with or endorsed by Trail of Bits.
Download ZIP
The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download trailmark-review-gate.zip