Back to Security & Vulnerability Analysis

fix-review

security reviewvulnerability fixcode remediationdifferential analysisaudit validationsecure developmentbug fixcode quality
⭐ 5.7kπŸ“„ CC-BY-SA-4.0πŸ•’ 2026-06-15Source β†—

Install this skill

npx skills add trailofbits/skills

Works across Claude Code, Cursor, Codex, Copilot & Antigravity

Fix Review is a specialized verification procedure that reconciles specific security findings from an audit report against actual code modifications. Rather than relying on commit messages or passing test suites, this process involves a deep dive into diffs to confirm that root causes of identified vulnerabilities are genuinely mitigated. It maps specific security identifiers, such as TOB-XXX patterns, directly to the relevant file changes to ensure remediation is structural rather than cosmetic. This process forces a rigorous evaluation of every change within a commit range, checking for accidental regression or incomplete fixes that address symptoms while leaving core weaknesses exposed. It serves as an essential gatekeeper for security-sensitive repositories before merging remediation branches.

When to Use This Skill

  • β€’Validating security patches against a previously submitted audit document
  • β€’Confirming that a specific set of high-severity vulnerabilities is fully resolved
  • β€’Auditing PRs that claim to close multiple tracked security issues
  • β€’Performing a final check on a release candidate against a list of known findings

How to Invoke This Skill

Example prompts that trigger this skill in Claude Code, Cursor, or Antigravity:

  • β€œReview these commits against the security report
  • β€œVerify if TOB-123 is actually fixed in this branch
  • β€œCheck if these remediation commits address the audit findings
  • β€œGenerate a fix review report for these changes
  • β€œConfirm findings status for the latest PR

Pro Tips

  • πŸ’‘Automate Baseline Comparisons: Always run this skill with a clear, audited baseline to ensure differential analysis is accurate and catches subtle regressions.
  • πŸ’‘Integrate into CI/CD: Incorporate 'fix-review' into your continuous integration pipeline to automatically flag insufficient fixes or new vulnerabilities before merging.
  • πŸ’‘Combine with 'audit-context-building': For complex audits, first use 'audit-context-building' to establish a comprehensive understanding, then apply 'fix-review' for targeted remediation validation.

What this skill does

  • β€’Maps specific security findings to corresponding commit deltas
  • β€’Verifies that root causes are addressed rather than just surface-level symptoms
  • β€’Detects accidental introduction of new bug patterns within remediation commits
  • β€’Categorizes findings into formal statuses like FIXED or PARTIALLY_FIXED
  • β€’Generates structured audit reports summarizing the validation evidence

When not to use it

  • βœ•Initial security auditing of a codebase
  • βœ•Generic feature development without specific vulnerability baselines
  • βœ•General code reviews where there are no audit findings to reference

Example workflow

  1. Establish the baseline by identifying the pre-fix commit hash
  2. Provide the security audit report in PDF, MD, or URL format
  3. Extract finding IDs and locations from the source report
  4. Execute diff analysis to isolate logic changes related to each finding
  5. Verify that the logic change directly eliminates the vulnerability root cause
  6. Compile the validation evidence into a formal Fix Review Report

Prerequisites

  • –Baseline commit hash (pre-fix)
  • –Target commit hash (post-fix)
  • –Original security audit findings documentation

Pitfalls & limitations

  • !Assuming passing tests equate to a successfully resolved security finding
  • !Accepting commit messages as proof of a complete fix
  • !Ignoring partial fixes that still leave part of the vulnerability surface exposed
  • !Overlooking new bugs introduced while patching the original finding

FAQ

What if the developer says the finding is fixed but my analysis says otherwise?
You should mark the finding as NOT_ADDRESSED or PARTIALLY_FIXED and provide the specific diff snippet as evidence to the developer for further action.
Does this skill work with non-Trail of Bits audit reports?
Yes, it parses standard finding formats, including numbered lists or severity-based sections, though TOB-style IDs are preferred for tracking.
Do I need the full repository history to run this?
You only need access to the source and target commits provided; full history is helpful but not strictly required if the commit refs are accurate.

How it compares

While manual review relies on subjective assessment, this skill provides a structured framework that mandates specific evidence for each finding, preventing the 'blind spot' bias often found in human-only reviews.

Source & trust

⭐ 5.7k starsπŸ“„ CC-BY-SA-4.0πŸ•’ Updated 2026-06-15
πŸ“„ Full skill instructions β€” original source: trailofbits/skills
# Fix Review

Differential analysis to verify commits address security findings without introducing bugs.

## When to Use

- Reviewing fix branches against security audit reports
- Validating that remediation commits actually address findings
- Checking if specific findings (TOB-XXX format) have been fixed
- Analyzing commit ranges for bug introduction patterns
- Cross-referencing code changes with audit recommendations

## When NOT to Use

- Initial security audits (use audit-context-building or differential-review)
- Code review without a specific baseline or finding set
- Greenfield development with no prior audit
- Documentation-only changes

---

## Rationalizations (Do Not Skip)

| Rationalization | Why It's Wrong | Required Action |
|-----------------|----------------|-----------------|
| "The commit message says it fixes TOB-XXX" | Messages lie; code tells truth | Verify the actual code change addresses the finding |
| "Small fix, no new bugs possible" | Small changes cause big bugs | Analyze all changes for anti-patterns |
| "I'll check the important findings" | All findings matter | Systematically check every finding |
| "The tests pass" | Tests may not cover the fix | Verify fix logic, not just test status |
| "Same developer, they know the code" | Familiarity breeds blind spots | Fresh analysis of every change |

---

## Quick Reference

### Input Requirements

| Input | Required | Format |
|-------|----------|--------|
| Source commit | Yes | Git commit hash or ref (baseline before fixes) |
| Target commit(s) | Yes | One or more commit hashes to analyze |
| Security report | No | Local path, URL, or Google Drive link |

### Finding Status Values

| Status | Meaning |
|--------|---------|
| FIXED | Code change directly addresses the finding |
| PARTIALLY_FIXED | Some aspects addressed, others remain |
| NOT_ADDRESSED | No relevant changes found |
| CANNOT_DETERMINE | Insufficient context to verify |

---

## Workflow

### Phase 1: Input Gathering

Collect required inputs from user:

Source commit:  [hash/ref before fixes]
Target commit: [hash/ref to analyze]
Report: [optional: path, URL, or "none"]


If user provides multiple target commits, process each separately with the same source.

### Phase 2: Report Retrieval

When a security report is provided, retrieve it based on format:

**Local file (PDF, MD, JSON, HTML):**
Read the file directly using the Read tool. Claude processes PDFs natively.

**URL:**
Fetch web content using the WebFetch tool.

**Google Drive URL that fails:**
See references/report-parsing.md for Google Drive fallback logic using gdrive CLI.

### Phase 3: Finding Extraction

Parse the report to extract findings:

**Trail of Bits format:**
- Look for "Detailed Findings" section
- Extract findings matching pattern: TOB-[A-Z]+-[0-9]+
- Capture: ID, title, severity, description, affected files

**Other formats:**
- Numbered findings (Finding 1, Finding 2)
- Severity-based sections (Critical, High, Medium, Low)
- JSON with findings array

See references/report-parsing.md for detailed parsing strategies.

### Phase 4: Commit Analysis

For each target commit, analyze the commit range:

# Get commit list from source to target
git log <source>..<target> --oneline

# Get full diff
git diff <source>..<target>

# Get changed files
git diff <source>..<target> --name-only


For each commit in the range:
1. Examine the diff for bug introduction patterns
2. Check for security anti-patterns (see references/bug-detection.md)
3. Map changes to relevant findings

### Phase 5: Finding Verification

For each finding in the report:

1. **Identify relevant commits** - Match by:
- File paths mentioned in finding
- Function/variable names in finding description
- Commit messages referencing the finding ID

2. **Verify the fix** - Check that:
- The root cause is addressed (not just symptoms)
- The fix follows the report's recommendation
- No new vulnerabilities are introduced

3. **Assign status** - Based on evidence:
- FIXED: Clear code change addresses the finding
- PARTIALLY_FIXED: Some aspects fixed, others remain
- NOT_ADDRESSED: No relevant changes
- CANNOT_DETERMINE: Need more context

4. **Document evidence** - For each finding:
- Commit hash(es) that address it
- Specific file and line changes
- How the fix addresses the root cause

See references/finding-matching.md for detailed matching strategies.

### Phase 6: Output Generation

Generate two outputs:

**1. Report file (FIX_REVIEW_REPORT.md):**

# Fix Review Report

**Source:** <commit>
**Target:** <commit>
**Report:** <path or "none">
**Date:** <date>

## Executive Summary

[Brief overview: X findings reviewed, Y fixed, Z concerns]

## Finding Status

| ID | Title | Severity | Status | Evidence |
|----|-------|----------|--------|----------|
| TOB-XXX-1 | Finding title | High | FIXED | abc123 |
| TOB-XXX-2 | Another finding | Medium | NOT_ADDRESSED | - |

## Bug Introduction Concerns

[Any potential bugs or regressions detected in the changes]

## Per-Commit Analysis

### Commit abc123: "Fix reentrancy in withdraw()"

**Files changed:** contracts/Vault.sol
**Findings addressed:** TOB-XXX-1
**Concerns:** None

[Detailed analysis]

## Recommendations

[Any follow-up actions needed]


**2. Conversation summary:**

Provide a concise summary in the conversation:
- Total findings: X
- Fixed: Y
- Not addressed: Z
- Concerns: [list any bug introduction risks]

---

## Bug Detection

Analyze commits for security anti-patterns. Key patterns to watch:
- Access control weakening (modifiers removed)
- Validation removal (require/assert deleted)
- Error handling reduction (try/catch removed)
- External call reordering (state after call)
- Integer operation changes (SafeMath removed)
- Cryptographic weakening

See references/bug-detection.md for comprehensive detection patterns and examples.

---

## Integration with Other Skills

**differential-review:** For initial security review of changes (before audit)

**issue-writer:** To format findings into formal audit reports

**audit-context-building:** For deep context when analyzing complex fixes

---

## Tips for Effective Reviews

**Do:**
- Verify the actual code change, not just commit messages
- Check that fixes address root causes, not symptoms
- Look for unintended side effects in adjacent code
- Cross-reference multiple findings that may interact
- Document evidence for every status assignment

**Don't:**
- Trust commit messages as proof of fix
- Skip findings because they seem minor
- Assume passing tests mean correct fixes
- Ignore changes outside the "fix" scope
- Mark FIXED without clear evidence

---

## Reference Files

For detailed guidance, consult:

- **references/finding-matching.md** - Strategies for matching commits to findings
- **references/bug-detection.md** - Comprehensive anti-pattern detection
- **references/report-parsing.md** - Parsing different report formats, Google Drive fallback

How to Use This Skill Unit

Option A: Project-Specific (Recommended)

  1. Click "Download" above
  2. In your project, create the directory: .agent/skills/fix-review/
  3. Save the file as SKILL.md
  4. The agent will automatically discover the skill based on its description.

Option B: Global Installation (All Agents)

Save the file to these locations to make it available across all projects:

  • Claude Code: ~/.claude/skills/trailofbits/skills/fix-review/SKILL.md
  • Cursor: ~/.cursor/skills/trailofbits/skills/fix-review/SKILL.md
  • Antigravity: ~/.gemini/antigravity/skills/trailofbits/skills/fix-review/SKILL.md

πŸš€ Install with CLI:
npx skills add trailofbits/skills

Read the Master Guide: Mastering Agent Skills β†’

Related Skill Units

Recommended Rules

View more rules β†’

Recommended Workflows

View more workflows β†’

Recommended MCP Servers

View more MCP servers β†’

Take It Further

Maximize your productivity with these powerful resources

πŸ“‹

Define Your Standards

Set up coding standards to ensure this workflow produces consistent, high-quality results.

Browse Rules Library
πŸ“–

Master Workflows

Learn how to create custom workflows, use Turbo Mode, and build your automation library.

Complete Guide

How to use this Skill in Claude Code & Cursor

For Claude Code (CLI)

To use this skill in Claude Code, copy the rule content into your project's custom instructions or follow our Add-Skill CLI guide. This ensures Claude follows your standards during every code generation.

For Cursor & Windsurf

For Cursor or Windsurf, individual skills are best used in the "Rules for AI" section. This specific unit helps the agent avoid security & vulnerability analysis issues, leading to cleaner, more efficient code.

Why the skill format matters: the standardized Agent Skills format lets your AI agent load detailed instructions only when they are relevant, keeping your prompt clean while improving results.

Source & attribution

This skill is categorized under Security & Vulnerability Analysis and is published by Trail of Bits, maintained in trailofbits/skills.

← Browse All Agent Skills
Sponsored AI assistant. Recommendations may be paid.