Object Property Graph for Vulnerability Detection in Code
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing methods for detecting vulnerabilities in object-oriented program code, particularly prototype pollution, face challenges such as code coverage issues and the complexity of prototype chains and fine-grained object relations, making them inefficient and unreliable.
Innovation Solution
A novel object property graph (OPG) data structure is generated by linking an abstract syntax tree to additional graph nodes representing objects, with edges indicating the use of these objects, allowing for queries to detect template patterns indicative of vulnerabilities like prototype pollution.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If existing vulnerability detection methods are used for object-oriented code, then detection capability is provided, but code coverage is insufficient and detection reliability is low due to complexity of prototype chains and fine-grained object relations
Solution Approach 1:
The patent segments the complex object-oriented code into a graph structure where nodes represent objects and edges represent relationships. This segmentation breaks down the complexity of prototype chains and fine-grained object relations into manageable components, enabling reliable vulnerability detection without being overwhelmed by the overall system complexity.
Solution Approach 2:
The patent introduces an intermediary graph data structure that mediates between the complex object-oriented code and the vulnerability detection process. This graph structure serves as a simplified representation layer that captures essential relationships while filtering out unnecessary complexity, thereby improving detection reliability.
2Productivity
If existing vulnerability detection methods are used, then some detection is possible, but the methods are inefficient due to code coverage issues
Solution Approach 1:
The patent performs preliminary action by generating the graph data structure before vulnerability detection. This pre-processing step creates a comprehensive representation of object relationships and usage patterns, ensuring complete code coverage is established beforehand, which then enables efficient and reliable vulnerability detection without reprocessing the entire codebase.
Solution Approach 2:
The patent transitions from traditional linear code analysis to a multi-dimensional graph representation. By organizing code relationships in a graph structure with nodes and edges, the system achieves comprehensive code coverage while improving detection efficiency through parallelizable graph traversal algorithms.
3Measurement precision
If conventional vulnerability detection methods are applied to object-oriented code, then detection is performed, but the methods fail to accurately identify prototype pollution and other vulnerabilities
Solution Approach 1:
The patent applies local quality by analyzing specific local relationships in the graph structure that are indicative of vulnerabilities. Instead of treating all code relationships uniformly, the system identifies and examines local patterns such as prototype chain manipulations and fine-grained object interactions that are characteristic of vulnerabilities like prototype pollution, thereby achieving high measurement precision.
Solution Approach 2:
The patent uses color changes as a metaphor for highlighting different types of relationships and potential vulnerabilities in the graph structure. By visually or semantically distinguishing different edge types and node relationships, the system can accurately identify vulnerability patterns without being distracted by the overall complexity of object-oriented programming.
Data Source
AI summary
Methods, systems, and computer programs for generating a data structure that represents features of object-oriented program code. In one aspect, the method includes actions of obtaining object-oriented program code, generating an abstract syntax tree based on the obtained object-orient program code, generating one or more graph nodes based on the semantics of the abstract syntax tree nodes, wherein each generated graph node corresponds to an object of the object-oriented program code, and generating one or more graph edges, wherein each generated graph edge: begins at a node of the abstract syntax tree and terminates at one of the generated graph nodes, and represents a use, by the object-oriented program code, of an object represented by the generated graph node where the generated graph edge terminates.


