मुख्य सामग्री पर जाएँ
Skillpedia
सिक्योरिटी8.0k · #12737

trailmark

यह क्या करती है

यह स्किल सोर्स कोड, और कुछ मामलों में बाइनरी कोड, को फ़ंक्शन, कॉल और क्लास के ग्राफ़ में बदलती है। यह कई भाषाओं वाले प्रोजेक्ट पर काम करने वाले सुरक्षा रिव्यूअर्स के लिए है।

कब इस्तेमाल करें

  • ✓जब आपको जानना है कि उपयोगकर्ता इनपुट किसी संवेदनशील फ़ंक्शन तक कैसे पहुँचता है।
  • ✓जब आप प्रोजेक्ट के एंट्री पॉइंट और अटैक सरफ़ेस खोजना चाहते हैं।
  • ✓जब आप सुरक्षा रिव्यू की तैयारी कर रहे हैं और कोड की कॉल संरचना देखनी है।

Skill का लिंक

https://github.com/trailofbits/skills/blob/main/plugins/trailmark/skills/trailmark/SKILL.md

इसे कॉपी करके अपने AI (Claude, ChatGPT या Cursor) में पेस्ट करें और निर्देशों का पालन करने को कहें।

कैसे इस्तेमाल करें

सबसे आसान तरीका: मैसेज कॉपी करके अपने AI में पेस्ट करें। वह skill पढ़कर निर्देशों का पालन करेगा।

पेस्ट करने के लिए तैयार मैसेज

इस skill से मेरी मदद करो: https://github.com/trailofbits/skills/blob/main/plugins/trailmark/skills/trailmark/SKILL.md इस लिंक की SKILL.md फ़ाइल पढ़ो और मेरे काम में उसके निर्देशों का पालन करो।
क्या आप चाहते हैं कि आपका AI ऐसी skills खुद ढूँढे?मुफ़्त Skillpedia MCP इंस्टॉल करें: बस एक लाइन, और हर काम से पहले यह 15,000+ skills में खोजता है।1 मिनट में इंस्टॉल करें →

AI से क्या माँगें: उदाहरण

“इस प्रोजेक्ट का कोड ग्राफ़ बनाइए और दिखाइए कि कौन-से फ़ंक्शन यूज़र इनपुट से पहुँच योग्य हैं।”

हर हफ़्ते 5 नई skills, 1 मिनट में पढ़ें।

यह कैसे काम करती है

यह कोड को फ़ंक्शन और उनके संबंधों के ग्राफ़ में पार्स करती है, फिर उस ग्राफ़ में रास्ते खोजकर सवालों के जवाब देती है। यह स्टैटिक है, इसलिए प्रोग्राम चलते हुए नहीं देखती।

तकनीकी सामग्री (मूल SKILL.md)

लेखक का मूल टेक्स्ट, अंग्रेज़ी में, सीधे GitHub से।

Trailmark

Parses source code into a directed graph of functions, classes, calls, and semantic metadata for security analysis.

When to Use

  • Mapping call paths from user input to sensitive functions
  • Finding complexity hotspots for audit prioritization
  • Identifying attack surface and entrypoints
  • Understanding call relationships in unfamiliar codebases
  • Security review or audit preparation across polyglot projects
  • Adding LLM-inferred annotations (assumptions, preconditions) to code units
  • Importing external binary-analysis graphs to connect source and binary views
  • Querying transitive slices, entrypoint paths, subgraph edges, or type references
  • Producing graph evidence for one suspicious function or candidate finding
  • Pre-analysis before mutation testing (genotoxic skill) or diagramming

When NOT to Use

  • Single-file scripts where call graph adds no value (read the file directly)
  • Architecture diagrams not derived from code (use the diagramming-code skill or draw by hand)
  • Mutation testing triage (use the genotoxic skill, which calls trailmark internally)
  • Runtime behavior analysis (trailmark is static, not dynamic)

Rationalizations to Reject

Rationalization Why It's Wrong Required Action
"I'll just read the source files manually" Manual reading misses call paths, blast radius, and taint data Install trailmark and use the API
"Pre-analysis isn't needed for a quick query" Blast radius, taint, and privilege data are only available after preanalysis() Always run engine.preanalysis() before handing off to other skills
"The graph is too large, I'll sample" Sampling misses cross-module attack paths Build the full graph; use subgraph queries to focus
"Uncertain edges don't matter" Dynamic dispatch is where type confusion bugs hide Account for uncertain edges in security claims
"Single-language analysis is enough" Polyglot repos have FFI boundaries where bugs cluster Use the correct --language flag per component
"Complexity hotspots are the only thing worth checking" Low-complexity functions on tainted paths are high-value targets Combine complexity with taint and blast radius data
"The docs mention a version-gated method, so I can call it anywhere" Many environments still have Trailmark 0.2.x installed Check the installed version or probe feature availability before using v0.4+/v0.5+ features

Installation

MANDATORY: If trailmark is not found, install the CLI before doing anything else:

uv tool install trailmark

A tool install provides the CLI only — it does not make import trailmark resolvable. Run the Python snippets in this skill with uv run --with trailmark python -; that, not installation, is the fix for an import error or ModuleNotFoundError in a snippet.

DO NOT fall back to "manual verification", "manual analysis", or reading source files by hand as a substitute for running trailmark. The tool must be installed and used programmatically. If installation fails, report the error to the user instead of silently switching to manual code reading.

Version Gate

Trailmark 0.4.0 expands the graph model and query surface, and 0.5.0 adds a SQL parser, repository-link configuration, and richer entrypoint metadata. Before using a feature listed as v0.4+ or v0.5+, check the installed version:

trailmark --version 2>/dev/null || uv run trailmark --version 2>/dev/null

Compare the reported version numerically (not lexically). 0.4.0 or newer means the full v0.4 surface is available. The version command itself was added in 0.2.2, so a failure means either a pre-0.2.2 install or trailmark missing entirely — distinguish with trailmark analyze --help. When working programmatically, probe with hasattr() and fall back instead of assuming a v0.4-only method exists:

if hasattr(engine, "subgraph_edges"):
    edges = engine.subgraph_edges("tainted")
else:
    # v0.2 fallback: filter engine.to_json() edges whose endpoints
    # are both in engine.subgraph("tainted")
    edges = []

v0.2-safe baseline: CLI analyze, diff, entrypoints, augment, and --language auto; QueryEngine.from_directory(), callers_of(), callees_of(), paths_between(), ancestors_of(), reachable_from(), entrypoint_paths_to(), complexity_hotspots(), attack_surface(), summary(), to_json(), preanalysis(),

अक्सर पूछे जाने वाले सवाल

क्या यह मेरा प्रोग्राम चलाती है?

नहीं। यह सोर्स कोड का स्टैटिक विश्लेषण करती है, इसलिए रनटाइम व्यवहार नहीं देख सकती।

यह कौन-सी भाषाएँ संभालती है?

यह कई भाषाएँ संभालती है और उन्हें अपने-आप पहचान सकती है।

क्या यह कोड ग्राफ़ में नोट्स जोड़ सकती है?

हाँ। यह कोड इकाइयों में मॉडल-द्वारा-अनुमानित नोट्स जोड़ सकती है, जैसे मान्यताएँ और पूर्व-शर्तें।

जानकारी

लेखक का मूल विवरण

Builds and queries multi-language source and binary code graphs for security analysis. Includes pre-analysis passes for blast radius, taint propagation, privilege boundaries, entry point enumeration, proxy/unresolved-call tracking, type/reference queries, structural traversal, graph diffs, audit augmentation, declared cross-language/FFI/external links via `.trailmark/links.toml`, and SQL schema graphs. Use when analyzing call paths, mapping attack surface, finding complexity hotspots, enumerating entry points, tracing taint propagation, measuring blast radius, importing SARIF/weAudit/binary fi

repo: trailofbits/skills

लोकप्रियता

GitHub स्टार
8.0k
रैंकिंग में स्थान
#12737
लाइसेंस
CC-BY-SA-4.0
अपडेट की गई
2/11/2026

क्या यह skill काम की है?

0

लॉग इन करें वोट करने के लिए।

कमेंट

  • …

इस repository की और skills

audit-context-building

8.0k

यह आपके एजेंट को सुरक्षा जाँच से पहले किसी अनजान कोड को समझने में मदद करती है, हर फ़ंक्शन की मान्यताएँ और निर्भरताएँ नक्शे में दिखाकर।

कोडिंगसिक्योरिटी

algorand-vulnerability-scanner

8.0k

यह आपके एजेंट को Algorand कॉन्ट्रैक्ट्स में 11 आम सुरक्षा समस्याएँ जाँचने में मदद करती है, जैसे रीकीइंग हमले और बिना जाँची फ़ीस।

कोडिंगसिक्योरिटी

audit-prep-assistant

8.0k

यह आपके एजेंट को बाहरी सुरक्षा समीक्षा के लिए कोड तैयार करने में मदद करती है, जैसे स्टैटिक एनालिसिस, टेस्ट कवरेज और दस्तावेज़ीकरण।

कोडिंगसिक्योरिटी

cairo-vulnerability-scanner

8.0k

यह आपके एजेंट को StarkNet के Cairo कॉन्ट्रैक्ट्स में 6 गंभीर समस्याएँ जाँचने में मदद करती है, जैसे ओवरफ़्लो और सिग्नेचर रीप्ले।

कोडिंगसिक्योरिटी

मिलती-जुलती skills