Software component vulnerability analysis system and method based on plug-in development framework

Through the software component vulnerability analysis system based on the plug-in development framework, asynchronous communication and rule engines are used to conduct vulnerability analysis, which solves the problem of difficulty in discovering security vulnerabilities in time during software development and realizes efficient vulnerability detection and replacement in the software development process. Reduce costs and improve system flexibility and maintainability.

CN118627078APending Publication Date: 2024-09-10CHINA INFOMRAITON CONSULTING & DESIGNING INST CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410660729.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-27
Publication Date
2024-09-10

AI Technical Summary

Technical Problem

Existing technology makes it difficult to timely discover and replace open source components with security vulnerabilities during the software development process, resulting in a large amount of time and labor costs required to discover and deal with vulnerabilities after software development is completed.

Method used

Adopt a software component vulnerability analysis system based on a plug-in development framework, including a task creation module, an analysis plug-in building module, a software component analysis module and a software component vulnerability analysis module. Vulnerability analysis is performed through asynchronous communication and rule engines, and plug-ins are dynamically loaded to reduce resources. occupy and improve responsiveness.

Benefits of technology

Timely discovery and replacement of components with security vulnerabilities during the software development process reduces time and labor costs, improves analysis efficiency, and improves system flexibility and maintainability.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118627078A
    Figure CN118627078A
Patent Text Reader

Abstract

The invention discloses a software component vulnerability analysis system and method based on a plug-in development framework, the system comprises a task creation module, an analysis plug-in construction module, a software component analysis module and a software component vulnerability analysis module, the task creation module is used for creating a software component analysis task; the analysis plug-in construction module is used for constructing a host program for running an analysis plug-in and constructing the analysis plug-in according to an interface specification; the software component analysis module is used for creating a software component analysis task execution thread, and the software component analysis task execution thread calls an analysis plug-in to analyze software components in the software source code to obtain a software component analysis result; and the software component vulnerability analysis module is used for performing vulnerability analysis on the software component analysis result based on the rule engine to obtain a software component vulnerability analysis result. According to the system and the method, the component with security vulnerabilities can be found from the source, and the time cost and the labor cost caused by later discovery and processing of the vulnerabilities are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of network and information security, and relates to a software component vulnerability analysis system and method based on a plug-in development framework. Background Art

[0002] Currently, network security vulnerabilities are often discovered through security testing or scanning of software after it is developed. Since a large number of open source components are introduced during the software development process, the open source components themselves may have network security vulnerabilities due to issues such as version and source, resulting in the developed software also having corresponding network security vulnerabilities. It often takes a lot of time and manpower to discover and deal with vulnerabilities after the software development is completed or even put into operation. Whether it is possible to discover and replace components with security vulnerabilities from the source during the software development process has become an urgent problem to be solved in the field of software development security. Summary of the invention

[0003] Purpose of the invention: The technical problem to be solved by the present invention is to provide a software component vulnerability analysis system and method based on a plug-in development framework in view of the deficiencies in the prior art.

[0004] In order to solve the above technical problems, in the first aspect, a software component vulnerability analysis system based on a plug-in development framework is disclosed, including a task creation module, an analysis plug-in construction module, a software component analysis module and a software component vulnerability analysis module.

[0005] The task creation module is used to create a software component analysis task; the software component analysis task is used to analyze software components in software source code;

[0006] The analysis plug-in construction module is used to construct a host program for running the analysis plug-in, define an interface specification between the host program and the analysis plug-in, and construct the analysis plug-in according to the interface specification; the analysis plug-in is used to analyze software components in software source code according to project type;

[0007] The software component analysis module is used to create a software component analysis task execution thread, and the software component analysis task execution thread calls the analysis plug-in to analyze the software components in the software source code to obtain the software component analysis results;

[0008] The software component vulnerability analysis module is used to perform vulnerability analysis on the software component analysis results based on the rule engine to obtain the software component vulnerability analysis results.

[0009] Further, the task creation module includes a task configuration unit, a software component analysis task management unit and a software component analysis task queue, the task configuration unit is used to set task configuration information, the task configuration information includes software source code file path, source code warehouse information and binary file path;

[0010] The software component analysis task management unit is used to create a software component analysis task according to the task configuration information and push the software component analysis task to the software component analysis task queue; the software component analysis task management unit records the task configuration information, delivers it to the task queue, and transmits it to the next module using asynchronous communication, thereby improving the system throughput and response speed.

[0011] The software component analysis task queue is used to store software component analysis tasks.

[0012] Further, the analysis plug-in construction module includes a host program construction unit and an analysis plug-in construction unit, the host program construction unit is used to construct a host program for running the analysis plug-in, and the host program can register, unregister, test, enable, disable and update the analysis plug-in;

[0013] The analysis plug-in construction unit is used to define the interface specification between the host program and the analysis plug-in, and to construct analysis plug-ins of different project types according to the interface specification, and the project types include MAVEN projects, GRADLE projects, GO projects and NPM projects. Analysis plug-ins are dynamically constructed according to different projects, and different analysis plug-ins analyze different projects, which reduces the system coupling, has high reliability and is easy to expand.

[0014] Further, the software component analysis module includes a software component analysis task queue consumption service unit, a task execution unit and a software component analysis result queue, wherein the software component analysis task queue consumption service unit is used to monitor the tasks in the software component analysis task queue;

[0015] The task execution unit is used to create a software component analysis task execution thread according to the software component analysis task information when the software component analysis task queue consumption service unit monitors the task. The software component analysis task execution thread calls the analysis plug-in to analyze the software components in the software source code, obtains the software component analysis results, and pushes them to the software component analysis result queue; the message queue is used to asynchronously monitor the tasks and multi-threadedly process the tasks, thereby improving the system response speed, improving the execution efficiency, and saving time.

[0016] The software component analysis result queue is used to store the software component analysis result.

[0017] Further, the software component vulnerability analysis module includes a software component analysis result queue consumption service unit and a correlation analysis unit, wherein the software component analysis result queue consumption service unit is used to monitor the analysis results in the software component analysis result queue;

[0018] The correlation analysis unit is used to perform vulnerability analysis on the software component analysis result based on the rule engine to obtain the software component vulnerability analysis result when the software component analysis result queue consumption service unit monitors the analysis result; the vulnerability analysis on the software component analysis result based on the rule engine includes performing vulnerability analysis on the software component analysis result according to the correlation analysis event rule and vulnerability information set configured by the rule engine. The component information obtained by the software component analysis is strongly associated with the vulnerability rule, thereby improving the credibility of the analysis result.

[0019] Further, the vulnerability analysis of the software component analysis results according to the correlation analysis event rules and vulnerability information set configured by the rule engine includes: recording the software component analysis results as a set Constituents, the set Constituents includes multiple software components Constituents, each software component Constituent includes the ID groupId of the group to which the project belongs, the ID artifactId in the project group, and the version number version; the official cpe includes the vulnerability ID vulnId, the manufacturer name vendor, the product name product, the product version version, the version number starting from this version versionStartExcluding, the version number starting greater than this version number versionStartExcluding, ending at this version number versionEndIncluding, and ending less than this version number versionEndExcluding, recording the vulnerability information set as vulns, wherein each vulnerability information includes the vulnerability unique ID vulnId;

[0020] The rules for association analysis events are as follows: extract the attributes groupId, artifactid, version of the software component Constituent and the vendor, product, version, versionStartExcluding, versionStartExcluding, versionEndIncluding, versionEndExcluding of the official CPE respectively. When the attributes groupId and artifactid of the software component Constituent are equal to the vendor and product attributes of the official CPE respectively, compare the version of the software component Constituent with the version of the official CPE. When version is not *, they are equal to each other. When ve When rsion is *, check whether the version of the software component Constituent is within the range of versionStartExcluding, versionStartExcluding, versionEndIncluding, and versionEndExcluding. When the software component Constituent matches the official cpe, record the official cpe's vulnId in the vulnerability ID set vulnIds. Match the vulnerability ID set vulnIds with the vulnerability information set vulns. When the attribute vulnId of the vulnerability ID set vulnIds is equal to the vulnId of the vulnerability information set vulns, the match is met, and the software component vulnerability analysis results are recorded in the software component vulnerability analysis result set measureVulns.

[0021] The data format of the software component vulnerability analysis result set measureVulns is as follows:

[0022]

[0023]

[0024] Furthermore, the interface specification between the host program and the analysis plug-in includes a registration service interface bundle, a bundle activator interface start and end, a service object abstract class plier, a registration object interface regist, an abstract class invoke for calling a service instance, an abstract class track for a service tracking instance, and a dynamic link library scanning interface createObject. The registration service interface bundle is used to register and deregister the analysis plug-in; the bundle activator interfaces start and end are used to enable and disable the analysis plug-in respectively; the service object abstract class plier is used to provide plug-in analysis functions; the registration object interface regist is used to register the scanning plug-in in the main program; the abstract class invoke for calling a service instance is used to call the corresponding service object abstract class; the abstract class track for the service tracking instance is used to dynamically track and switch service objects according to the instance; and the dynamic link library scanning interface createObject is used to implement the scanning of the dynamic link library plug-in. The program loads functional modules as needed during runtime, thereby reducing memory usage and startup time, and greatly promoting code reuse and maintenance. Through the dynamic link library, developers can easily add new functions to the application or update existing functions without having to recompile the entire program. In addition, this technology also supports cross-platform development, allowing the software to run seamlessly in multiple operating system environments, enhancing the flexibility and portability of the software.

[0025] Furthermore, the software component vulnerability analysis module also includes a deduplication unit, which is used to deduplicate data of the software component analysis results before performing vulnerability analysis on the software component analysis results based on the rule engine. The data deduplication includes deduplicating the software components Constituent in the software component analysis result set Constituents according to the ID groupId of the group to which the project belongs, the ID artifactId in the project group, and the version number version, and accumulating the detection path.

[0026] Furthermore, the task configuration information consists of seven tuples:<id,projectName,sourceType,filePath,authorizationName,authorizationKey,projectCreateTime> It is composed of: id is the unique identifier of the task configuration; projectName is the task name; sourceType is the source identifier of the source file of the task, where 1 represents the local source code file and 2 represents the source code repository; filePath is the source address of the task file, which is the local source code file path when sourceType=1 and the source code repository address when sourceType=2; authorizationName is the source code repository access authorization name; authorizationKey is the source code repository access authorization key; authorizationName and authorizationKey are filled in when sourceType=2; projectCreateTime is the creation time of the task.

[0027] In a second aspect, a method for analyzing software component vulnerabilities based on a plug-in development framework is disclosed, which is applied to the software component vulnerability analysis system based on the plug-in development framework, and includes the following steps:

[0028] Set task configuration information and create a software component analysis task based on the task configuration information;

[0029] Constructing a host program for running the analysis plug-in, defining an interface specification between the host program and the analysis plug-in, and constructing analysis plug-ins of different project types according to the interface specification; the analysis plug-in is used to analyze software components in software source code according to project types;

[0030] Create a software component analysis task execution thread, which calls the corresponding analysis plug-in according to the project type to analyze the software components in the software source code and obtain the software component analysis results;

[0031] Perform vulnerability analysis on the software component analysis results according to the correlation analysis event rules and vulnerability information set configured by the rule engine to obtain software component vulnerability analysis results.

[0032] Beneficial effects: The software component vulnerability analysis system and method based on the plug-in development framework provided by the present application performs software component analysis on the software source code during the software development process. The plug-in development is adopted, and the plug-in can be dynamically configured and loaded on demand, which reduces the resource usage of the entire system and makes the functional structure more compact. At the same time, developers only need to focus on plug-in writing, and the amount of code and knowledge is significantly reduced, which can reduce the technical level requirements of developers, making the code easier to maintain, and the faults easy to recover, reducing labor costs. Based on the rule engine, the software component analysis results are analyzed for vulnerabilities, which can discover components with security vulnerabilities from the source, and replace them in time, avoiding the time and labor costs of discovering and handling vulnerabilities after the software development is completed or even put into operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments, and the above and / or other advantages of the present invention will become more clear.

[0034] Figure 1 A schematic diagram of the structure of a software component vulnerability analysis system based on a plug-in development framework provided in an embodiment of the present application.

[0035] Figure 2 Another structural diagram of a software component vulnerability analysis system based on a plug-in development framework provided in an embodiment of the present application.

[0036] Figure 3 A flowchart of a method for analyzing software component vulnerabilities based on a plug-in development framework is provided in an embodiment of the present application. DETAILED DESCRIPTION

[0037] The embodiments of the present invention will be described below in conjunction with the accompanying drawings.

[0038] The first embodiment of the present application discloses a software component vulnerability analysis system based on a plug-in development framework, such as Figure 1 As shown, it includes a task creation module, an analysis plug-in construction module, a software component analysis module and a software component vulnerability analysis module, wherein the task creation module is used to create a software component analysis task; the software component analysis task is used to analyze the software components in the software source code;

[0039] The analysis plug-in construction module is used to construct a host program for running the analysis plug-in, define an interface specification between the host program and the analysis plug-in, and construct the analysis plug-in according to the interface specification; the analysis plug-in is used to analyze software components in software source code according to project type;

[0040] The software component analysis module is used to create a software component analysis task execution thread, and the software component analysis task execution thread calls the analysis plug-in to analyze the software components in the software source code to obtain the software component analysis results;

[0041] The software component vulnerability analysis module is used to perform vulnerability analysis on the software component analysis results based on the rule engine to obtain the software component vulnerability analysis results.

[0042] In this embodiment, Figure 2 As shown, the task creation module includes a task configuration unit, a software component analysis task management unit and a software component analysis task queue, the task configuration unit is used to set task configuration information, and the task configuration information includes software source code file path, source code warehouse information (source code warehouse address, code warehouse login user name, code warehouse login password) and binary file path;

[0043] The software component analysis task management unit is used to create a software component analysis task according to the task configuration information, and push the software component analysis task to the software component analysis task queue;

[0044] The software component analysis task queue is used to store software component analysis tasks and is recorded as SComponentAnalysisQueue.

[0045] The structure of task configuration information is shown in the following table. It consists of a seven-tuple <id,projectName,sourceType,filePath,authorizationName,authorizationKey,projectCreateTime> It is composed of: id is the unique identifier of the task configuration; projectName is the name of the task; sourceType is the source identifier of the source file of the task (1: local source code file, 2: source code repository); filePath is the specific source address of the task file, which is the local source code file path when sourceType=1 and the source code repository address when sourceType=2; authorizationName is the source code repository access authorization name; authorizationKey is the source code repository access authorization key; authorizationName and authorizationKey are filled in when sourceType=2; projectCreateTime is the creation time of the task.

[0046]

[0047] In this embodiment, the analysis plug-in construction module includes a host program construction unit and an analysis plug-in construction unit. The host program construction unit is used to construct a host program that runs the analysis plug-in. The host program can register, unregister, test, enable, disable and update the analysis plug-in; the details are as follows:

[0048] Register the plug-in: register the scanning plug-in in the scanning plug-in host program and locate the execution path of the plug-in;

[0049] Unregister plug-in: For the scan plug-in that is no longer used, you can unregister the plug-in in the scan plug-in host program and delete the plug-in from the scan plug-in host program;

[0050] Plug-in test: For plug-ins registered in the scanning plug-in host program, the scanning plug-in host program can test the plug-in to determine whether the plug-in program can run normally. The plug-in that passes the test can be enabled, while the plug-in that fails the test cannot be enabled.

[0051] Enable plugin: Enable plugins that have been registered and passed the test;

[0052] Deactivate plugin: When a running plugin is no longer used, it can be deactivated;

[0053] Update plugin: For plugins with changed functions, you can update the plugin information.

[0054] The analysis plug-in construction unit is used to define the interface specification between the host program and the analysis plug-in, and to construct analysis plug-ins of different project types according to the interface specification. The project types include MAVEN projects, GRADLE projects, GO projects and NPM projects.

[0055] The interface specification between the host program and the analysis plug-in includes the registration service interface bundle, the bundle activator interfaces start and end, the service object abstract class plier, the registration object interface regist, the abstract class invoke of the calling service instance, the abstract class track of the service tracking instance, and the dynamic link library scanning interface createObject. The registration service interface bundle is used to register and deregister the analysis plug-in; the bundle activator interfaces start and end are used to enable and disable the analysis plug-in respectively; the service object abstract class plier is used to provide the plug-in analysis function; the registration object interface regist is used to register the scanning plug-in in the main program; the abstract class invoke of the calling service instance is used to call the corresponding service object abstract class, the abstract class track of the service tracking instance is used to dynamically track and switch the service object according to the instance; the dynamic link library scanning interface createObject is used to implement the scanning of the dynamic link library plug-in. The definitions of each interface are shown in the following table.

[0056] Interface Name Registration service interface Interface Features Abstract class, used to be inherited Class name (object name) PlugInRegistrateService Main interfaces Public String bundle(String className); parameter String type, the class name of the current class Return Value String type, the result of the method operation implemented by the class.

[0057]

[0058]

[0059]

[0060] Interface Name Registration object interface Interface Features Abstract class, used to be inherited Class name (object name) PlugInRegistObjectService Main interfaces public String register(String className) parameter String type, the class name of the current class Return Value String type, the result of the method operation implemented by the class.

[0061] Interface Name Calling service instance class Interface Features Abstract class, used to be inherited Class name (object name) PlugInInvokService Main interfaces public String invok(String className)=0; parameter String type, the class name of the current class Return Value String type, the result of the method operation implemented by the class.

[0062] Interface Name Creating a service tracking class Interface Features Abstract class, used to be inherited Class name (object name) PlugInTrackService Main interfaces public String track(PlugInRegistrateService service)=0; parameter PlugInRegistrateService type, plug-in context Return Value String type, the result of the method operation implemented by the class.

[0063]

[0064]

[0065] Identify the project type based on the feature file, where the feature file pom.xml is a MAVEN project, the feature file build.gradle is a GRADLE project, the feature file go.mod is a GO project, and the feature file package.json is an NPM project. The project type identification function is as follows:

[0066]

[0067] The definitions of the parent class interface ParentPlugIn, the MAVEN project implementation class MavenPlugIn, the GRADLE project implementation class GradlePlugIn, the GO project implementation class GoPlugIn, and the NPM project implementation class NpmPlugIn are shown in the following table.

[0068]

[0069]

[0070]

[0071]

[0072]

[0073]

[0074]

[0075] In this embodiment, the software component analysis module includes a software component analysis task queue consumption service unit, a task execution unit and a software component analysis result queue. The software component analysis task queue consumption service unit is used to monitor the tasks in the software component analysis task queue, and is defined as shown in the following table:

[0076]

[0077] The task execution unit is used to create a software component analysis task execution thread according to the software component analysis task information when the software component analysis task queue consumption service unit monitors the task. The software component analysis task execution thread calls the analysis plug-in to analyze the software components in the software source code, obtains the software component analysis results, and pushes them to the software component analysis result queue; specifically, the project type can be identified according to the feature file (the feature file pom.xml is a MAVEN project, the feature file build.gradle is a GRADLE project, the feature file go.mod is a GO project, and the feature file package.json is an NPM project), and the corresponding analysis implementation class (MAVEN project MavenPlugIn, GRADLE project implementation class GradlePlugIn, GO project implementation class GoPlugIn, NPM project implementation class NpmPlugIn) is called to perform software component analysis.

[0078] For example: perform Maven project component analysis

[0079] MavenPlugIn calls the Public JSON analyze(File file, Boolean recursion, int floorNum) method, where file represents the project source file, recursion represents whether to analyze only direct dependencies (recursion = true represents analysis of direct dependencies only, recursion = false represents analysis of direct dependencies + indirect dependencies), and floorNum represents the number of indirect dependency layers to be analyzed.

[0080] The software component information json format is analyzed as follows:

[0081]

[0082]

[0083] The software component analysis result queue is used to store the software component analysis results and is recorded as SComponentResultQueue.

[0084] In this embodiment, the software component vulnerability analysis module includes a software component analysis result queue consumption service unit and a correlation analysis unit. The software component analysis result queue consumption service unit is used to monitor the analysis results in the software component analysis result queue, and is defined as shown in the following table:

[0085]

[0086] The correlation analysis unit is used to perform vulnerability analysis on the software component analysis results based on the rule engine to obtain the software component vulnerability analysis results when the software component analysis result queue consumption service unit monitors the analysis results; the rule engine can be a Drools rule engine. The vulnerability analysis on the software component analysis results based on the rule engine includes performing vulnerability analysis on the software component analysis results according to the correlation analysis event rules and vulnerability information set configured by the rule engine, specifically:

[0087] The base class of software components is as follows:

[0088] Class Constituent{

[0089] Long constituentId;

[0090] String vendor;

[0091] String product;

[0092] String version;

[0093] String referencePoint;

[0094] Boolean directReference; ...

[0096] }

[0097] Among them, constituentId represents the unique ID of the software component, vendor represents the manufacturer name, product represents the product name, version represents the product version number, referencePoint represents the specific reference path of the source file using the software component, directReference represents whether the software component is a direct dependency, and "..." represents getter, setter, and contructor methods.

[0098] The vulnerability base class is as follows:

[0099]

[0100] Where, vulnId indicates the unique ID of the vulnerability, vulnTitle indicates the vulnerability label, vulnUrl indicates the vulnerability reference link, vulnDes indicates the vulnerability detailed description, vulnType indicates the vulnerability type, vulnRank indicates the vulnerability level, vulnCpe indicates the official cpe (Common Platform Enumeration) of the vulnerability, vulnResolve indicates the vulnerability solution, cnnvdId indicates the vulnerability cnnvd (China National Vulnerability Database of Information Security) number, cnvdId indicates the vulnerability cnvd (China National Vulnerability Database) number, cveId indicates the vulnerability cve (Common Vulnerabilities and Exposures) number, vulnPublicTime indicates the vulnerability disclosure time, isHost indicates whether it is a hot vulnerability, isKey indicates whether it is a critical vulnerability, cvss indicates the vulnerability cvss score, and "..." represents getter, setter, and constructor methods.

[0101] The official cpe json data format is as follows:

[0102]

[0103] Where vendor indicates the manufacturer name, product indicates the product name, version indicates the product version (this item can be a specific version number or *), cpe23Uri indicates a general description of the cpe, versionStartIncluding, versionStartExcluding, versionEndIncluding, and versionEndExcluding describe the product version range corresponding to the vulnerability, versionStartIncluding indicates that the version number starts at this version, versionStartExcluding indicates that the version number starts greater than this version number, versionEndIncluding indicates that the version number ends at this version number, and versionEndExcluding indicates that the version number ends less than this version number. When version = "*", the version range is valid.

[0104] Define the cpe base class as follows:

[0105]

[0106]

[0107] The meaning of the fields is the same as that of the official cpe. vulnCpeId indicates the unique identifier of the cpe base, vulnId indicates the vulnerability ID used to associate the Vuln class, and "..." represents the getter, setter, and contructor methods.

[0108] The software component analysis and vulnerability CPE correlation analysis interface are defined as follows:

[0109]

[0110]

[0111]

[0112] The form of association analysis event rules is as follows: Antecedent—>Consequent, where both the antecedent and the consequent are item sets, that is, event sets, —> represents the association relationship, the antecedent represents the condition of the association rule, and the consequent represents the conclusion derived from the association rule.

[0113] Constituents(Set <constituent>Type) collection and cpes(List <cpe>Type) Set association analysis, the analysis rules are as follows: respectively take out the attributes groupId, artifactid, version of constituents and vendor, product, version, versionStartExcluding, versionStartExcluding, versionEndIncluding, versionEndExcluding of cpes. When the attributes groupId and artifactid of constituents are equal to the vendor and product attributes of cpes, compare the version of constituents with the version of cpes. When version is not '*', they are equal matches. When version is '*', check whether the version is within the range of versionStartExcluding, versionStartExcluding, versionEndIncluding, versionEndExcluding. When constituents and cpes match, record the vulnId of cpes as the set Set <string>vulnIds。Set <stirng>vulnIds and List <vuln>vulns is used for rule matching. When the vulnId attribute of vulnIds is equal to the vulnId of vulns, it is matched and recorded in List <vuln>measureVulns; measureVulns represents the software component vulnerability analysis result set, and the data format is as follows:

[0114] {

[0115] "sum":"Total number of vulnerabilities",

[0116] "target":"Detection target",

[0117] "timeConsume":"Detection time consumption",

[0118] "vulns":[{

[0119] "constituent":"groupId-artifactid-version triple information",

[0120] "rank":"Vulnerability level",

[0121] "title":"Vulnerability title",

[0122] "description":"Vulnerability description",

[0123] "resolve":"Vulnerability solution",

[0124] "url":"Vulnerability reference link",

[0125] "cpe":"vulnerability official cpe",

[0126] "cnvdId":"vulnerability cnvdId number",

[0127] "cveId":"vulnerability cveId number",

[0128] "directReference": "Whether it is directly dependent",

[0129] "referencePoint":"Vulnerability check address",

[0130] },{..} ]

[0132] }

[0133] In this embodiment, the software component vulnerability analysis module also includes a deduplication unit, which is used to perform data deduplication on the software component analysis results before performing vulnerability analysis on the software component analysis results based on the rule engine. The data deduplication includes deduplication of the software component Constituents in the software component analysis result set Constituents according to the ID groupId of the group to which the project belongs, the ID artifactId in the project group, and the version number version, and accumulates the detection path. The specific definition is shown in the following table:

[0134]

[0135] The second embodiment of the present application discloses a software component vulnerability analysis method based on a plug-in development framework, which is applied to the software component vulnerability analysis system based on the plug-in development framework, and includes the following steps:

[0136] Set task configuration information and create a software component analysis task based on the task configuration information;

[0137] Constructing a host program for running the analysis plug-in, defining an interface specification between the host program and the analysis plug-in, and constructing analysis plug-ins of different project types according to the interface specification; the analysis plug-in is used to analyze software components in software source code according to project types;

[0138] Create a software component analysis task execution thread, which calls the corresponding analysis plug-in according to the project type to analyze the software components in the software source code and obtain the software component analysis results;

[0139] Perform vulnerability analysis on the software component analysis results according to the correlation analysis event rules and vulnerability information set configured by the rule engine to obtain software component vulnerability analysis results.

[0140] Specifically, Figure 3 As shown, the following steps may be included: setting task configuration information, the software component analysis task management unit loading the task configuration information, creating a software component analysis task, and pushing the software component analysis task to the software component analysis task queue;

[0141] Build a host program that runs the analysis plug-in, define the interface specification between the host program and the analysis plug-in, and build analysis plug-ins including MAVEN projects, GRADLE projects, GO projects and NPM projects according to the interface specification; the analysis plug-in is used to analyze the software components in the software source code according to the project type.

[0142] The software component analysis task queue consumption service unit monitors the tasks in the software component analysis task queue. When the software component analysis task queue consumption service unit monitors the tasks, it creates a software component analysis task execution thread according to the software component analysis task information. It can create multiple software component analysis task execution threads to form a thread pool. The software component analysis task execution thread calls the corresponding analysis plug-in according to the project type to analyze the software components in the software source code and obtain the software component analysis result software component analysis task execution thread; the project type is identified by the feature file.

[0143] The software component analysis result queue consumption service unit listens to the analysis results in the software component analysis result queue. When the software component analysis result queue consumption service unit listens to the analysis results, it can first deduplicate the software component analysis results, and then perform vulnerability analysis on the deduplicated software component analysis results according to the associated analysis event rules and vulnerability information set configured by the rule engine to obtain the software component vulnerability analysis results.

[0144] In a specific implementation, the present application provides a computer storage medium and a corresponding data processing unit, wherein the computer storage medium can store a computer program, and when the computer program is executed by the data processing unit, the invention content of a method for analyzing software component vulnerabilities based on a plug-in development framework provided by the present invention and some or all of the steps in each embodiment can be executed. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0145] Those skilled in the art can clearly understand that the technical solutions in the embodiments of the present invention can be implemented by means of computer programs and their corresponding general hardware platforms. Based on this understanding, the technical solutions in the embodiments of the present invention are essentially or partly contributed to the prior art can be embodied in the form of a computer program, i.e., a software product, which can be stored in a storage medium and includes several instructions for enabling a device including a data processing unit (which can be a personal computer, a server, a single-chip microcomputer, a MUU or a network device, etc.) to execute the methods described in various embodiments of the present invention or certain parts of the embodiments.

[0146] The present invention provides a software component vulnerability analysis system and method based on a plug-in development framework. There are many methods and ways to implement the technical solution. The above is only a preferred implementation of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the protection scope of the present invention. All components not specified in this embodiment can be implemented using existing technologies.< / vuln> < / vuln> < / stirng> < / string> < / cpe> < / constituent>

Claims

1. A software component vulnerability analysis system based on a plug-in development framework, characterized in that: It includes task creation module, analysis plug-in construction module, software component analysis module and software component vulnerability analysis module. The task creation module is used to create a software component analysis task; the software component analysis task is used to analyze software components in software source code; The analysis plug-in construction module is used to construct a host program for running the analysis plug-in, define an interface specification between the host program and the analysis plug-in, and construct the analysis plug-in according to the interface specification; the analysis plug-in is used to analyze software components in software source code according to project type; The software component analysis module is used to create a software component analysis task execution thread, and the software component analysis task execution thread calls the analysis plug-in to analyze the software components in the software source code to obtain the software component analysis results; The software component vulnerability analysis module is used to perform vulnerability analysis on the software component analysis results based on a rule engine to obtain software component vulnerability analysis results.

2. According to claim 1, a software component vulnerability analysis system based on a plug-in development framework is characterized in that: The task creation module includes a task configuration unit, a software component analysis task management unit and a software component analysis task queue, wherein the task configuration unit is used to set task configuration information, and the task configuration information includes software source code file path, source code warehouse information and binary file path; The software component analysis task management unit is used to create a software component analysis task according to the task configuration information, and push the software component analysis task to the software component analysis task queue; The software component analysis task queue is used to store software component analysis tasks.

3. A software component vulnerability analysis system based on a plug-in development framework according to claim 2, characterized in that: The analysis plug-in construction module includes a host program construction unit and an analysis plug-in construction unit, wherein the host program construction unit is used to construct a host program for running the analysis plug-in, and the host program can register, unregister, test, enable, disable and update the analysis plug-in; The analysis plug-in construction unit is used to define the interface specification between the host program and the analysis plug-in, and to construct analysis plug-ins of different project types according to the interface specification.

4. A software component vulnerability analysis system based on a plug-in development framework according to claim 3, characterized in that: The software component analysis module includes a software component analysis task queue consumption service unit, a task execution unit and a software component analysis result queue, wherein the software component analysis task queue consumption service unit is used to monitor the tasks in the software component analysis task queue; The task execution unit is used to create a software component analysis task execution thread according to the software component analysis task information when the software component analysis task queue consumption service unit monitors the task, and the software component analysis task execution thread calls the analysis plug-in to analyze the software components in the software source code, obtain the software component analysis results, and push them to the software component analysis result queue; The software component analysis result queue is used to store the software component analysis result.

5. A software component vulnerability analysis system based on a plug-in development framework according to claim 4, characterized in that: The software component vulnerability analysis module includes a software component analysis result queue consumption service unit and a correlation analysis unit, wherein the software component analysis result queue consumption service unit is used to monitor the analysis results in the software component analysis result queue; The correlation analysis unit is used to perform vulnerability analysis on the software component analysis result based on the rule engine to obtain the software component vulnerability analysis result when the software component analysis result queue consumption service unit monitors the analysis result; The performing vulnerability analysis on the software component analysis results based on the rule engine includes performing vulnerability analysis on the software component analysis results according to the association analysis event rules and vulnerability information set configured by the rule engine.

6. A software component vulnerability analysis system based on a plug-in development framework according to claim 5, characterized in that: The vulnerability analysis of the software component analysis result according to the correlation analysis event rule configured by the rule engine and the vulnerability information set includes: recording the software component analysis result as a set Constituents, the set Constituents includes multiple software components Constituents, each software component Constituent includes the ID groupId of the group to which the project belongs, the ID artifactId in the project group and the version number version; the official cpe includes the vulnerability ID vulnId, the manufacturer name vendor, the product name product, the product version version, the version number starts at this version versionStartExcluding, the version number starts greater than this version number versionStartExcluding, ends at this version number versionEndIncluding and ends less than this version number versionEndExcluding, the vulnerability information set is recorded as vulns, and each vulnerability information includes the vulnerability unique ID vulnId; The rules for association analysis events are as follows: extract the attributes groupId, artifactid, version of the software component Constituent and the vendor, product, version, versionStartExcluding, versionStartExcluding, versionEndIncluding, versionEndExcluding of the official CPE respectively. When the attributes groupId and artifactid of the software component Constituent are equal to the vendor and product attributes of the official CPE respectively, compare the version of the software component Constituent with the version of the official CPE. When version is not *, they are equal to each other. When ve When rsion is *, check whether the version of the software component Constituent is within the range of versionStartExcluding, versionStartExcluding, versionEndIncluding, and versionEndExcluding. When the software component Constituent matches the official cpe, record the official cpe's vulnId in the vulnerability ID set vulnIds. Match the vulnerability ID set vulnIds with the vulnerability information set vulns. When the attribute vulnId of the vulnerability ID set vulnIds is equal to the vulnId of the vulnerability information set vulns, the match is met, and the software component vulnerability analysis results are recorded in the software component vulnerability analysis result set measureVulns. The data format of the software component vulnerability analysis result set measureVulns is as follows: {"sum":"Total number of vulnerabilities", "target":"Detection target", "timeConsume":"Detection time consumption", "vulns":[{ "constituent":"groupId-artifactid-version triple information", "rank":"Vulnerability level", "title":"Vulnerability title", "description":"Vulnerability description", "resolve":"Vulnerability solution", "url":"Vulnerability reference link", "cpe":"vulnerability official cpe", "cnvdId":"vulnerability cnvdId number", "cveId":"vulnerability cveId number", "directReference": "Whether it is directly dependent", "referencePoint":"Vulnerability check address", },{..} ] }。 7. A software component vulnerability analysis system based on a plug-in development framework according to claim 6, characterized in that: The interface specification between the host program and the analysis plug-in includes a registration service interface bundle, a bundle activator interface start and end, a service object abstract class plier, a registration object interface regist, an abstract class invoke for calling a service instance, an abstract class track for a service tracking instance, and a dynamic link library scanning interface createObject. The registration service interface bundle is used to register and deregister an analysis plug-in; the bundle activator interfaces start and end are used to enable and disable the analysis plug-in, respectively; the service object abstract class plier is used to provide a plug-in analysis function; the registration object interface regist is used to register a scanning plug-in in the main program; the abstract class invoke for calling a service instance is used to call the corresponding service object abstract class; the abstract class track for the service tracking instance is used to dynamically track and switch service objects according to the instance; the dynamic link library scanning interface createObject is used to implement scanning of dynamic link library plug-ins.

8. A software component vulnerability analysis system based on a plug-in development framework according to claim 7, characterized in that: The software component vulnerability analysis module also includes a deduplication unit, which is used to deduplicate data on the software component analysis results before performing vulnerability analysis on the software component analysis results based on the rule engine. The data deduplication includes deduplicating the software components Constituent in the software component analysis result set Constituents according to the IDgroupId of the group to which the project belongs, the ID artifactId in the project group, and the version number version, and accumulating the detection path.

9. A software component vulnerability analysis system based on a plug-in development framework according to claim 8, characterized in that: The task configuration information consists of seven tuples<id,projectName,sourceType,filePath,authorizationName,authorizationKey,projectCreateTime> The task is composed of: id is the unique identifier of the task configuration; projectName is the task name; sourceType is the source identifier of the source file of the task, where 1 indicates the local source code file and 2 indicates the source code repository; filePath is the source address of the task file, where sourceType=1 is the local source code file path and sourceType=2 is the source code repository address; authorizationName is the source code repository access authorization name; authorizationKey is the source code repository access authorization key; authorizationName and authorizationKey are filled in when sourceType=2; projectCreateTime is the creation time of the task.

10. A method for analyzing software component vulnerabilities based on a plug-in development framework, applied to the software component vulnerability analysis system based on a plug-in development framework according to any one of claims 1 to 9, characterized in that: The following steps are involved: Set task configuration information and create a software component analysis task based on the task configuration information; Constructing a host program for running the analysis plug-in, defining an interface specification between the host program and the analysis plug-in, and constructing analysis plug-ins of different project types according to the interface specification; the analysis plug-in is used to analyze software components in software source code according to project types; Create a software component analysis task execution thread, which calls the corresponding analysis plug-in according to the project type to analyze the software components in the software source code and obtain the software component analysis results; Perform vulnerability analysis on the software component analysis results according to the correlation analysis event rules and vulnerability information set configured by the rule engine to obtain software component vulnerability analysis results.

Citation Information

Cited By

  • Nuclear reactor analysis method

    CN120877888A