call-graph-analysis
Build and query function call relationships. Used during SAST phase to map how functions connect across contracts.
- License 许可
- MIT
- 最近更新
- 2026-10-18
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- call-graph-analysis
- description
- Build and query function call relationships. Used during SAST phase to map how functions connect across contracts.
03 SKILL.md 正文
Call Graph Analysis Skill
Purpose
Map every function-to-function call relationship in the project. This feeds the Decomposer (entrypoint and data-flow dimensions) and the Threat Modeler (execution path construction).
When to Use
- During SAST phase (SAST Integrator agent)
- When constructing execution paths for tasks
- When looking for indirect attack surfaces (A calls B calls C)
Extraction Protocol
Automated Extraction (Slither)
# Full call graph
slither . --print call-graph 2>/dev/null
# Function summary (shows calls per function)
slither . --print function-summary 2>/dev/null
Manual Extraction (when Slither fails)
# Internal calls (this.func or func())
grep -rn "\..*(" --include="*.sol" | grep -v "//\|require\|emit\|event\|import"
# External calls to known contracts
grep -rn "I[A-Z].*\.\|[a-z]Contract\.\|[a-z]Token\." --include="*.sol"
# Delegatecall usage (critical for proxy patterns)
grep -rn "delegatecall\|DELEGATECALL" --include="*.sol"
Output Format
# Call Graph
## External Entry Points → Internal Calls
| Entry Point | Contract | Calls | External Calls |
|-------------|----------|-------|----------------|
| deposit() | Vault.sol | _mint(), _updateAccounting() | token.transferFrom() |
## Critical Call Chains (depth > 2)
[Chains where an external entry leads through 3+ function calls]
## Cross-Contract Call Map
[Which contracts call which other contracts, and through what functions]
Save to: specs/sast/call-graph.md
04 同仓库更多 Skills
stripe-patterns
暂无简介
payment-patterns
暂无简介
testing-patterns
Testing patterns for Jest and Playwright. Use when writing tests, setting up test fixtures, or validating RLS enforcement. Routes to existing test conventions.
team-coordination
Agent Teams orchestration patterns for multi-agent SAFe workflows. Use when spawning agent teams, coordinating teammates, enforcing quality gates via task dependencies, or orchestrating the 11-agent SAFe pipeline. Covers team creation, messaging, shared task lists, and SAFe gate enforcement. Do NOT use for single-agent or simple subagent workflows.
task-compilation
Compile broad audit goals into structured proof obligations with 9 mandatory fields. Used after decomposition by the Threat Modeler agent.
storage-layout-analysis
Proxy patterns, slot collisions, upgrade safety. Used during decomposition to identify storage-related vulnerabilities in upgradeable contracts.