feat: DI-aware forward tracing and get_static_dependencies tool for agentic enhancer#60
Draft
joshbouncesecurity wants to merge 1 commit into
Draft
Conversation
…o agentic enhancer Adds `get_static_dependencies` tool so the exploration agent can retrieve call graph data (callee IDs, caller IDs) resolved from static analysis, then use `read_function` to examine service/repository methods for authorization and validation checks. Also updates the enhancer prompt to instruct the agent to trace forward into called functions before classifying a finding as EXPLOITABLE, since security controls are often delegated to the service layer in NestJS codebases. Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
10 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Split from #39 per reviewer request — the agentic enhancer changes have a different risk profile from the parser changes and warrant a separate eval pass before merging.
Summary
get_static_dependenciestool to the agentic enhancer's tool set, so the exploration agent can retrieve statically-resolved callee and caller IDs and examine them withread_functionresolve_dependencies()toRepositoryIndexto map raw function IDs / qualified names back to function metadataset_unit_context()toToolExecutorso per-unit static dep data is available when the tool is calledWhy independent of #39
The parser DI changes (#39) improve call graph edges regardless of how the LLM consumes them. This PR changes what the LLM does with those edges (and with the existing call graph for all languages). The classification impact — particularly the new "delegated security controls" branch — needs a before/after eval on a known dataset before hitting production.
Test plan
test_enhancer_tools.py:resolve_dependencies,get_static_dependenciesviaToolExecutor, context reset between units🤖 Generated with Claude Code