Skip to main content
Not every dangerous tool in your codebase is an active risk. A tool with arbitrary code execution that no agent actually references is a very different situation from one actively called by your researcher agent on every task. Reachability analysis tells you which is which.

What reachability means

Reachability is the answer to: does any agent actually use this tool? Without reachability, every tool finding has equal weight regardless of whether it’s wired into an agent or just sitting unused in your codebase. This produces noisy results that make it hard to prioritize. Drako uses AST traversal to build a map of which agents reference which tools, then uses that map to classify each finding.

How it works

When Drako scans your project, it:
  1. Parses all agent definitions to extract the tools= argument from each Agent() constructor and class definition.
  2. Parses all Task() constructors to extract per-task tool assignments (supporting CrewAI’s task-level tool override pattern).
  3. Compares each detected tool against the agent and task tool maps.
  4. Classifies each tool as REACHABLE, POTENTIALLY_REACHABLE, or UNREACHABLE.
Classification logic:
StatusMeaning
REACHABLETool appears in at least one agent’s tools= list
POTENTIALLY_REACHABLETool name appears in source code near agent definitions, but not in an explicit tools= list
UNREACHABLENo agent or task references this tool

Reading reachability in scan output

Reachability status appears inline with each finding:
SEC-001  API key hardcoded in source           (src/main.py)
         ⚠ REACHABLE — used by agent 'researcher'
         Related: DRAKO-ABSS-2026-003
         Impact: Attacker inherits all agent permissions
         Ref: CWE-798, OWASP LLM06

SEC-005  Arbitrary code execution in tool      (tools/runner.py)
         ○ UNREACHABLE — no agent references this tool
  • ⚠ REACHABLE findings are actively exploitable and should be prioritized.
  • ○ UNREACHABLE findings are still reported — the tool exists and could be wired in — but they are lower priority.

Impact on scoring and prioritization

Reachability affects how you should prioritize remediation, but both reachable and unreachable findings contribute to the governance score. The score reflects your actual codebase posture, not just the currently-active paths. In practice, use reachability to triage:
  1. Fix all CRITICAL and HIGH findings marked REACHABLE first.
  2. Address CRITICAL POTENTIALLY_REACHABLE and UNREACHABLE findings before they get wired in.
  3. Use --fail-on critical in CI to gate on reachable CRITICAL findings in changed files.
Run drako scan . --diff HEAD~1 to scope reachability analysis to only the files changed in your latest commit. This is useful for fast CI feedback on pull requests.

Supported frameworks

Reachability analysis supports all frameworks where Drako can detect agent-to-tool wiring via AST:
FrameworkAgent detectionTool list extraction
CrewAIAgent(tools=[...]), @CrewBase YAMLtools= argument, Task(tools=[...])
LangGraphGraph node definitionsTool bindings in node config
AutoGenAssistantAgent, UserProxyAgent, ConversableAgentTool registrations
Semantic KernelKernel plugin importsPlugin function registrations
PydanticAIAgent class definitions@agent.tool decorators
LangChainAgent executor definitionsTool list arguments
Reachability analysis is a best-effort static approximation. Dynamically constructed tool lists (e.g., tools assembled at runtime from a database) may not be fully captured. In those cases, Drako classifies tools as POTENTIALLY_REACHABLE.

Build docs developers (and LLMs) love