DYNAMIC APPLICATION FRAMEWORK MOCKING IN STATIC ANALYSIS
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.
1 . A method for emulating application code in a simulated environment, comprising:
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.
2 . The method of claim 1 , wherein the connection request is a call to connect to an external resource.
3 . The method of claim 2 , wherein the external resource is any one of: a database, a software library, a network service, a cloud based software service, and a software class.
4 . The method of claim 1 , wherein the emulated response is any one of: injecting an emulated value, and injecting an emulated object.
5 . The method of claim 1 , further comprising:
emulating another response in response to detecting that the application code was not initialized.
6 . A non-transitory computer readable medium having stored thereon instructions for causing a processing circuitry to execute a process, the process comprising:
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.
7 . A system for emulating application code in a simulated environment, comprising:
a processing circuitry; and
a memory, the memory containing instructions that, when executed by the processing circuitry, configure the system to:
receive an application code including an external initialization code component, the application code deployed in a cloud computing environment;
detect a connection request in the external initialization code component;
emulate a response to the connection request; and
store 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.
8 . The system of claim 7 , wherein the connection request is a call to connect to an external resource.
9 . The system of claim 8 , wherein the external resource is any one of: a database, a software library, a network service, a cloud based software service, and a software class.
10 . The system of claim 7 , wherein the memory contains further instructions that when executed by the processing circuitry further configure the system to generate an emulated response which is any one of: injecting an emulated value, and injecting an emulated object.
11 . The system of claim 7 , wherein the memory further contains instructions that when executed by the processing circuitry further configure the system to:
emulate another response in response to detecting that the application code was not initialized.