Skip to content
KitploitKITPLOIT
工具漏洞利用博客
Log in
提交
工具漏洞利用博客
提交

黑客、渗透测试和网络安全工具,武装您的安全武器库!

Kitploit 是一个黑客、网络安全和渗透测试工具的目录。发现最新的项目更新,查找漏洞、分析系统、自动化测试并加强你的安全。

订阅源联系隐私© 2026 Kitploit

工具目录

分类

查看所有分类
Loading categories
trailmark — Build and query a graph database representation of source code | Kitploit
工具/GitHubGitHub/trailofbits/trailmark
Static AnalysisVulnerability AnalysisCode AnalysisFuzzingBinary AnalysisLearning & Education
GitHubtrailofbits/trailmark

trailmark

Build and query a graph database representation of source code

查看仓库
463294511小时36分前Kitploit 审核通过
分享
内容在请求的语言中不可用。显示英文版本。

Trailmark

CI Mutation Testing

Trailmark parses source code into a graph of functions, types, calls, and other relationships, then lets you ask structural questions about it:

  • Which entrypoints can reach this function, and along which call paths?
  • What changed in the attack surface between two commits?
  • Which functions write this Solidity storage variable?
  • Where did call resolution stop, so that reachability results are incomplete?

It parses the supported languages through tree-sitter, stores the graph in rustworkx, and exposes it through a command-line tool and a Python API. Trailmark was built for security review: every edge records whether it came straight from syntax or from a heuristic, and calls it could not resolve stay in the graph.

The long-term vision is to combine this graph with mutation testing and coverage-guided fuzzing to identify gaps between assumptions and test coverage that are reachable from user input.

Features

  • Code graphs. Functions, methods, classes, structs, traits, contracts, and modules, connected by calls, inheritance, containment, and type use. --language auto merges every supported language in a tree into one graph.
  • Attack surface. Framework-aware entrypoint detection (Flask, FastAPI, Spring, ASP.NET Core, actix-web, NestJS, Elysia HTTP registrations, Solidity visibility, and more), each tagged with a trust level and asset value. Override or extend detection with .trailmark/entrypoints.toml.
  • Entrypoint evidence. Inspect callable and declarative references, executable file bodies, and unresolved candidates with source provenance. References stay separate from execution. Select additional source roots with explicit exclusions.
  • Reachability. Direct callers and callees, transitive slices, and bounded call paths from entrypoints to a target.
  • Structural diffs. Compare two directories or git refs and report added or removed declarations, signature and type changes, call-edge confidence changes, and entrypoints.
  • Diagrams. Mermaid call graphs, class hierarchies, module dependencies, containment views, complexity maps, and entrypoint-to-target flows.
  • Findings on the graph. Import SARIF and weAudit results, attach your own annotations, and run preanalysis passes (blast radius, privilege boundaries, coarse taint) that store their results as annotations and named subgraphs.
  • Visible gaps. Calls that cannot be resolved become proxy nodes instead of disappearing, and trailmark analyze --resolution counts them.
  • Exception evidence. Inspect source-located throws, rethrows, handlers and cleanup syntax with exception_events(); unknown thrown operands remain visible. See the graph model for frontend coverage and the limits of this syntax evidence.
  • Links Trailmark cannot see. Declare RPC, FFI, and subprocess edges in .trailmark/links.toml, or import a call graph produced by a binary-analysis tool.
  • Compiled binary evidence. Explicitly inspect linked ELF, Mach-O, and PE images, connect source functions and lines to compiled ranges, recover binary calls and inferred tail transfers, and query bounded disassembly across 15 architecture/mode cases. Includes stripped-code mappings, universal slices, verified local debug companions, folded aliases, and named import entries. See binary evidence for the optional trailmark[binary] extra and host-tool requirements.
  • Solidity storage access. reads and writes edges between functions and the contract state variables they touch.

Install

uv tool install trailmark        # the CLI
uv add trailmark                 # the library, in a uv-managed project

Requires Python ≥ 3.12. CI tests Python 3.12 through 3.15. With Nix, nix run github:trailofbits/trailmark runs the CLI directly.

This README and the guides track the main branch. The changelog lists what each published release includes, and the CLI and Python API guides note the version that added each newer feature.

Most grammars are downloaded and cached on first use. Bundled grammars are compiled on first use, which needs a C compiler. See Installation for offline machines, TLS-inspecting proxies, and building from a checkout.

Skills integrators: see v0.7 compatibility for schema, identity, state, and reachability checks.

Quick start

# Node and edge counts for a Python project (Python is the default language)
trailmark analyze --summary path/to/project

# The same summary as JSON, including source-file counts per language (v0.7+)
trailmark analyze --summary --json --language auto path/to/project

# Full JSON graph of every supported language in the tree
trailmark analyze --language auto path/to/project > graph.json

# Detected entrypoints with trust level and asset value
trailmark entrypoints --language auto path/to/project

# How the attack surface changed between two git refs
trailmark diff --repo . main HEAD

# Mermaid call graph around one function
trailmark diagram -t path/to/project -T call-graph -f handle_request

# How many call sites could not be resolved, grouped by callee name
trailmark analyze --language rust --resolution path/to/project

Directory analysis rejects missing roots and zero matching source files. The summary includes selected languages and inspected file counts; use --allow-empty for an intentional empty input. Graph JSON includes the exporting Trailmark version and an export schema version (v0.7+); compare snapshots built with the same Trailmark version and languages.

The same questions from Python:

from trailmark.query.api import QueryEngine

engine = QueryEngine.from_directory("path/to/project", language="auto")

engine.attack_surface()                    # entrypoints and their trust levels
engine.callers_of("verify_signature")      # direct callers
engine.ancestors_of("verify_signature")    # everything that can reach it
engine.entrypoint_paths_to("verify_signature")
engine.complexity_hotspots(10)             # cyclomatic complexity >= 10

Names can be bare (verify_signature), qualified (Auth.verify), or full node IDs (auth:Auth.verify). Query results are plain dicts and lists that serialize directly to JSON.

How it works

flowchart LR
    A["Source files"] --> B["tree-sitter parsers"]
    B --> C["CodeGraph"]
    C --> D["GraphStore (rustworkx)"]
    D --> E["QueryEngine"]
    E --> F["CLI / Python API"]

    classDef src fill:#007bff26,stroke:#007bff,color:#007bff
    classDef parse fill:#28a74526,stroke:#28a745,color:#28a745
    classDef data fill:#6f42c126,stroke:#6f42c1,color:#6f42c1
    classDef query fill:#ffc10726,stroke:#e6a817,color:#e6a817

    class A src
    class B parse
    class C,D data
    class E,F query
下载工具

最受欢迎

查看全部 →

发现我们社区最常用的工具。

  • 1

    OsintHunter

    letox4/osinthunter

    🎯 终极 OSINT 工具包:调查图谱、置信度评分、别名家族、地图、时间线和报告。49 个模块、400+ 个站点,无需 API 密钥。

    565
  • 2

    ghostlock-app

    yukonga/ghostlock-app

    GhostLock 一键执行应用(CVE-2026-43499)

    478
  • 3

    ARTEX

    baarai/artex

    基于LLM的多智能体自主渗透测试平台,具备规划器/执行器智能体、资产与探索图谱、MITM流量记录以及漏洞复测功能。

    383
  • 4

    redforge

    cybersecurity91/redforge

    浏览器端红队工具包,包含 102 个离线工具,用于侦察、载荷生成、凭据攻击、加密、编码和交战报告。

    327
  • 5

    estorides

    grisuno/estorides

    并行聚合 99+ 个免费 OSINT 来源,将实体解析为知识图谱,并借助 LLM 辅助分析导出 STIX 2.1、MISP 或 GraphML。

    258
  • 6

    CyberStrikeAI

    ed1s0nz/cyberstrikeai

    AI原生网络安全的行动系统——在这里,意图转化为受治理的执行,证据沉淀为运营记忆,每一次操作都让下一次更出色。

    256

探索所有工具

浏览我们的工具集合

查看所有工具 →