Generated banner for Trailmark Review Gate
Generated logo for Trailmark Review Gate

Trailmark Review Gate

Trail of BitsOfficialPublished by Trail of Bits

  • Skill
  • Review and audit
  • Security
  • CC-BY-SA-4.0
  • No issues found

From the author

Runs a Trailmark structural review gate over a branch, pull request, fix commit, release diff, or git ref range to detect new entrypoints, new tainted paths, removed validation or authorization calls, privilege-boundary drift, blast-radius growth, complexity growth, and newly reachable sensitive sinks. Use when reviewing a PR, branch, remediation commit, or release diff where graph-level security regressions should be checked before merge.
— the description by Trail of Bits

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

  1. Download the skill as a ZIP:

    https://autogineer.com/agent-skills/trailofbits/trailmark-review-gate/download
  2. Unzip 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 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

RationalizationWhy It Is WrongRequired Action
"The line diff is small, so no graph gate is needed"Small changes can create new call pathsCompare before/after graphs
"Graph gate passed, so the PR is secure"The gate only checks structural regressionsStill perform line-level review
"Trailmark failed, so pass the gate"Tool failure is unknown risk, not successEmit UNKNOWN
"Tests pass, so removed validation is fine"Tests may miss affected entrypoint pathsReview the removed path manually
"Only new code matters"Removed auth, validation, and callers can be higher risk than additionsReview 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. Gate verdicts are:

VerdictMeaning
FAILA high-risk structural regression needs review before acceptance
WARNA meaningful graph change needs reviewer attention
PASSNo configured structural gate fired
UNKNOWNTrailmark 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 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.

Files

agents/openai.yaml

interface:
  display_name: "Trailmark Review Gate"
  short_description: "Check code changes for structural security regressions"
  icon_small: "assets/trail-of-bits-mark.svg"
  icon_large: "assets/trail-of-bits-mark.svg"
  brand_color: "#D83A34"

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 or Trail of Bits.

Download ZIP

The ZIP holds the skill’s files, its licence files and an ATTRIBUTION.md. Download trailmark-review-gate.zip