Files
Scott Arciszewski 48bd2626a1 Refresh trailmark skills for public Trailmark 0.2.x (#153)
* Refresh trailmark skills for public Trailmark 0.2.x

Aligns all skills with the now-public trailmark package
(pypi.org/project/trailmark, github.com/trailofbits/trailmark):

- Replace hardcoded language tables with runtime detection via
  trailmark.parse.detect_languages() and --language auto, so the
  skill never goes stale as Trailmark adds languages (21 supported
  as of 0.2.x: Python, JS/TS, PHP, Ruby, C/C++, C#, Java, Go, Rust,
  Solidity, Cairo, Circom, Haskell, Erlang, Miden Assembly, Swift,
  Objective-C, Kotlin, Dart)
- Remove phantom --passes CLI flag from trailmark-structural;
  pre-analysis is a QueryEngine.preanalysis() method, not a flag
- Use native trailmark diff --json in graph-evolution alongside the
  subgraph-diff helper script
- Add `finding` and `audit_note` annotation kinds to the documented
  list (set by augment_sarif / augment_weaudit)
- Document trailmark entrypoints and trailmark augment subcommands
  that exist in the public package
- Bump plugin to 0.8.1

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>

* Address Trailmark skill review nits

---------

Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-authored-by: Dan Guido <dan@trailofbits.com>
2026-04-28 21:04:14 -04:00

3.4 KiB

trailmark

Source code graph analysis for security auditing. Parses code into queryable graphs of functions, classes, and calls, then uses that structure for diagram generation, mutation testing triage, protocol verification, and differential review.

These skills target Trailmark 0.2.x. Prefer --language auto, trailmark.parse.detect_languages(), and QueryEngine.preanalysis() instead of older 0.1.x-era manual language detection workflows.

Prerequisites

Trailmark (source) must be installed:

uv pip install trailmark

Skills

Skill Description
trailmark Build and query multi-language code graphs with pre-analysis passes (blast radius, taint, privilege boundaries, entrypoints)
diagramming-code Generate Mermaid diagrams from code graphs (call graphs, class hierarchies, complexity heatmaps, data flow)
crypto-protocol-diagram Extract protocol message flow from source code or specs (RFC, ProVerif, Tamarin) into sequence diagrams
genotoxic Triage mutation testing results using graph analysis — classify survived mutants as false positives, missing tests, or fuzzing targets
vector-forge Mutation-driven test vector generation — find coverage gaps via mutation testing, then generate Wycheproof-style vectors that close them
graph-evolution Compare code graphs at two snapshots to surface security-relevant structural changes text diffs miss
mermaid-to-proverif Convert Mermaid sequence diagrams into ProVerif formal verification models
audit-augmentation Project SARIF and weAudit findings onto code graphs as annotations and subgraphs
trailmark-summary Quick structural overview (auto-detected languages, entry points, dependencies) for vivisect/galvanize
trailmark-structural Full structural analysis with all pre-analysis passes (blast radius, taint, privilege boundaries, complexity)

Directory Structure

trailmark/
├── .claude-plugin/
│   └── plugin.json
├── README.md
└── skills/
    ├── trailmark/                    # Core graph querying
    ├── diagramming-code/             # Mermaid diagram generation
    │   └── scripts/diagram.py
    ├── crypto-protocol-diagram/      # Protocol flow extraction
    │   └── examples/
    ├── genotoxic/                    # Mutation testing triage
    ├── vector-forge/                 # Mutation-driven test vector generation
    │   └── references/
    ├── graph-evolution/              # Structural diff
    │   └── scripts/graph_diff.py
    ├── mermaid-to-proverif/          # Sequence diagram → ProVerif
    │   └── examples/
    ├── audit-augmentation/           # SARIF/weAudit integration
    ├── trailmark-summary/            # Quick overview for vivisect/galvanize
    └── trailmark-structural/         # Full structural analysis
Skill Use For
mutation-testing Guidance for running mutation frameworks (mewt, muton) — use before genotoxic for triage
differential-review Text-level security diff review — complements graph-evolution's structural analysis
audit-context-building Deep architectural context before vulnerability hunting