Emulating Runtime Initialization for Static Analysis of IoC Applications

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Static analysis techniques face challenges in analyzing applications deployed using Inversion of Control (IoC) frameworks, as these applications are not complete due to external initialization calls and connections that are only available at runtime, making it difficult to trace dependencies and perform comprehensive analysis.

Innovation Solution

A method and system for emulating application code in a simulated environment, where connection requests are detected and responded to, generating a set of instructions for a static analyzer to perform analysis by recording and storing these actions, allowing for complete traceability and static analysis.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Measurement precision

If static analysis is performed on applications deployed using IoC frameworks, then analysis completeness is improved, but code incompleteness due to external initialization calls and runtime-only connections worsens the analysis effectiveness

Engineering Contradiction:
Improveanalysis completenessVSAvoidcode incompleteness
Core Design Contradiction:
Measurement precisionVSLoss of information

Solution Approach 1:

The patent applies preliminary action by performing emulation of the IoC framework's runtime behavior before static analysis. The system emulates the application code execution, captures initialization actions and connection requests, and generates synthetic code that includes these runtime elements. This preliminary emulation step ensures that when static analysis is subsequently performed, the code is complete with all necessary initialization and connection information already incorporated, eliminating the code incompleteness problem.

Inventive Principle:
Principle #10Preliminary action

2Productivity

If traditional static analysis techniques are used on IoC framework applications, then analysis speed is maintained, but the ability to trace dependencies and perform comprehensive analysis deteriorates due to runtime-only connections

Engineering Contradiction:
Improveanalysis speedVSAvoiddependency tracing capability
Core Design Contradiction:
ProductivityVSDifficulty of detecting and measuring

Solution Approach 1:

The patent applies copying by creating a synthetic copy of the application code that includes emulated runtime behavior. The system generates synthetic code that replicates the initialization actions, connection requests, and service injections that would occur during actual runtime execution. This synthetic code copy is then subjected to static analysis, allowing comprehensive dependency tracing and measurement while maintaining analysis speed, as the synthetic code contains all necessary information in a statically analyzable format.

Inventive Principle:
Principle #26Copying

3Measurement precision

If external initialization calls and runtime connections are included in the analysis, then analysis comprehensiveness is improved, but the complexity of the analysis process increases

Engineering Contradiction:
Improveanalysis comprehensivenessVSAvoidanalysis process complexity
Core Design Contradiction:
Measurement precisionVSDevice complexity

Solution Approach 1:

The patent applies the intermediary principle by introducing an emulation layer as a mediator between the original application code and the static analysis process. The emulation component captures runtime behavior (initialization calls, connection requests, service injections) and transforms it into synthetic code. This intermediary emulation step simplifies the overall analysis process by converting complex runtime dynamics into a standardized synthetic code format that static analysis tools can process systematically, reducing the apparent complexity while maintaining comprehensiveness.

Inventive Principle:
Principle #24Intermediary (Mediator)

Data Source

PatentUS20230385089A1Dynamic application framework mocking in static analysis
Publication Date: 2023.11.30 CROWDSTRIKE
  • US20230385089A1 patent drawing
  • US20230385089A1 patent drawing
  • US20230385089A1 patent drawing

AI summary

A system and method for emulating application code in a simulated environment. The method includes receiving an application code including an external initialization code component, the application code deployed in a cloud computing environment; detecting a connection request in the external initialization code component; emulating a response to the connection request; and storing the emulated response for generating a set of instructions for a static analyzer to perform static analysis on the application and the generated set of instructions.