Hierarchical Code Index for Third-Party Component Detection
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Current methods for identifying and managing third-party code in software programs are inefficient, leading to security risks and license violations due to their inability to accurately detect and isolate vulnerabilities and compliance issues across complex, interconnected codebases.
Innovation Solution
A hierarchical indexing system that parses and matches program features against a code index, using string literals, exported functions, and normalized classes to identify third-party code, enabling scalable and accurate detection and management of third-party components within a program.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If developers manually track and manage third-party code components, then security risks and license violations can be detected, but the process becomes tedious and error-prone
Solution Approach 1:
The system automatically parses program code, extracts features, and matches them against a hierarchical code index without requiring manual intervention. The hierarchical index structure enables the system to self-organize and self-update as new code is added, eliminating the need for developers to manually track third-party components while maintaining high detection accuracy
Solution Approach 2:
Manual tracking and documentation processes are replaced with automated computational methods including code parsing, feature extraction, and hierarchical indexing. The system uses algorithmic matching instead of human review, substituting mechanical manual operations with automated software-based processes that are both faster and more reliable
2Productivity
If developers integrate third-party code to shorten development cycles, then productivity increases, but security vulnerabilities and license compliance issues are introduced
Solution Approach 1:
The hierarchical code index is pre-built and pre-organized with security and license information before code integration occurs. When third-party code is introduced, the system immediately matches it against the pre-existing index structure, enabling instant detection of vulnerabilities and compliance issues without delaying the development cycle
Solution Approach 2:
The hierarchical code index acts as an intermediary layer between third-party code sources and the developer's program. This intermediate structure captures and organizes security and license metadata, allowing the system to mediate the integration process by automatically identifying and flagging problematic code before it compromises the final product
3Measurement precision
If traditional code reuse detection methods are used, then some third-party code can be identified, but the methods are computationally intensive and cannot scale
Solution Approach 1:
The codebase is segmented into hierarchical levels (files, directories, repositories) with features extracted at each level. This segmentation allows the system to process code in manageable chunks rather than analyzing entire codebases at once, reducing computational overhead while maintaining detection precision through progressive matching from leaf nodes to root nodes
Solution Approach 2:
The system adds a hierarchical dimension to traditional code matching by organizing code features in a tree structure with multiple levels. This dimensional transformation enables efficient navigation and matching operations, allowing the system to quickly eliminate non-matching branches and focus computational resources only on relevant code sections
4Reliability
If developers track all third-party code including embedded code, then complete compliance can be achieved, but the management overhead becomes unmanageable
Solution Approach 1:
The hierarchical code index implements a nested structure where code features are organized in concentric layers from individual files up through directories to repositories. This nesting allows the system to automatically traverse and track embedded code within third-party libraries without requiring separate manual tracking systems, as the hierarchical structure naturally captures all levels of code inclusion
Data Source
AI summary
A method including: parsing a program to identify a plurality of features within the program; performing a first match of the plurality of features to a plurality of code files based on a hierarchical code index, the features corresponding to leaf nodes of the hierarchical code index and the code files corresponding to parent nodes of the leaf nodes; normalizing the first match results to weight against common features; performing a second match of the plurality of code files to one or more code repositories based on the hierarchical code index; normalizing the second match results to weight against common files; and identifying a code repository of the one or more code repositories as being included within the program.


