Skip to content
cccskills
FreePublished on GitHub

trailmark-review-gate

Compares code relationships before and after a branch, pull request, or release change using Trailmark. Flags structural security regressions, such as removed authorization checks or newly reachable sensitive operations, and provides evidence for reviewers.

OriginalShow the original description

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.

See how to install

Good for

  • Checking structural security changes before merging a PR
  • Reviewing call paths after a security fix
  • Assessing attack surface changes in a release
  • Adding graph evidence to a code review

Files included (6)

  • SKILL.md4.3 KB
  • agents/openai.yaml246 B
  • assets/trail-of-bits-mark.svg3.0 KB
  • references/gate-rules.md2.2 KB
  • references/output-format.md1.0 KB
  • references/review-integration.md1.4 KB

SKILL.md (original)

Review the instructions the agent will receive before you install.

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.

Reviews

No reviews yet. Tell others what you thought.

Comments

No login needed. Share how it worked for you, ask a question, or note where it did not run.

No comments yet. Be the first to write one.

Comments are published right away. Do not include personal information such as email addresses or phone numbers. Up to 2 URLs.

0 / 1,000 characters

This form is protected by reCAPTCHA, and the Google Privacy Policy and Terms of Service apply.

More skills from this repository

Build and test code with AddressSanitizer, a tool that detects invalid memory access during execution. Configure checks for C/C++ and unsafe Rust, investigate crash reports, and adjust settings for fuzzing, or testing with generated inputs.

  • Detect memory errors while fuzzing C/C++
  • Test unsafe Rust and calls to external libraries
  • Interpret an ASan crash report
trailofbits/skills7.6KUpdated Oct 16, 2026

aflpp

FreeSummary

Sets up AFL++ to test C/C++ programs with varied generated inputs, a technique called fuzzing. Covers running tests across CPU cores, monitoring progress, reducing input collections, and reproducing crashes for investigation.

  • Running C/C++ fuzzing across multiple CPU cores
  • Exploring further after libFuzzer progress stalls
  • Monitoring fuzzing progress and stability
trailofbits/skills7.6KUpdated Oct 16, 2026

Audits GitHub Actions workflows that run AI coding agents. Traces how attacker-controlled content reaches prompts, checks permissions and sandbox settings, and reports evidence, severity, and fixes for prompt injection and related configuration risks.

  • Reviewing workflows that run AI coding agents
  • Tracing issue and PR content into agent prompts
  • Checking sandbox settings and user allowlists
trailofbits/skills7.6KUpdated Oct 16, 2026

Reviews Algorand smart contracts written in TEAL or PyTeal for 11 vulnerability patterns. Produces a complete coverage table and findings with code references, severity ratings, and suggested fixes, with optional automated checks using Tealer.

  • Security checks before an Algorand contract audit
  • Reviewing TEAL or PyTeal transaction validation
  • Verifying fixes for reported vulnerabilities
trailofbits/skills7.6KUpdated Oct 16, 2026

atheris

FreeSummary

Set up Atheris to test Python code and C extensions with automatically varied inputs. It guides test harness creation, coverage tracking to explore more code, and AddressSanitizer setup for finding memory errors.

  • Fuzzing a Python package or parser
  • Investigating memory corruption in Python C extensions
  • Turning raw bytes into typed test arguments
trailofbits/skills7.6KUpdated Oct 16, 2026

Connect static analysis results and human audit notes to a Trailmark code graph. Group findings by severity and compare them with input flow, impact, and privilege boundaries to prioritize investigation and understand findings in their code context.

  • Connecting Semgrep or CodeQL results to code structure
  • Combining human audit notes with automated findings
  • Prioritizing findings using input flow and impact
trailofbits/skills7.6KUpdated Oct 16, 2026

See all skills by trailofbits

Report a problem with this skill