AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

variant-analysis

Hunts for the other instances of a bug already found — the variants of one root cause across a codebase. Use immediately after a vulnerability, logic bug, or bad pattern turns up in a specific file and the question becomes where else it occurs, including the bare conversational form ("are there others like this?", "is this the same bug?"). Also for generalizing one known instance into a CodeQL or Semgrep query for its whole pattern family, and for triaging a set of look-alike candidates against a known root cause. Not for initial discovery with no bug in hand.

Original source
trailofbits
License
CC-BY-SA-4.0
Pinned revision
2be6433b39e009cd2b6fd3be1895f6b1faa5af9a

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read trailofbits--variant-analysis at revision 2be6433b39e009cd2b6fd3be1895f6b1faa5af9a, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 6

references/reporting.md

Reporting a Variant Hunt

Advice for the final stage. The report is written for a security engineer that is reviewing vulnerability variants.

Structure

Fill ../resources/variant-report-template.md — the path is relative to this file, so from the skill root it is resources/variant-report-template.md. Every section earns its place:

  • Summary — original bug, date, codebase, count
  • Original vulnerability — the root cause statement, the origin location, the code
  • Search methodology — the patterns tried, at which level, with match and FP counts
  • Findings — one block per confirmed variant, severity-ordered
  • False positive patterns — grouped by reason, not one row per match
  • Recommendations — immediate fixes, then preventive measures

The Methodology Table

| Version | Pattern | Tool | Matches | TP | FP | |---------|---------|------|---------|----|----| | v1 | exact | ripgrep | 1 | 1 | 0 | | v2 | abstract | semgrep | N | N | N |

This table makes the hunt reproducible. It records which abstractions worked, which produced noise, and where the search stopped.

Record the patterns that failed alongside those that worked.

Quote the Real Code

Read each confirmed location and quote what is actually there. A report that paraphrases code loses the detail a reviewer needs to confirm the finding, and a wrong quote destroys trust in every other finding in the document.

Leave a Regression Guard

End with a CI-ready rule derived from whichever pattern found the most variants.