Trailmark turns code into graphs

· Source: The Trail of Bits Blog · Field: Technology & Digital — Software Development & Engineering, Artificial Intelligence & Machine Learning, Cybersecurity & Data Privacy · Depth: Advanced, medium

Summary

Trailmark, an open-source library released on April 23, 2026, transforms source code into a queryable call graph, exposing it via a Python API for AI-assisted software analysis, particularly with Claude skills. It addresses the limitation of list-based code analysis by providing a structural view of functions, classes, and call relationships across 17 languages, including C, Rust, Go, Python, and Solidity. Trailmark operates in three phases: parsing code with tree-sitter, indexing the graph with rustworkx, and enabling complex queries like pathfinding and attack surface enumeration. Eight integrated Claude Code skills leverage this graph for tasks such as mutation triage ("genotoxic"), test vector generation ("vector-forge"), and architectural diagramming ("diagram"). Internal use on cryptographic libraries revealed that 73% of 45 surviving mutants in an Ed448 implementation were equivalent, and libhydrogen's entire functionality funnels through gimli_core_u8, highlighting architectural risks invisible to linear review. Trailmark also identified blast radius concentrations in arithmetic modules, high-value fuzzing targets in codec parsers, and sparse property-based testing in Rust crypto crates.

Key takeaway

For AI Security Engineers evaluating code quality or architectural risks, adopting graph-based analysis tools like Trailmark is crucial. Your current list-based methods likely miss critical insights into attack surface, blast radius, and true test coverage gaps. Integrate Trailmark to automatically triage mutation testing results and identify architectural bottlenecks. This will pinpoint high-value fuzzing targets, enhancing your ability to secure complex codebases more effectively.

Key insights

Code analysis benefits significantly from graph-based reasoning over list-based approaches, especially for security and test quality.

Principles

Method

Trailmark parses source code into an AST, extracts functions, classes, and call edges, then indexes this into a rustworkx PyDiGraph for querying callers, callees, paths, and complexity hotspots.

In practice

Topics

Code references

Best for: AI Architect, CTO, VP of Engineering/Data, AI Engineer, AI Security Engineer, Software Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by The Trail of Bits Blog.