Abhishek Pandey
8 min read

Cutting SCA Noise: Using Runtime Call Tracing to Triage Vulnerabilities

How to use runtime call tracing to prioritize SCA findings, investigate dependency reachability, and reduce unnecessary AI-assisted vulnerability analysis.

Application SecuritySoftware Composition AnalysisVulnerability Management

Cutting SCA Noise: Using Runtime Call Tracing to Triage Vulnerabilities

Modern applications rely on deep dependency trees. Consequently, Software Composition Analysis (SCA) scanners constantly trigger security alerts for newly discovered CVEs in third-party libraries.

However, traditional SCA tools primarily identify vulnerabilities based on affected package versions. They do not necessarily determine whether the vulnerable functionality is reachable through the application’s execution paths.

Attempting to triage every transitive alert manually—or by feeding entire codebases into LLMs for deep analysis—is expensive, slow, and can rapidly consume engineering time and AI token budgets.

A more targeted approach is to combine SCA findings with runtime call tracing.

By observing which dependency methods execute during automated tests or staging workloads, we can gather additional evidence to prioritize vulnerability investigations. This helps identify relevant execution paths before investing time in deeper exploitability analysis.

The important limitation is that runtime tracing shows what happened during observed executions. It does not prove that a vulnerability is exploitable, and the absence of a method from a trace does not prove that it is unreachable.


The Core Concept

Before spending significant engineering time or AI tokens analyzing application logic, investigate three questions:

  1. Is the installed dependency version affected by the reported CVE?
  2. Does the application execute the potentially vulnerable functionality?
  3. Can an attacker satisfy the conditions required to exploit that functionality?

Runtime call tracing primarily helps investigate the second question.

By capturing dependency calls during representative application workflows, we can generate an inventory of executed third-party calls, such as executed_dependency_calls.json.

This artifact helps prioritize further investigation based on observed runtime behavior. It should not be treated as a definitive reachability verdict.

(For instructions on installing, building, and running the runtime call tracer, see the dep-method-tracer README.)


Step 1: Identify the Vulnerable Functionality from the CVE Advisory

CVE descriptions, GitHub Security Advisories (GHSA), and National Vulnerability Database (NVD) entries vary in the level of technical detail they provide.

Some advisories explicitly identify affected functions or methods. Others describe vulnerable behavior, configuration requirements, or affected components without naming the exact method.

Start by identifying:

  • The affected package and version range.
  • The vulnerable behavior.
  • The fixed version, if available.
  • The relevant function, class, or method, when identifiable.
  • The configuration and input conditions required for exploitation.

If the advisory does not identify the exact method, inspect the upstream security advisory, affected source code, or fixing commit to establish the relevant implementation details.

Real-World Example: CVE-2024-37891 (urllib3)

CVE-2024-37891 concerns the handling of the Proxy-Authorization header during cross-origin redirects when using urllib3’s ProxyManager.

Refer to the upstream urllib3 security advisory for the affected versions and technical details.

For this vulnerability, the investigation should establish whether the application:

  • Uses an affected version of urllib3.
  • Uses ProxyManager in the relevant execution path.
  • Supplies the Proxy-Authorization header under conditions relevant to the vulnerability.
  • Can follow a cross-origin redirect that triggers the vulnerable behavior.

Methods involved in HTTP requests or header construction may be useful investigation targets. However, their presence in a call trace does not, by itself, establish that the vulnerable behavior can occur.

The objective is to identify the code paths and conditions relevant to the actual vulnerability, rather than blindly matching every method mentioned in an advisory.


Step 2: Cross-Reference Against the Captured Call Inventory

During runtime execution, the tracer records third-party function and method calls into an executed_dependency_calls.json file.

For example, a simplified inventory might look like this:

[
  "requests.sessions.Session.request",
  "urllib3.connectionpool.HTTPConnectionPool.urlopen",
  "urllib3.util.request.make_headers"
]

If the advisory or source-level investigation identifies a specific method, you can search for it in the captured inventory:

grep -E "make_headers|urlopen" executed_dependency_calls.json

This is a basic illustration. For production automation, structured JSON parsing and exact symbol matching are preferable because substring matching can produce false matches.

A matching method provides evidence that the method executed during the observed workflows. It does not establish that the vulnerability’s specific exploit conditions were satisfied.

Similarly, a missing method indicates only that it was not observed in the captured trace.


Step 3: The Two-Tier Decision Matrix

Runtime evidence can help determine the next step in an SCA investigation.

       [ SCA CVE Alert Detected ]
                   |
                   v
      Validate Affected Package
                   |
                   v
    Identify Vulnerable Functionality
                   |
                   v
  Is Relevant Method in Runtime Trace?
         |                          |
        NO                         YES
         |                          |
         v                          v
 [ NOT OBSERVED ]             [ OBSERVED ]
  - Review test coverage       - Validate exploit conditions
  - Check other paths          - Trace relevant inputs
  - Check tracer coverage      - Inspect configuration
  - Consider static analysis   - Use targeted AI analysis
         |                          |
         v                          v
   Gather More Evidence       Assess Exploitability
         |                          |
         v                          v
   Risk-Based Decision         Remediate as Required

Case A: The Method Is NOT Observed

Suppose the method associated with a vulnerability does not appear in executed_dependency_calls.json.

For example:

[
  "flask.app.Flask.__call__",
  "werkzeug.routing.Map.bind_to_environ"
]

The relevant method is absent from this inventory.

What does this tell us?

The method was not observed during the recorded execution scenarios, assuming the tracer supports the relevant method and runtime mechanism.

It does not establish that the method is unreachable in every possible application workflow.

Before making a risk decision, investigate:

  • Did the tests exercise the functionality associated with the CVE?
  • Could another endpoint, background job, or configuration invoke the method?
  • Does the application have alternative execution paths?
  • Can the tracer observe the relevant method and runtime mechanism?
  • Is there static analysis or call-graph evidence that supports an unreachability conclusion?

Security Verdict: The method was not observed in the captured runtime trace. Reachability remains unconfirmed.

Action: Review the available evidence and determine whether additional testing or static analysis is required. If sufficient evidence supports reduced risk, adjust the remediation priority according to the organization’s vulnerability management policy.

Resource Savings: If the available evidence supports a lower-priority investigation, extensive manual or AI-assisted analysis may be unnecessary at that stage. However, do not assume zero review effort or automatically classify the finding as Not Exploitable.


Case B: The Method IS Observed

Suppose the runtime inventory contains:

[
  "requests.sessions.Session.request",
  "urllib3.connectionpool.HTTPConnectionPool.urlopen",
  "urllib3.util.request.make_headers"
]

This provides evidence that these methods executed during the observed workflow.

However, a method may execute during normal operation without triggering the vulnerable behavior.

For example, observing an HTTP request method does not prove that an application follows a cross-origin redirect while retaining a sensitive proxy authorization header.

Security Verdict: Relevant dependency execution has been observed. Exploitability remains to be established.

Action: Escalate to targeted exploitability analysis where warranted.

Now, instead of passing the entire repository to an LLM, provide the security reviewer or AI model with the relevant application entry point, dependency call chain, advisory details, configuration, and input-handling logic.

For example:

Targeted AI-Assisted Vulnerability Analysis

CVE:
[Insert CVE identifier and advisory]

Affected dependency:
[Insert package and installed version]

Vulnerable behavior:
[Describe the verified vulnerability and its prerequisites]

Runtime evidence:
[Insert the observed call chain and test scenario]

Application context:
[Insert the relevant application entry point, callers,
configuration, and input-handling code]

Tasks:
1. Confirm whether the installed dependency version is affected.
2. Determine whether the application can reach the vulnerable behavior.
3. Identify attacker-controlled inputs and required exploit conditions.
4. Distinguish observed evidence from assumptions.
5. Identify missing evidence or tests required for a conclusion.
6. Recommend remediation and document residual risk.

Do not infer exploitability solely from a method call.
Do not infer unreachability solely from an absent method call.

This approach focuses AI analysis on the specific security question instead of spending tokens processing unrelated code.


Why This Approach Can Save Time and Tokens

Combining SCA findings with runtime call tracing can improve the efficiency of vulnerability triage in several ways.

  1. More targeted investigations: Runtime evidence helps identify dependency methods exercised by representative application workflows, allowing security teams to focus their initial investigation.

  2. Reduced AI context: When a relevant call chain has been identified, reviewers can provide the model with the necessary functions and callers instead of the entire repository.

  3. Better prioritization: Findings with evidence of relevant execution can be prioritized for exploitability analysis, while findings not observed during testing can be investigated further only as needed based on risk and available evidence.

  4. More consistent decisions: Recording the affected version, advisory, trace, test coverage, and analysis rationale makes triage decisions easier to reproduce and audit.

Measure the Savings

The amount of time and AI tokens saved will depend on the application, dependency tree, runtime coverage, and the quality of the initial investigation.

Rather than assuming that a fixed percentage of transitive dependencies is unused or that token consumption will fall by a predetermined amount, measure the results.

Useful metrics include:

  • Number of SCA findings investigated.
  • Number of findings with relevant runtime evidence.
  • Number of findings requiring additional static analysis.
  • Average AI tokens consumed per finding.
  • Average engineering time spent on triage.
  • Number of findings requiring reclassification after further investigation.
  • Time required to reach a defensible remediation decision.

These measurements can establish whether runtime-assisted triage reduces investigation costs without increasing the risk of incorrectly dismissing vulnerabilities.


Checklist for Reviewers & Automated Pipelines

  • Has the affected package and installed version been validated?
  • Has the vulnerable behavior and its prerequisites been identified from the CVE/GHSA advisory or source code?
  • Have the relevant methods or symbols been identified where possible?
  • Has a representative test suite or staging workload generated an executed_dependency_calls.json inventory?
  • Are the runtime tracer’s coverage limitations understood?
  • If the relevant method is present, have the actual exploitability conditions been investigated?
  • If the relevant method is absent, have test coverage, alternative execution paths, and instrumentation limitations been considered?
  • Has static analysis or additional testing been used where necessary to support an unreachability conclusion?
  • Has the original scanner severity been preserved separately from the assessed risk and remediation priority?
  • Is the final triage decision supported by documented evidence and rationale?
  • Have applicable fixes been prioritized, implemented, and verified?

Conclusion

SCA scanners provide essential visibility into vulnerable third-party components, but the presence of an affected package does not automatically establish whether an application can be exploited.

Runtime call tracing adds another source of evidence by showing which dependency methods execute during observed application workflows. Combined with advisory analysis, source-level investigation, and targeted AI-assisted review, this evidence can help Product Security teams focus their effort where it is most valuable.

The key is to use runtime tracing for what it can establish, without treating an incomplete execution trace as proof that a vulnerability cannot be reached.

The objective is not to suppress SCA findings. It is to reduce the cost of investigating them while maintaining defensible security decisions.