Static Analysis of Indirectly Modeled Language via Syntax Tree Translation
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing static analyzers are inadequate in detecting vulnerabilities in software applications that use both directly and indirectly modeled programming languages, as they typically do not exchange analysis and inferences effectively, leading to incomplete vulnerability detection.
Innovation Solution
A method that programmatically analyzes indirectly modeled language files by transforming their syntax tree, identifying relevant nodes associated with data access, and generating statements in a directly modeled language to facilitate vulnerability analysis by a static analyzer configured for directly modeled languages, without requiring a comprehensive analyzer for the indirectly modeled language.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a static analyzer is configured for directly modeled languages only, then the analyzer can be used to analyze software systems with limited language support, but it cannot detect vulnerabilities in indirectly modeled language portions
Solution Approach 1:
The patent introduces an intermediary translation layer that converts indirectly modeled language code (velocity templates, freemarker templates) into directly modeled language code (Java). This intermediary translator enables the existing static analyzer to analyze indirectly modeled language portions without requiring the analyzer to be reconfigured for each language, thus resolving the contradiction between limited language support and incomplete vulnerability detection
Solution Approach 2:
The patent segments the analysis process into distinct components: an indirectly modeled language information extractor that processes template language code, a translator that converts extracted information into directly modeled language statements, and the existing static analyzer. This segmentation allows each component to handle its specific language type while working together to achieve comprehensive vulnerability detection across multiple language types
2Reliability
If two different static analyzers are used for directly and indirectly modeled languages, then coverage is improved, but the analyzers do not exchange analysis and inferences leading to incomplete detection
Solution Approach 1:
The patent merges the analysis of directly and indirectly modeled languages into a unified process. By translating indirectly modeled language code into directly modeled language statements, the system combines both language analyses into a single codebase that can be analyzed by one static analyzer, ensuring that analysis and inferences are exchanged and integrated properly while reducing overall system complexity
3Measurement precision
If a static analyzer is customized for specific programming languages, then analysis precision for those languages is improved, but the analyzer cannot analyze code in other languages
Solution Approach 1:
The patent changes the parameter of language compatibility by introducing a translation layer that converts code from different language types into a unified directly modeled language format. This allows the static analyzer to maintain its language-specific precision while gaining the ability to analyze multiple language types through the translation mechanism
Data Source
Figure 1
Figure 2
AI summary
In system for enabling static vulnerability analysis of a software/web application that includes an indirectly modeled language portion and a directly modeled language portion, an indirectly modeled language information extractor select nodes of certain types from a syntax tree corresponding to the indirectly modeled language source code. Generally, the types of nodes that are selected are relevant to taint propagation. For one or more of the selected nodes, one or more statements corresponding to one or more of a type of the node, an input to the node, and an object associated with the node are generated. A static analyzer configured for a directly modeled language may perform vulnerability analysis of the software/web application using the generated statements.