Risk identification methods, devices and electronic devices for open source components

By obtaining the development activity data and vulnerability parameters of open source components and calculating the comprehensive risk value, the problem of not being able to identify the risks of open source components in the existing technology is solved, and the security of the production environment is improved.

CN117201119BActive Publication Date: 2024-11-22CHINA MOBILE INTERNET CO LTD +1
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202311157660.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-07
Publication Date
2024-11-22
Estimated Expiration
2043-09-07

AI Technical Summary

Technical Problem

The prior art cannot effectively identify the risks of open source components in a production environment, resulting in the inability to ensure the security of the production environment.

Method used

By obtaining the development activity data and vulnerability parameters of open source components, calculating comprehensive risk values, including risk coefficients and vulnerability-related parameters, and generating reinforcement reminder information to improve security.

Benefits of technology

Accurately identify the risk situation of open source components, improve the security of the production environment, and ensure timely detection and handling of potential threats.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117201119B_ABST
    Figure CN117201119B_ABST
Patent Text Reader

Abstract

The present application proposes a risk identification method, device and electronic device for open source components, which relate to the field of network security technology. The risk identification method for open source components includes: obtaining the development activity data of each open source component, wherein the open source component is a component included in the project deployed in the production environment; obtaining the first parameter of each vulnerability, the first parameter is used to characterize the priority of vulnerability repair; for any target open source component in each open source component, obtaining the key vulnerability set involved in the current version of the target open source component, and determining the remaining vulnerabilities that do not belong to the key vulnerability set among all the vulnerabilities; based on the development activity data of the target open source component and the first parameter of the remaining vulnerabilities, determining the comprehensive risk value of the target open source component. The comprehensive risk value determined by the embodiment of the present application is more efficient and accurate in judging the risk situation of the target open source component, thereby improving the security of the production environment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of network security technology, and in particular to a risk identification method, device and electronic device for open source components. Background Art

[0002] With the rapid development of network security technology, boundary-breaking technology can exploit vulnerabilities in open source components, steal project information and system permissions, and cause the leakage of important information. At present, in the security management of open source components, it is impossible to implement comprehensive open source component scanning and information collection in the production environment, resulting in the inability to accurately and efficiently identify the risks of open source components and the inability to ensure the security of the production environment. Summary of the invention

[0003] Embodiments of the present application provide a method, device, and electronic device for identifying risks of open source components.

[0004] The first embodiment of the present application proposes a risk identification method for open source components, including:

[0005] Acquire development activity data of each open source component, wherein the open source component is a component included in a project deployed in a production environment;

[0006] Obtaining a first parameter of each vulnerability, where the first parameter is used to characterize a repair priority of the vulnerability;

[0007] For any target open source component among the open source components, obtain a critical vulnerability set involved in the current version of the target open source component, and determine the remaining vulnerabilities that do not belong to the critical vulnerability set among all the vulnerabilities;

[0008] Based on the development activity data of the target open source component and the first parameter of the remaining vulnerability, a comprehensive risk value of the target open source component is determined.

[0009] In one embodiment of the present application, determining the comprehensive risk value of the target open source component based on the development activity data of the target open source component and the first parameter of the remaining vulnerability includes:

[0010] Determining a first risk factor of the target open source component based on the development activity data;

[0011] Determining a second risk factor of the target open source component based on the first parameter of the remaining vulnerability;

[0012] The comprehensive risk value is determined based on the first risk factor and the second risk factor.

[0013] In one embodiment of the present application, determining the first risk factor of the target open source component based on the development activity data includes:

[0014] Obtain risk behavior data of the target open source component;

[0015] A first risk factor of the target open source component is determined according to the risk behavior data and the development activity data.

[0016] In one embodiment of the present application, obtaining the risk behavior data of the target open source component includes:

[0017] Obtaining the frequency of occurrence of the target open source component executing the target risk behavior; and / or,

[0018] Obtain the number of times the target open source component performs version upgrade behavior within a set time period.

[0019] In one embodiment of the present application, obtaining the first parameter of each vulnerability includes:

[0020] For any vulnerability, obtain the total number of unfixed vulnerabilities of all open source components involving the vulnerability;

[0021] Obtain the number of unfixed vulnerabilities for each open source component when it involves any of the above vulnerabilities;

[0022] For each open source component, based on the total number of unfixed vulnerabilities of any one vulnerability and the number of unfixed vulnerabilities when the open source component involves any one vulnerability, determine the unfixed vulnerability ratio of any one vulnerability corresponding to the open source component;

[0023] Based on the proportion of unfixed vulnerabilities of any vulnerability of each open source component, an entropy value of the proportion of any vulnerability is determined as a first parameter of any vulnerability.

[0024] In one embodiment of the present application, determining the second risk factor of the target open source component based on the first parameter of the remaining vulnerability includes:

[0025] Obtaining vulnerability distribution data of the target open source component;

[0026] Determining vulnerability-related parameters of the target open source component based on the vulnerability distribution data;

[0027] Based on the vulnerability-related parameters and the first parameters of the remaining vulnerabilities, a second risk coefficient of the target open source component is determined.

[0028] In one embodiment of the present application, determining vulnerability-related parameters of the target open source component based on the vulnerability distribution data includes at least one of the following operations:

[0029] Based on the vulnerability distribution data, the number of occurrences of each vulnerability and the total number of vulnerabilities are obtained, and based on the number of occurrences of each vulnerability and the total number of vulnerabilities, the component risk entropy of the target open source component is determined;

[0030] Based on the vulnerability distribution data, obtain the number of vulnerabilities, the number of critical vulnerabilities, and the number of newly added critical vulnerabilities within a set period of time involved in the current version of the target open source component;

[0031] The vulnerability distribution data is obtained, the vulnerabilities involved in the target open source component are determined, and the average risk value of the involved vulnerabilities is obtained.

[0032] In one embodiment of the present application, the first risk coefficient is determined using the following formula:

[0033]

[0034] Among them, c represents the first risk coefficient, cbr represents the frequency of the target open source component executing the target risk behavior, cor represents the development activity data of the target open source component; hy_suc represents the number of upgrades of the target open source component executing the version upgrade behavior within the set time period.

[0035] In one embodiment of the present application, the second risk factor is determined using the following formula:

[0036]

[0037] Among them, the represents the second risk factor, the ars represents the average risk value of the vulnerabilities involved in the target open source component, the cve represents the number of critical vulnerabilities involved in the current version of the target open source component; the vpe i The first parameter representing the remaining vulnerabilities i; the hy_cvc represents the number of new critical vulnerabilities added to the current version of the target open source component within a set period of time; the vc represents the number of vulnerabilities involved in the current version of the target open source component; the cvc represents the number of critical vulnerabilities involved in the current version of the target open source component.

[0038] In one embodiment of the present application, after determining the comprehensive risk value of the target open source component based on the development activity data and the first parameter of the remaining vulnerability, the method further includes:

[0039] Based on the comprehensive risk value, reinforcement reminder information is generated and sent to the relevant security reinforcement object of the target open source component.

[0040] In one embodiment of the present application, before acquiring the development activity data of each open source component, the method further includes:

[0041] Obtain configuration information of the project deployed in the production environment;

[0042] Based on the configuration information, determine a target scanning mode adapted to each open source component;

[0043] The corresponding open source component is scanned based on the adapted target scanning mode to obtain a scanning result of the open source component, wherein the scanning result is used to obtain the development activity data and the first parameter.

[0044] In one embodiment of the present application, the process of obtaining the scanning result of the open source component includes:

[0045] Starting a master node and a working node corresponding to the production environment, wherein the master node sends the configuration information to the working node;

[0046] The working node obtains a target scanning mode of each open source component included in the locally deployed project, and scans the open source component based on the target scanning mode to obtain a first scanning result of the open source component;

[0047] The master node receives the first scanning result of the open source component sent by the working node, and aggregates the first scanning results of the same open source component sent by different working nodes to obtain the scanning result of the open source component.

[0048] In one embodiment of the present application, the method further includes:

[0049] The device information is read from the configuration information, and based on the device information, the production environment is divided, and the master node and the working node are configured for different production environments.

[0050] The second aspect of the present application provides a risk identification device for open source components, including:

[0051] A first acquisition module is used to acquire development activity data of each open source component, wherein the open source component is a component included in a project deployed in a production environment;

[0052] A second acquisition module is used to acquire a first parameter of each vulnerability, where the first parameter is used to characterize a repair priority of the vulnerability;

[0053] A third acquisition module is used to acquire, for any target open source component among the open source components, a set of critical vulnerabilities involved in the current version of the target open source component, and determine the remaining vulnerabilities that do not belong to the set of critical vulnerabilities among all the vulnerabilities;

[0054] A fourth acquisition module is used to determine a comprehensive risk value of the target open source component based on the development activity data of the target open source component and the first parameter of the remaining vulnerability.

[0055] In one embodiment of the present application, the fourth acquisition module includes:

[0056] Determining a first risk factor of the target open source component based on the development activity data;

[0057] Determining a second risk factor of the target open source component based on the first parameter of the remaining vulnerability;

[0058] The comprehensive risk value is determined based on the first risk factor and the second risk factor.

[0059] In one embodiment of the present application, the fourth acquisition module includes:

[0060] Obtain risk behavior data of the target open source component;

[0061] A first risk factor of the target open source component is determined according to the risk behavior data and the development activity data.

[0062] In one embodiment of the present application, the fourth acquisition module includes:

[0063] Obtaining the frequency of occurrence of the target open source component executing the target risk behavior; and / or,

[0064] Obtain the number of times the target open source component performs version upgrade behavior within a set time period.

[0065] In one embodiment of the present application, the second acquisition module includes:

[0066] For any vulnerability, obtain the total number of unfixed vulnerabilities of all open source components involving the vulnerability;

[0067] Obtain the number of unfixed vulnerabilities for each open source component when it involves any of the above vulnerabilities;

[0068] For each open source component, based on the total number of unfixed vulnerabilities of any one vulnerability and the number of unfixed vulnerabilities when the open source component involves any one vulnerability, determine the unfixed vulnerability ratio of any one vulnerability corresponding to the open source component;

[0069] Based on the proportion of unfixed vulnerabilities of any vulnerability of each open source component, an entropy value of the proportion of any vulnerability is determined as a first parameter of any vulnerability.

[0070] In one embodiment of the present application, the fourth acquisition module includes:

[0071] Obtaining vulnerability distribution data of the target open source component;

[0072] Determining vulnerability-related parameters of the target open source component based on the vulnerability distribution data;

[0073] Based on the vulnerability-related parameters and the first parameters of the remaining vulnerabilities, a second risk coefficient of the target open source component is determined.

[0074] In one embodiment of the present application, the fourth acquisition module includes at least one of the following operations:

[0075] Based on the vulnerability distribution data, the number of occurrences of each vulnerability and the total number of vulnerabilities are obtained, and based on the number of occurrences of each vulnerability and the total number of vulnerabilities, the component risk entropy of the target open source component is determined;

[0076] Based on the vulnerability distribution data, obtain the number of vulnerabilities, the number of critical vulnerabilities, and the number of newly added critical vulnerabilities within a set period of time involved in the current version of the target open source component;

[0077] The vulnerability distribution data is obtained, the vulnerabilities involved in the target open source component are determined, and the average risk value of the involved vulnerabilities is obtained.

[0078] In one embodiment of the present application, the first risk coefficient is determined using the following formula:

[0079]

[0080] Among them, the represents the first risk coefficient, the cbr represents the frequency of the target open source component executing the target risk behavior, the cor represents the development activity data of the target open source component; and the hy_suc represents the number of upgrades of the target open source component executing the version upgrade behavior within a set time period.

[0081] In one embodiment of the present application, the second risk factor is determined using the following formula:

[0082]

[0083] Among them, the represents the second risk factor, the ars represents the average risk value of the vulnerabilities involved in the target open source component, the cve represents the number of critical vulnerabilities involved in the current version of the target open source component; the vpe iThe first parameter representing the remaining vulnerabilities i; the hy_cvc represents the number of new critical vulnerabilities added to the current version of the target open source component within a set period of time; the vc represents the number of vulnerabilities involved in the current version of the target open source component; the cvc represents the number of critical vulnerabilities involved in the current version of the target open source component.

[0084] In one embodiment of the present application, after the fourth acquisition module, the method further includes:

[0085] Based on the comprehensive risk value, reinforcement reminder information is generated and sent to the relevant security reinforcement object of the target open source component.

[0086] In one embodiment of the present application, the first acquisition module further includes:

[0087] Obtain configuration information of the project deployed in the production environment;

[0088] Based on the configuration information, determine a target scanning mode adapted to each open source component;

[0089] The corresponding open source component is scanned based on the adapted target scanning mode to obtain a scanning result of the open source component, wherein the scanning result is used to obtain the development activity data and the first parameter.

[0090] In one embodiment of the present application, the first acquisition module includes:

[0091] Starting a master node and a working node corresponding to the production environment, wherein the master node sends the configuration information to the working node;

[0092] The working node obtains a target scanning mode of each open source component included in the locally deployed project, and scans the open source component based on the target scanning mode to obtain a first scanning result of the open source component;

[0093] The master node receives the first scanning result of the open source component sent by the working node, and aggregates the first scanning results of the same open source component sent by different working nodes to obtain the scanning result of the open source component.

[0094] In one embodiment of the present application, the device further includes:

[0095] The device information is read from the configuration information, and based on the device information, the production environment is divided, and the master node and the working node are configured for different production environments.

[0096] The third aspect embodiment of the present application proposes an electronic device, comprising: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to execute the instructions to implement the risk identification method for open source components proposed in the first aspect embodiment of the present application.

[0097] The fourth aspect embodiment of the present application proposes a non-temporary computer-readable storage medium. When the instructions in the storage medium are executed by the processor of an electronic device, the electronic device can execute the method proposed in the first aspect embodiment of the present application.

[0098] The fifth aspect embodiment of the present application proposes a computer program product, including a computer program, which implements the method proposed in the first aspect embodiment of the present application when executed by a processor in a communication device.

[0099] The technical solution provided by the embodiments of the present application brings at least the following beneficial effects:

[0100] In an embodiment of the present application, development activity data of open source components is obtained to characterize the development activity status of open source components in a production environment; the first parameter of each vulnerability in the open source component is obtained, and the key vulnerability set and remaining vulnerabilities involved in any target open source component are obtained. Through the development activity data of the target open source component and the first parameter of the remaining vulnerabilities, combined with the development activity status and the repair priority, it is determined whether the risk value of the remaining vulnerabilities is serious, and then the comprehensive risk value of the target open source component is determined, the risk status of the target open source component is judged more accurately, and the security of the production environment is improved.

[0101] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0102] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0103] Figure 1 A schematic diagram of a process for identifying risks of open source components provided in an embodiment of the present application;

[0104] Figure 2 A flowchart of another method for identifying risks of open source components provided in an embodiment of the present application;

[0105] Figure 3 A flowchart of another method for identifying risks of open source components provided in an embodiment of the present application;

[0106] Figure 4A flowchart of another method for identifying risks of open source components provided in an embodiment of the present application;

[0107] Figure 5 A schematic diagram of the structure of a risk identification device for an open source component provided in an embodiment of the present application;

[0108] Figure 6 A schematic diagram of the structure of an electronic device provided according to an embodiment of the present application;

[0109] Figure 7 It is a schematic diagram of the structure of another electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION

[0110] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the embodiments of the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the embodiments of the present application as detailed in the appended claims.

[0111] The terms used in the embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit the embodiments of the present application. The singular forms of "a" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used herein refers to and includes any or all possible combinations of one or more associated listed items.

[0112] It should be understood that, although the terms first, second, third, etc. may be used to describe various information in the embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the embodiments of the present application, the first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information. Depending on the context, the words "if" and "if" as used herein may be interpreted as "at..." or "when..." or "in response to determination".

[0113] The embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.

[0114] It should be noted that the risk identification method for open source components provided in any embodiment of the present application can be executed alone, or in combination with possible implementation methods in other embodiments, or in combination with any technical solution in the relevant technology.

[0115] The following describes the risk identification method, device and electronic device of the open source component of the embodiment of the present application with reference to the accompanying drawings.

[0116] Figure 1 A flow chart of a risk identification method for an open source component provided in an embodiment of the present application. Figure 1 As shown, the method includes but is not limited to the following steps:

[0117] S101, obtaining development activity data of each open source component.

[0118] The open source components are the components included in the projects deployed in the production environment.

[0119] The production environment refers to the environment in which the Internet project system officially provides services to the outside world. The project system will first be developed and tested in the test environment, and finally deployed to the production environment to provide services to the outside world; for example, the environment in which the Linux server is deployed.

[0120] Open source, the full name of which is open source code, means that users use, edit and redistribute source code in accordance with the open source agreement; the advantage of open source components is that they can be assembled by users to achieve specific functions.

[0121] In some implementations, the development activity data of the open source component may be the development activity status of the open source component, such as whether the open source component has not had any development activity for a long time. If the open source component has not had any development activity for a long time, the possibility that the open source component has a risk is high, so the number of development activities of the open source component may be used as the development activity data of the corresponding open source component.

[0122] Optionally, development activities may include code modification, security hardening, or version updates.

[0123] Optionally, a time period can be set to count the number of development activities of the open source components within the time period. The more development activities of the open source components within the time period, the smaller the abandonment risk value of the open source components; the fewer development activities of the open source components within the time period, the greater the abandonment risk value of the open source components.

[0124] The development activity data of each open source component is used as the basis for the subsequent risk value assessment of the open source component, which more directly reflects the abandonment of the open source component.

[0125] S102, obtaining a first parameter for each vulnerability, where the first parameter is used to characterize a priority level for repairing the vulnerability.

[0126] In some implementations, a vulnerability refers to a vulnerability of an open source component, which may have one or more vulnerabilities, each with different severity.

[0127] Optionally, the first parameter may be the risk of the vulnerability, for example, the greater the risk of the vulnerability, the more timely the vulnerability needs to be repaired. Therefore, when the first parameter is the risk of the vulnerability, the greater the first parameter, the higher the priority of repairing the vulnerability.

[0128] Optionally, the first parameter may also be the frequency of occurrence of the vulnerability. In some implementations, the version of the existing component may temporarily not fix a vulnerability with a lower risk of harm, that is, when the vulnerability is more common, it may be a vulnerability that has not been specifically fixed, that is, the vulnerability is more common, so when the first parameter is the frequency of occurrence of the vulnerability, the higher the frequency of occurrence, the lower the priority of fixing the vulnerability.

[0129] It is understandable that the first parameter of each vulnerability can be determined, and the priority of repairing the vulnerability can be determined according to the first parameter of the vulnerability. When the priority of repairing the vulnerability of the first parameter is greater, it means that the current vulnerability is more serious, and the risk value of the open source component corresponding to the vulnerability is greater.

[0130] S103, for any target open source component among the open source components, obtain a set of critical vulnerabilities involved in the current version of the target open source component, and determine remaining vulnerabilities that do not belong to the set of critical vulnerabilities among all the vulnerabilities.

[0131] For any target open source component among all open source components, obtain the critical vulnerability set involved in the current version of the target open source component. Optionally, the critical vulnerability can be an unauthorized vulnerability, a code execution vulnerability, a command execution vulnerability, a file inclusion vulnerability, a deserialization vulnerability, an information leakage vulnerability, and all public vulnerabilities.

[0132] Determine all critical vulnerabilities involved in the current version of the target open source component to obtain a critical vulnerability set, and based on the critical vulnerability set, determine the remaining vulnerabilities that do not belong to the critical vulnerability set among all the vulnerabilities. The remaining vulnerabilities are also non-critical vulnerabilities. Evaluate the risk value of the remaining vulnerabilities to determine the risk value of the corresponding target open source component.

[0133] S104, determining a comprehensive risk value of the target open source component based on the development activity data of the target open source component and the first parameter of the remaining vulnerability.

[0134] Optionally, the first risk value can be determined based on the development activity data of the target open source component. The development data of the target open source component is, that is, the number of development activities of the target open source component within a fixed time period. For example, the smaller the number of development activities is, the larger the corresponding first risk value is, which is used to reflect the greater the risk value of the target open source component being abandoned. Correspondingly, the larger the number of development activities is, the smaller the first risk value of the corresponding target open source component is, which is used to reflect the smaller the risk value of the target open source component being abandoned.

[0135] Furthermore, the first parameter of the remaining vulnerability reflects the priority of repairing the remaining vulnerability. The greater the repair priority, the more the remaining vulnerability needs to be repaired in a timely manner, and the greater the risk value of the open source component corresponding to the remaining vulnerability may be. Optionally, since the target open source component may include multiple remaining vulnerabilities, the first parameters of all the remaining vulnerabilities in the target open source component may be accumulated to determine the second risk value, or the average value of the first parameters of all the remaining vulnerabilities may be calculated as the second risk value, and the second risk value may also be obtained by combining the first parameters of all the remaining vulnerabilities with other preset coefficients.

[0136] It is understandable that the first risk value determined by the development activity data of the target open source component and the second risk value determined by the first parameter corresponding to all remaining vulnerabilities can both characterize the risk situation corresponding to the target open source component. For example, the larger the first risk value and the second risk value are, the greater the risk of the corresponding target open source component. Therefore, the first risk value and the second risk value can be combined for analysis to determine the comprehensive risk value of the target open source component; for example, the average of the first risk value and the second risk value is calculated as the comprehensive risk value, or the maximum value of the first risk value and the second risk value is used as the comprehensive risk value, or the sum of the first risk value and the second risk value is used as the comprehensive risk value of the target open source component.

[0137] In an embodiment of the present application, development activity data of open source components is obtained to characterize the development activity status of open source components in a production environment; the first parameter of each vulnerability in the open source component is obtained, and the key vulnerability set and remaining vulnerabilities involved in any target open source component are obtained. Through the development activity data of the target open source component and the first parameter of the remaining vulnerabilities, combined with the development activity status and the repair priority, it is determined whether the risk value of the remaining vulnerabilities is serious, and then the comprehensive risk value of the target open source component is determined, the risk status of the target open source component is judged more accurately, and the security of the production environment is improved.

[0138] On the basis of the above-mentioned embodiment, the embodiment of the present application describes the process of determining the comprehensive risk value of the target open source component based on the development activity data of the target open source component and the first parameter of the remaining vulnerability, such as Figure 2 As shown, the method for determining the comprehensive risk value of the target open source component includes but is not limited to the following steps:

[0139] S201, determining a first risk factor of a target open source component based on development activity data.

[0140] Optionally, risk behavior data of the target open source component may be obtained; and a first risk coefficient of the target open source component may be determined based on the risk behavior data and the development activity data.

[0141] In some implementations, the frequency of the target open source component executing the target risk behavior can be obtained; and / or the number of upgrades of the target open source component executing the version upgrade behavior within a set period of time can be obtained. The risk behavior data is determined based on the frequency of occurrence and the number of upgrades.

[0142] In some implementations, the target risk behavior may be some sensitive or common vulnerability exploitation behaviors. When the target open source component is involved in the target risk behavior, the risk value of the target open source component will also increase.

[0143] Optionally, the target risk behavior may include one or more of file opening, file uploading, registration and login, serialization and deserialization, database operation, system command execution, etc. The frequency of occurrence of the target open source component executing the target risk behavior is the frequency of occurrence of the target open source component executing the above behavior.

[0144] In some implementations, if the target open source component provides a functional application programming interface (API) for one of the target risk behaviors, it means that the target open source component has a corresponding behavior. Optionally, a behavior vector can be set for the target open source component, and each element in the behavior vector is used to indicate whether the target open source component has a corresponding behavior. For example, the behavior vector is set to v = (v1, v2, v3, v4, v5, v6), where v1 to v6 are used to indicate whether the target open source component has file opening, file uploading, registration and login, serialization and deserialization, database operation, system command execution and other behaviors. If it exists, the element value can be set to 1; if it does not exist, the element value can be set to 0.

[0145] Furthermore, the first occurrence frequency of each target risk behavior executed by the target open source component can be obtained, that is, the frequency of each target risk behavior executed by the target open source component can be obtained, and the first occurrence frequency of each target risk behavior can be determined based on the frequency. Optionally, the behavior risk value can be determined based on the occurrence frequency of each target risk behavior and the value of each element in the corresponding behavior vector. The behavior risk value is the occurrence frequency of the target open source component executing the target risk behavior, which is used to reflect the risk value of the target open source component executing the target risk behavior.

[0146] Optionally, the behavior risk value may be calculated as:

[0147]

[0148] Among them, cbr represents the behavioral risk value of the target open source component, that is, the frequency of the target open source component executing the target risk behavior; a j represents the first occurrence frequency of the target open source component executing the target risk behavior j; v j represents the element value of the target risk behavior j in the behavior vector corresponding to the target open source component. In the embodiment of the present application, v j The value of is 0 or 1.

[0149] In some implementations, the number of times a target open source component performs version upgrades within a set period of time, that is, the number of times a target open source component performs version upgrades to fix security vulnerabilities within a set period of time, the more upgrades within the set period of time, the smaller the risk value of the target open source component.

[0150] Optionally, the set duration can be set to half a year, that is, the number of version upgrades of the target open source component to fix vulnerabilities in the past six months is obtained; it is understandable that if a version upgrade does not fix a security vulnerability, it will not be counted in the number of upgrades of the version upgrade behavior.

[0151] Furthermore, the frequency of occurrence of the target risk behavior executed by the target open source component and the number of upgrades of the target open source component within a set period of time are used as risk behavior data of the target open source component; and the first risk coefficient is determined based on the risk behavior data and the development activity data of the target open source component.

[0152] Optionally, the abandonment risk value of the target open source component can be determined according to the number of development activities of the target open source component, that is, the development activity data of the target open source component. The development activity data (abandonment risk value) is used to reflect whether the target open source component is abandoned. The number of development activities of the target open source component in one year can be counted with one year as a time period. The fewer the number of development activities, the greater the risk value of the target open source component being abandoned, that is, the greater the development activity data. The development activity data determined based on the number of development activities in one year can be:

[0153] cor=e -n / 12

[0154] Among them, cor represents the development activity data of the target open source component, that is, the abandonment risk value; n represents the number of development activities of the target open source component within a year; e is a natural constant.

[0155] Further, the first risk factor determined based on the development activity data, occurrence frequency, and upgrade times of the target open source component may be:

[0156]

[0157] in, represents the first risk coefficient, cbr represents the frequency of the target open source component executing the target risk behavior, cor represents the development activity data of the target open source component; hy_suc represents the number of times the target open source component executes the version upgrade behavior within the set time.

[0158] S202: Determine a second risk factor of the target open source component based on the first parameter of the remaining vulnerability.

[0159] Optionally, for any vulnerability, obtain the total number of unfixed vulnerabilities of all open source components when they involve any vulnerability; obtain the number of unfixed vulnerabilities of each open source component when it involves any vulnerability; for each open source component, determine the proportion of unfixed vulnerabilities of any vulnerability corresponding to the open source component based on the total number of unfixed vulnerabilities of any vulnerability and the number of unfixed vulnerabilities when the open source component involves any vulnerability; based on the proportion of unfixed vulnerabilities of any vulnerability of each open source component, determine the proportion entropy value of any vulnerability as the first parameter of any vulnerability.

[0160] It is understandable that not all vulnerabilities will be fixed in the existing component versions. For some vulnerabilities that are difficult to exploit and have low harmfulness, the open source components may not fix them for the time being. In other words, the more open source components there are when a vulnerability is not specifically fixed, the more common the vulnerability is, and the lower the urgency and risk of fixing it.

[0161] For any remaining vulnerability, obtain the total number of unfixed vulnerabilities when all open source components are involved in the remaining vulnerability. The greater the total number of unfixed vulnerabilities, the more common the remaining vulnerability is. Obtain the number of unfixed vulnerabilities when each open source component is involved in the remaining vulnerability. For the open source component, based on the total number of unfixed vulnerabilities of the remaining vulnerability and the number of unfixed vulnerabilities when the open source component is involved in the remaining vulnerability, determine the unfixed vulnerability ratio of the remaining vulnerability corresponding to the open source component. In other words, calculate the ratio of the number of unfixed vulnerabilities when the open source component is involved in the remaining vulnerability to the total number of unfixed vulnerabilities of the remaining vulnerability, as the unfixed vulnerability ratio of the remaining vulnerability corresponding to the open source component. Among them, p i represents the proportion of unfixed vulnerabilities among the remaining vulnerabilities i, h i represents the number of unfixed vulnerabilities of the remaining vulnerability i, and N represents the total number of unfixed vulnerabilities of the remaining vulnerability i.

[0162] Further, based on the proportion of fixed vulnerabilities of the remaining vulnerabilities of each open source component, the proportion entropy value of the remaining vulnerabilities is determined, and the calculation of the proportion entropy value can be:

[0163]

[0164] Among them, vpe i represents the entropy value of the remaining vulnerability i; p i represents the proportion of unfixed vulnerabilities among the remaining vulnerabilities i; I represents the number of all remaining vulnerabilities.

[0165] Based on the above calculation formula of the proportional entropy value, the proportional entropy value of any remaining vulnerability can be obtained, and the proportional entropy value can be used as the first parameter of the corresponding remaining vulnerability. The larger the value of the first parameter, the more universal the corresponding remaining vulnerability is, and the lower the corresponding repair priority can be.

[0166] Optionally, vulnerability distribution data of the target open source component may be obtained, and vulnerability-related parameters of the target open source component may be determined based on the vulnerability distribution data. The vulnerability distribution data is used to indicate the distribution of vulnerabilities in the target open source component.

[0167] In some implementations, the number of occurrences of each vulnerability and the total number of vulnerabilities can be obtained based on the vulnerability distribution data, and the component risk entropy of the target open source component can be determined based on the number of occurrences of each vulnerability and the total number of vulnerabilities.

[0168] Optionally, the component risk entropy of the target open source component may be:

[0169]

[0170] Where H represents the component risk entropy of the target open source component; p k It represents the frequency of occurrence of vulnerability k, which is obtained by the ratio of the number of occurrences to the total number of vulnerabilities; K represents the total number of vulnerabilities.

[0171] In some implementations, based on vulnerability distribution data, the number of vulnerabilities involved in the current version of the target open source component, the number of critical vulnerabilities, and the number of new critical vulnerabilities added within a set period of time can be obtained.

[0172] It is understandable that the impact of the vulnerabilities of the target open source component is closely related to the version. The new version will fix the old vulnerabilities. Therefore, when determining the number of vulnerabilities, only the number of vulnerabilities involved in the current version of the target open source component is obtained. The fewer the number of vulnerabilities involved in the current version, the smaller the risk value of the target open source component.

[0173] Optionally, the critical vulnerabilities may be unauthorized vulnerabilities, code execution vulnerabilities, command execution vulnerabilities, file inclusion vulnerabilities, deserialization vulnerabilities, information leakage vulnerabilities, and all publicly disclosed vulnerabilities, etc. The number of critical vulnerabilities in the target open source component is determined based on all the critical vulnerabilities. The greater the number of critical vulnerabilities, the greater the risk value of the target open source component.

[0174] Optionally, the set time period can be half a year, and the number of newly added critical vulnerabilities within half a year is counted as the number of newly added critical vulnerabilities of the target open source component. The greater the number of newly added critical vulnerabilities, the greater the risk value of the target open source component.

[0175] In some implementations, based on vulnerability distribution data, the vulnerabilities involved in the target open source component can be determined, and the average risk value of the involved vulnerabilities can be obtained.

[0176] In some implementations, the open source vulnerability community will score the vulnerability based on its impact, for example, scoring various vulnerabilities on a 10-point scale, and calculating the average value based on the scores of all vulnerabilities involved in the current version of the target open source component as the average risk value of the vulnerabilities involved in the target open source component. Among them, the open source vulnerability community refers to a public open source component community that provides version vulnerability information of open source components for free, including the name of the open source component, vulnerability information, the component version range affected by the vulnerability, and the vulnerability risk score. It is understandable that the greater the average risk value of the vulnerabilities involved in the target open source component, the greater the risk value of the target open source component.

[0177] Furthermore, based on the component risk entropy of the target open source component, the number of vulnerabilities involved in the current version, the number of critical vulnerabilities, the number of new critical vulnerabilities within a set period of time, the average risk value of the vulnerabilities involved, and the first parameter of the remaining vulnerabilities, the second risk coefficient of the target open source component is determined.

[0178] Optionally, the calculation of the second risk factor of the target open source component may be:

[0179]

[0180] in, represents the second risk factor, ars represents the average risk value of the vulnerabilities involved in the target open source component, cve represents the number of critical vulnerabilities involved in the current version of the target open source component; vpe i The first parameter represents the remaining vulnerabilities i; hy_cvc represents the number of new critical vulnerabilities in the current version of the target open source component within the set time period; vc represents the number of vulnerabilities involved in the current version of the target open source component; cvc represents the number of critical vulnerabilities involved in the current version of the target open source component.

[0181] S203: Determine a comprehensive risk value based on the first risk coefficient and the second risk coefficient.

[0182] After determining the first risk coefficient and the second risk coefficient of the target open source component, a comprehensive risk value of the target open source component is determined according to the first risk coefficient and the second risk coefficient.

[0183] Optionally, the calculation of the comprehensive risk value of the target open source component may be:

[0184]

[0185] in, Indicates the comprehensive risk value of the target open source component; Indicates the first risk factor of the target open source component; Indicates the second risk factor of the target open source component; represents the weight coefficient of the first risk factor; Represents the weight coefficient of the second risk factor.

[0186] It can be understood that when the values ​​of the first risk coefficient and the second risk coefficient are larger, the comprehensive risk value of the target open source component is larger, and the value range of the comprehensive risk value of the target open source component is [0,1].

[0187] Furthermore, after determining the comprehensive risk value of the target open source component, a reinforcement reminder message can be generated based on the comprehensive risk value and sent to the relevant security reinforcement objects of the target open source component. For example, the reinforcement reminder message is sent to the security reinforcement personnel of the target open source component. The security reinforcement personnel can determine the risk identification result of the target open source component based on the reinforcement reminder message, as well as the equipment and project information corresponding to the target open source component, and carry out security reinforcement work for the target open source component in the production environment.

[0188] In an embodiment of the present application, the frequency of occurrence and the number of upgrades of the target risk behavior performed by the target open source component are determined to determine the risk behavior data, and a first risk coefficient is determined based on the risk behavior data and the development activity data; a first parameter is determined according to the number of unfixed vulnerabilities in the target open source component, and a second risk coefficient is determined in combination with the vulnerability distribution data. The severity of the vulnerability in the target open source component and the comprehensive risk value of the target open source component are determined based on the first risk data related to the behavior and development situation of the target open source component and the second risk data related to the vulnerability distribution situation and the number of unfixed vulnerabilities. The analysis is performed from multiple aspects and multiple angles, and the comprehensive risk value is determined based on data from various aspects, so that the comprehensive risk value has a high accuracy. Feedback is provided to the security reinforcement object based on the comprehensive risk value, and unsafe factors in the production environment are discovered in a timely manner to ensure the smooth operation of the production environment.

[0189] Figure 3 A flow chart of another method for identifying risks of open source components provided in an embodiment of the present application. Figure 3As shown, the method includes but is not limited to the following steps:

[0190] S301, obtaining configuration information of a project deployed in a production environment.

[0191] In some implementations, the system configuration library stores configuration information required for normal operation of the system, and the configuration information of the project is read from the system configuration library.

[0192] Optionally, the configuration information of the project may include the project deployment path, project startup parameters, project directory, self-developed or open source project information, and production environment cluster information, etc. It is understandable that if the open source component is a self-developed component, the path is known; if the open source component is open source project information, that is, other open source components deployed locally, relevant information needs to be read from the system configuration library to analyze the security of the open source component.

[0193] S302: Determine a target scanning mode adapted to each open source component based on the configuration information.

[0194] Optionally, the target scanning mode may include one or more of a directory component scanning method, a jar file information enumeration method, a kernel scanning method, and a file opening scanning method.

[0195] In some implementations, if there is a static data link library lib directory under the project directory, a directory component scanning method is used to complete the open source component scanning.

[0196] After the JAVA project is released in the production environment, there is a lib directory under the project's deployment directory, which is specifically used to place the open source component jar packages referenced by the JAVA program when running. The names of these jar packages contain the full names and version information of the open source components. By scanning these directories, you can collect the names and version information of the open source components used by the program. Since the project directory is already in the configuration library, you only need to list the file names in the directory when executing, so this scanning method is extremely fast and has a very high scanning efficiency.

[0197] In some implementations, if there is no lib directory under the project directory, it is determined whether the project deployment is in the form of a java archive jar package based on the startup parameters. If the project deployment is in the form of a jar package, the jar file information enumeration method is used to complete the open source component scanning.

[0198] The JAVA project or open source project deployed in the production environment may be just an independent jar package. In this case, you need to use the jar-tf command, which is used to list all files in the jar package to extract the open source component information.

[0199] In some implementations, if there is no lib directory under the project directory and the project deployment is not in the form of a jar package, the project process number is obtained according to the startup parameters, and a mapping file (mapfiles file) is matched under the directory or process number directory (proc directory). If a map files file exists, the kernel scanning method is used to complete the open source component scan.

[0200] It is understandable that there is a / proc pseudo file system in Linux that stores the running information of processes, including the information of open source components used by the processes. By scanning the / proc directory of all processes, the open source component information can be obtained. This method combines the advantages of the directory component scanning method and the jar file information enumeration method, and can achieve efficient and comprehensive production environment open source component scanning.

[0201] In some implementations, the open source component scan may also be completed by using a file opening scanning method according to the project process number.

[0202] It is understandable that everything in Linux is a file, and all content exists in the form of files. The open source components used in the project also exist in the form of files. The Linux list open files command (lsof) can be used to obtain the file information opened by the process, that is, the name and version information of the open source component. By obtaining the file information opened by all system processes, it can be ensured that all service programs enabled in the production environment will be scanned, including some open source software services, not just self-developed projects. Since open source software itself also uses many open source components, if they are not scanned, it will cause unknown security risks in the existing network; the file opening scanning method can be used to effectively scan the open source components of all processes that have been started in the production environment, ensuring the comprehensiveness of the open source component scanning.

[0203] S303: Scan the corresponding open source component based on the adapted target scanning mode to obtain the scanning result of the open source component.

[0204] The scanning result is used to obtain development activity data and the first parameter.

[0205] In some implementations, for the directory component scanning method, the specific scanning steps of the method may be: (1) Obtain the deployment directory of the project production environment from the configuration library. (2) Obtain the deployment directory information of the project through the configuration library, and then use the Linux enumeration instruction (list, ls) instruction to recursively obtain the open source component file information under the deployment directory. (3) Parse all the obtained open source component file information to obtain the component name and version information.

[0206] In some implementations, for the jar file information enumeration method, the specific scanning steps of the method can be: (1) Obtain the deployment directory of the project production environment from the configuration library. (2) Obtain the project jar package information through the configuration library and list all the files in the jar package. (3) Parse the enumeration results. If there is a lib dependency directory, parse out the name and version of the open source component in the lib directory; if there is no lib directory, parse the dependent files such as the pom.xml file to obtain the name and version information of the open source component.

[0207] In some implementations, for the kernel scanning method, the specific scanning steps of the method can be: (1) Obtain all processes running on the production environment server through the Linux process status command (process status, ps), and then filter the process number of the target scan project according to the project path and startup parameters in the configuration library. (2) Scan the / proc directory of the corresponding process according to the process number to obtain the mapping information of the open source components enabled in the memory of the process. (3) Parse the mapping information of the open source components enabled in the memory of the obtained process to obtain the name and version information of the component.

[0208] In some implementations, for the file opening scanning method, the specific scanning steps of the method can be: (1) Obtain all processes running on the production environment server through the Linux ps command, and then filter the process number of the target scanning project according to the project path and startup parameters in the configuration library. (2) Based on the obtained process number, obtain all open source component information opened by the target scanning project process through the lsof command. (3) Parse all the obtained open source component information to obtain the component name and version information.

[0209] Furthermore, in order to ensure efficient and comprehensive component scanning in the production environment, we can implement efficient and comprehensive open source component scanning of large-scale clusters and nodes in the production environment based on big data resource scheduling and mapping convention MapReduce ideas.

[0210] Optionally, the device information can be read from the configuration information, and based on the device information, the production environment can be divided, and the master node and the working node can be configured for different production environments. In some implementations, the production environment can be divided into multiple grids according to the device ownership, and a master node and a job node can be set for each grid.

[0211] Optionally, the master node and working node corresponding to the production environment can be started, and the master node sends configuration information to the working node; the working node obtains the target scanning mode of each open source component included in the locally deployed project, and scans the open source components based on the target scanning mode to obtain the first scanning result of the open source component; the master node receives the first scanning result of the open source component sent by the working node, and summarizes the first scanning results of the same open source component sent by different working nodes to obtain the scanning result of the open source component.

[0212] That is to say, master nodes and working nodes are configured for different production environments, and the master nodes and working nodes corresponding to the production environments are started. The working nodes can obtain the target scanning mode of each open source component, and scan the open source component according to the target scanning mode to obtain the first scanning result; each working node sends the corresponding first scanning result to the master node, and the master node aggregates the first scanning result, and the aggregated result is also the scanning result of the open source component. Based on the scanning result, the development activity data and the first parameter of the open source component are obtained.

[0213] In an embodiment of the present application, before analyzing the comprehensive risk value of the target open source component, each target open source component is adaptively scanned to obtain a scanning result, and the development activity data and the first parameter are acquired based on the scanning result; different target scanning modes are adapted through the configuration information of each target open source component to obtain more accurate results, and each open source component is scanned based on the target scanning mode to obtain a first scanning result and summarize it, and the open source component scanning is completed efficiently and comprehensively according to different production environments, so as to determine the accurate scanning result of the open source component, thereby providing a more accurate basis for the subsequent analysis of the comprehensive risk value of the open source component.

[0214] Figure 4 A flow chart of another method for identifying risks of open source components provided in an embodiment of the present application. Figure 4 As shown, the method includes but is not limited to the following steps:

[0215] S401, obtaining configuration information of a project deployed in a production environment.

[0216] In the embodiment of the present application, the implementation method of step S401 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0217] S402: Determine a target scanning mode adapted to each open source component based on the configuration information.

[0218] In the embodiment of the present application, the implementation method of step S402 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0219] S403: Scan the corresponding open source component based on the adapted target scanning mode to obtain the scanning result of the open source component.

[0220] In the embodiment of the present application, the implementation method of step S403 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0221] S404, obtaining development activity data of each open source component.

[0222] Among them, open source components are components included in projects deployed in production environments.

[0223] In the embodiment of the present application, the implementation method of step S404 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0224] S405, obtaining a first parameter for each vulnerability, where the first parameter is used to characterize a priority level for repairing the vulnerability.

[0225] In the embodiment of the present application, the implementation method of step S405 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0226] S406, for any target open source component among the open source components, obtain a critical vulnerability set involved in the current version of the target open source component, and determine the remaining vulnerabilities that do not belong to the critical vulnerability set among all the vulnerabilities.

[0227] In the embodiment of the present application, the implementation method of step S406 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0228] S407: Determine a first risk factor of the target open source component based on the development activity data.

[0229] In the embodiment of the present application, the implementation method of step S407 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0230] S408: Determine a second risk factor of the target open source component based on the first parameter of the remaining vulnerability.

[0231] In the embodiment of the present application, the implementation method of step S408 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0232] S409: Determine a comprehensive risk value based on the first risk coefficient and the second risk coefficient.

[0233] In the embodiment of the present application, the implementation method of step S409 can be implemented by any of the methods in the embodiments of the present disclosure, which is not limited here and will not be repeated.

[0234] In an embodiment of the present application, an adaptive scanning mode is determined according to different production environments of the open source components to perform scanning, the scanning results of the open source components are determined efficiently and accurately, the development activity data and the first parameter are obtained based on the scanning results, and the risk behavior data of the target open source component is determined, and the first risk coefficient of the target open source component itself is obtained in combination with the development activity data; the first parameter is determined in combination with the proportion of unfixed vulnerabilities in the target open source component, and the second risk coefficient of the vulnerabilities in the target open source component is determined based on the vulnerability distribution and the first parameter; finally, the comprehensive risk value of the target open source component is determined based on the first risk coefficient and the second risk coefficient, and the identification of the comprehensive risk value is accurate and efficient, feedback is given based on the comprehensive risk value, unsafe factors in the production environment are discovered and fed back in a timely manner, without the need for human subjective judgment, thereby ensuring the smooth operation of the production environment.

[0235] Figure 5 This is a schematic diagram of the structure of the risk identification device of the open source component of the embodiment of the present application. Figure 5 As shown, the risk identification device 500 of the open source component includes:

[0236] A first acquisition module 501 is used to acquire development activity data of each open source component, wherein the open source component is a component included in a project deployed in a production environment;

[0237] A second acquisition module 502 is used to acquire a first parameter of each vulnerability, where the first parameter is used to characterize a priority of repairing the vulnerability;

[0238] The third acquisition module 503 is used to acquire, for any target open source component among the open source components, a set of critical vulnerabilities involved in the current version of the target open source component, and determine the remaining vulnerabilities that do not belong to the set of critical vulnerabilities among all the vulnerabilities;

[0239] The fourth acquisition module 504 is used to determine the comprehensive risk value of the target open source component based on the development activity data of the target open source component and the first parameter of the remaining vulnerability.

[0240] In some implementations, the fourth acquisition module 504 includes:

[0241] Based on the development activity data, determine the first risk factor of the target open source component;

[0242] Determining a second risk factor of the target open source component based on the first parameter of the remaining vulnerability;

[0243] Based on the first risk factor and the second risk factor, a comprehensive risk value is determined.

[0244] In some implementations, the fourth acquisition module 504 includes:

[0245] Obtain risk behavior data of target open source components;

[0246] Based on the risk behavior data and development activity data, determine the first risk factor of the target open source component.

[0247] In some implementations, the fourth acquisition module 504 includes:

[0248] Obtain the frequency of occurrence of the target open source component performing the target risk behavior; and / or,

[0249] Get the number of times the target open source component performs version upgrades within a set period of time.

[0250] In some implementations, the second acquisition module 502 includes:

[0251] For any vulnerability, obtain the total number of unfixed vulnerabilities in all open source components involving any vulnerability;

[0252] Get the number of unfixed vulnerabilities for each open source component when it involves any vulnerability;

[0253] For each open source component, determine the proportion of unfixed vulnerabilities corresponding to any vulnerability of the open source component based on the total number of unfixed vulnerabilities of any vulnerability and the number of unfixed vulnerabilities when the open source component involves any vulnerability;

[0254] Based on the proportion of unfixed vulnerabilities of any vulnerability of each open source component, the proportion entropy value of any vulnerability is determined as the first parameter of any vulnerability.

[0255] In some implementations, the fourth acquisition module 504 includes:

[0256] Obtain vulnerability distribution data of target open source components;

[0257] Determine vulnerability-related parameters of target open source components based on vulnerability distribution data;

[0258] Based on the vulnerability related parameters and the first parameters of the remaining vulnerabilities, a second risk factor of the target open source component is determined.

[0259] In some implementations, the fourth obtaining module 504 includes at least one of the following operations:

[0260] Based on the vulnerability distribution data, the number of occurrences of each vulnerability and the total number of vulnerabilities are obtained, and based on the number of occurrences of each vulnerability and the total number of vulnerabilities, the component risk entropy of the target open source component is determined;

[0261] Based on vulnerability distribution data, obtain the number of vulnerabilities involved in the current version of the target open source component, the number of critical vulnerabilities, and the number of newly added critical vulnerabilities within a set period of time;

[0262] Obtain vulnerability distribution data, identify the vulnerabilities involved in the target open source components, and obtain the average risk value of the involved vulnerabilities.

[0263] In some implementations, the first risk factor is determined using the following formula:

[0264]

[0265] in, represents the first risk coefficient, cbr represents the frequency of the target open source component executing the target risk behavior, cor represents the development activity data of the target open source component; hy_suc represents the number of times the target open source component executes the version upgrade behavior within the set time.

[0266] In some implementations, the second risk factor is determined using the following formula:

[0267]

[0268] in, represents the second risk factor, ars represents the average risk value of the vulnerabilities involved in the target open source component, cve represents the number of critical vulnerabilities involved in the current version of the target open source component; vpe i The first parameter represents the remaining vulnerabilities i; hy_cvc represents the number of new critical vulnerabilities in the current version of the target open source component within the set time period; vc represents the number of vulnerabilities involved in the current version of the target open source component; cvc represents the number of critical vulnerabilities involved in the current version of the target open source component.

[0269] In some implementations, after the fourth acquisition module 504, the method further includes:

[0270] Based on the comprehensive risk value, a reinforcement reminder message is generated and sent to the relevant security reinforcement objects of the target open source component.

[0271] In some implementations, the first acquisition module 501 further includes:

[0272] Get the configuration information of the project deployed in the production environment;

[0273] Based on the configuration information, determine the target scanning mode that is compatible with each open source component;

[0274] The corresponding open source component is scanned based on the adapted target scanning mode to obtain a scanning result of the open source component, wherein the scanning result is used to obtain the development activity data and the first parameter.

[0275] In some implementations, the first acquisition module 501 includes:

[0276] Start the master node and working node corresponding to the production environment, and the master node sends configuration information to the working node;

[0277] The working node obtains a target scanning mode of each open source component included in the locally deployed project, and scans the open source component based on the target scanning mode to obtain a first scanning result of the open source component;

[0278] The master node receives the first scanning result of the open source component sent by the working node, and aggregates the first scanning results of the same open source component sent by different working nodes to obtain the scanning result of the open source component.

[0279] In some implementations, the apparatus 500 further includes:

[0280] Read device information from the configuration information, divide the production environment based on the device information, and configure master nodes and working nodes for different production environments.

[0281] In an embodiment of the present application, development activity data of open source components is obtained to characterize the development activity status of open source components in a production environment; the first parameter of each vulnerability in the open source component is obtained, and the key vulnerability set and remaining vulnerabilities involved in any target open source component are obtained. Through the development activity data of the target open source component and the first parameter of the remaining vulnerabilities, combined with the development activity status and the repair priority, it is determined whether the risk value of the remaining vulnerabilities is serious, and then the comprehensive risk value of the target open source component is determined, the risk status of the target open source component is judged more accurately, and the security of the production environment is improved.

[0282] Figure 6 The present invention is a block diagram of an electronic device according to an exemplary embodiment. Figure 6 The electronic device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0283] like Figure 6As shown, the electronic device 600 includes a processor 601, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 602 or a program loaded from a memory 606 to a random access memory (RAM) 603. In the RAM 603, various programs and data required for the operation of the electronic device 600 are also stored. The processor 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input / output (I / O) interface 605 is also connected to the bus 604.

[0284] The following components are connected to the I / O interface 605: a memory 606 including a hard disk, etc.; and a communication part 607 including a network interface card such as a LAN (Local Area Network) card, a modem, etc., and the communication part 607 performs communication processing via a network such as the Internet; a drive 608 is also connected to the I / O interface 605 as needed.

[0285] In particular, according to an embodiment of the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present application includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 607. When the computer program is executed by the processor 601, the above-mentioned functions defined in the method of the present application are executed.

[0286] In an exemplary embodiment, a storage medium including instructions is also provided, such as a memory including instructions, and the instructions can be executed by the processor 601 of the electronic device 600 to complete the above method. Optionally, the storage medium can be a non-transitory computer-readable storage medium, for example, the non-transitory computer-readable storage medium can be a ROM, a random access memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, etc.

[0287] In the present application, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, apparatus, or device. In the present application, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in combination with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium may be transmitted using any suitable medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.

[0288] Figure 7 It is a structural block diagram of an electronic device according to an exemplary embodiment. Figure 7 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present application. Figure 7 As shown, the electronic device 700 includes a processor 701 and a memory 702. The memory 702 is used to store program codes, and the processor 701 is connected to the memory 702 to read the program codes from the memory 702 to implement the risk identification method of the open source component in the above embodiment.

[0289] Optionally, the number of processors 701 may be one or more.

[0290] Optionally, the electronic device may further include an interface 703, and the number of the interface 703 may be multiple. The interface 703 may be connected to an application program and may receive data from an external device such as a sensor.

[0291] Those skilled in the art will readily appreciate other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses or adaptations of the present invention that follow the general principles of the present invention and include common knowledge or customary techniques in the art that are not disclosed in this application. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present application are indicated by the following claims.

[0292] It should be understood that the present application is not limited to the precise structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present application is limited only by the appended claims.

Claims

1. A risk identification method for open source components, It is characterized in that The method comprises: Acquire development activity data of each open source component, wherein the open source component is a component included in a project deployed in a production environment, wherein the number of development activities based on the open source component is used as the development activity data of the corresponding open source component, and the number of development activities includes the number of code modifications, the number of security reinforcements, and the number of version updates; Obtaining a first parameter of each vulnerability, and determining a repair priority of the corresponding vulnerability according to the first parameter of each vulnerability, wherein the first parameter is used to characterize the repair priority of the vulnerability, and the first parameter is an entropy value of the vulnerability ratio or an occurrence frequency of the vulnerability. The greater the repair priority of the vulnerability, the greater the risk value of the open source component corresponding to the vulnerability; For any target open source component in each open source component, obtain the critical vulnerability set involved in the current version of the target open source component, and determine the remaining vulnerabilities that do not belong to the critical vulnerability set among all the vulnerabilities, wherein the critical vulnerabilities include unauthorized vulnerabilities, code execution vulnerabilities, command execution vulnerabilities, file inclusion vulnerabilities, deserialization vulnerabilities, information leakage vulnerabilities and all publicly disclosed vulnerabilities; Determining the comprehensive risk value of the target open source component based on the development activity data of the target open source component and the first parameter of the remaining vulnerability, including: determining a first risk coefficient of the target open source component based on the development activity data; determining a second risk coefficient of the target open source component based on the first parameter of the remaining vulnerability; determining the comprehensive risk value based on the first risk coefficient and the second risk coefficient; Obtain risk behavior data of the target open source component, and determine a first risk coefficient of the target open source component according to the risk behavior data and the development activity data; accumulate the first parameters of all the remaining vulnerabilities as the second risk coefficient of the target open source component, or calculate the average value of the first parameters of all the remaining vulnerabilities as the second risk coefficient of the target open source component, or calculate the first parameters of all the remaining vulnerabilities combined with a preset coefficient as the second risk coefficient of the target open source component; The average of the first risk coefficient and the second risk coefficient is determined as the comprehensive risk value of the target open source component, or the maximum value of the first risk coefficient and the second risk coefficient is determined as the comprehensive risk value of the target open source component, or the sum of the first risk coefficient and the second risk coefficient is determined as the comprehensive risk value of the target open source component.

2. The method according to claim 1, It is characterized in that The obtaining of risk behavior data of the target open source component includes: Obtaining the frequency of occurrence of the target open source component executing the target risk behavior; and / or, Obtain the number of times the target open source component performs version upgrade behavior within a set time period.

3. The method according to any one of claims 1 to 2, It is characterized in that The obtaining of the first parameter of each vulnerability includes: For any vulnerability, obtain the total number of unfixed vulnerabilities of all open source components involving the vulnerability; Obtain the number of unfixed vulnerabilities for each open source component when it involves any of the above vulnerabilities; For each open source component, based on the total number of unfixed vulnerabilities of the any vulnerability and the number of unfixed vulnerabilities when the open source component involves the any vulnerability, determine the unfixed vulnerability ratio of the any vulnerability corresponding to the open source component; Based on the proportion of unfixed vulnerabilities of any vulnerability of each open source component, an entropy value of the proportion of any vulnerability is determined as a first parameter of any vulnerability.

4. The method according to claim 1, It is characterized in that The determining, based on the first parameter of the remaining vulnerability, a second risk factor of the target open source component includes: Obtaining vulnerability distribution data of the target open source component; Determining vulnerability-related parameters of the target open source component based on the vulnerability distribution data; Based on the vulnerability-related parameters and the first parameters of the remaining vulnerabilities, a second risk coefficient of the target open source component is determined.

5. The method according to claim 4, It is characterized in that The determining, based on the vulnerability distribution data, vulnerability-related parameters of the target open source component includes at least one of the following operations: Based on the vulnerability distribution data, the number of occurrences of each vulnerability and the total number of vulnerabilities are obtained, and based on the number of occurrences of each vulnerability and the total number of vulnerabilities, the component risk entropy of the target open source component is determined; Based on the vulnerability distribution data, obtain the number of vulnerabilities, the number of critical vulnerabilities, and the number of newly added critical vulnerabilities within a set period of time involved in the current version of the target open source component; The vulnerability distribution data is obtained, the vulnerabilities involved in the target open source component are determined, and the average risk value of the involved vulnerabilities is obtained.

6. The method according to claim 3, It is characterized in that The first risk factor is determined using the following formula: Among them, the represents the first risk coefficient, the cbr represents the frequency of the target open source component executing the target risk behavior, the cor represents the development activity data of the target open source component; and the hy_suc represents the number of upgrades of the target open source component executing the version upgrade behavior within a set time period.

7. The method according to claim 5, It is characterized in that The second risk factor is determined using the following formula: Among them, the represents the second risk factor, the ars represents the average risk value of the vulnerabilities involved in the target open source component, the cve represents the number of critical vulnerabilities involved in the current version of the target open source component; the vpe i The first parameter representing the remaining vulnerabilities i; the hy_cvc represents the number of new critical vulnerabilities added to the current version of the target open source component within a set period of time; the vc represents the number of vulnerabilities involved in the current version of the target open source component; the cvc represents the number of critical vulnerabilities involved in the current version of the target open source component.

8. The method according to claim 1, It is characterized in that After determining the comprehensive risk value of the target open source component based on the development activity data and the first parameter of the remaining vulnerability, the method further includes: Based on the comprehensive risk value, reinforcement reminder information is generated and sent to the relevant security reinforcement object of the target open source component.

9. The method according to any one of claims 1-2 or 4 or 5, It is characterized in that Before obtaining the development activity data of each open source component, the process further includes: Obtain configuration information of the project deployed in the production environment; Based on the configuration information, determine a target scanning mode adapted to each open source component; The corresponding open source component is scanned based on the adapted target scanning mode to obtain a scanning result of the open source component, wherein the scanning result is used to obtain the development activity data and the first parameter.

10. The method according to claim 9, It is characterized in that The process of obtaining the scanning result of the open source component includes: Starting a master node and a working node corresponding to the production environment, wherein the master node sends the configuration information to the working node; The working node obtains a target scanning mode of each open source component included in the locally deployed project, and scans the open source component based on the target scanning mode to obtain a first scanning result of the open source component; The master node receives the first scanning result of the open source component sent by the working node, and aggregates the first scanning results of the same open source component sent by different working nodes to obtain the scanning result of the open source component.

11. The method according to claim 10, It is characterized in that The method further comprises: The device information is read from the configuration information, and based on the device information, the production environment is divided, and the master node and the working node are configured for different production environments.

12. A risk identification device for open source components, It is characterized in that include: A first acquisition module is used to acquire development activity data of each open source component, wherein the open source component is a component included in a project deployed in a production environment, wherein the number of development activities based on the open source component is used as the development activity data of the corresponding open source component, and the number of development activities includes the number of code modifications, the number of security reinforcements, and the number of version updates; A second acquisition module is used to acquire a first parameter of each vulnerability, and determine a repair priority of the corresponding vulnerability according to the first parameter of each vulnerability, wherein the first parameter is used to characterize the repair priority of the vulnerability, and the first parameter is an entropy value of the vulnerability ratio or an occurrence frequency of the vulnerability. The greater the repair priority of the vulnerability, the greater the risk value of the open source component corresponding to the vulnerability; The third acquisition module is used to obtain, for any target open source component in each open source component, a set of critical vulnerabilities involved in the current version of the target open source component, and determine the remaining vulnerabilities that do not belong to the set of critical vulnerabilities among all the vulnerabilities, wherein the critical vulnerabilities include unauthorized vulnerabilities, code execution vulnerabilities, command execution vulnerabilities, file inclusion vulnerabilities, deserialization vulnerabilities, information leakage vulnerabilities and all publicly disclosed vulnerabilities; A fourth acquisition module, configured to determine a comprehensive risk value of the target open source component based on the development activity data of the target open source component and the first parameter of the remaining vulnerability, comprising: determining a first risk coefficient of the target open source component based on the development activity data; determining a second risk coefficient of the target open source component based on the first parameter of the remaining vulnerability; and determining the comprehensive risk value based on the first risk coefficient and the second risk coefficient; Obtain risk behavior data of the target open source component, and determine a first risk coefficient of the target open source component according to the risk behavior data and the development activity data; accumulate the first parameters of all the remaining vulnerabilities as the second risk coefficient of the target open source component, or calculate the average value of the first parameters of all the remaining vulnerabilities as the second risk coefficient of the target open source component, or calculate the first parameters of all the remaining vulnerabilities combined with a preset coefficient as the second risk coefficient of the target open source component; The average of the first risk coefficient and the second risk coefficient is determined as the comprehensive risk value of the target open source component, or the maximum value of the first risk coefficient and the second risk coefficient is determined as the comprehensive risk value of the target open source component, or the sum of the first risk coefficient and the second risk coefficient is determined as the comprehensive risk value of the target open source component.

13. The device according to claim 12, It is characterized in that The fourth acquisition module includes: Obtaining the frequency of occurrence of the target open source component executing the target risk behavior; and / or, Obtain the number of times the target open source component performs version upgrade behavior within a set time period.

14. The device according to any one of claims 12 to 13, It is characterized in that The second acquisition module includes: For any vulnerability, obtain the total number of unfixed vulnerabilities of all open source components involving the vulnerability; Obtain the number of unfixed vulnerabilities for each open source component when it involves any of the above vulnerabilities; For each open source component, based on the total number of unfixed vulnerabilities of the any vulnerability and the number of unfixed vulnerabilities when the open source component involves the any vulnerability, determine the unfixed vulnerability ratio of the any vulnerability corresponding to the open source component; Based on the proportion of unfixed vulnerabilities of any vulnerability of each open source component, an entropy value of the proportion of any vulnerability is determined as a first parameter of any vulnerability.

15. The device according to claim 12, It is characterized in that The fourth acquisition module includes: Obtaining vulnerability distribution data of the target open source component; Determining vulnerability-related parameters of the target open source component based on the vulnerability distribution data; Based on the vulnerability-related parameters and the first parameters of the remaining vulnerabilities, a second risk coefficient of the target open source component is determined.

16. The device according to claim 15, It is characterized in that The fourth acquisition module includes at least one of the following operations: Based on the vulnerability distribution data, the number of occurrences of each vulnerability and the total number of vulnerabilities are obtained, and based on the number of occurrences of each vulnerability and the total number of vulnerabilities, the component risk entropy of the target open source component is determined; Based on the vulnerability distribution data, obtain the number of vulnerabilities, the number of critical vulnerabilities, and the number of newly added critical vulnerabilities within a set period of time involved in the current version of the target open source component; The vulnerability distribution data is obtained, the vulnerabilities involved in the target open source component are determined, and the average risk value of the involved vulnerabilities is obtained.

17. The device according to claim 14, It is characterized in that The first risk factor is determined using the following formula: Among them, the represents the first risk coefficient, the cbr represents the frequency of the target open source component executing the target risk behavior, the cor represents the development activity data of the target open source component; and the hy_suc represents the number of upgrades of the target open source component executing the version upgrade behavior within a set time period.

18. The device according to claim 16, It is characterized in that The second risk factor is determined using the following formula: Among them, the represents the second risk factor, the ars represents the average risk value of the vulnerabilities involved in the target open source component, the cve represents the number of critical vulnerabilities involved in the current version of the target open source component; the vpe i The first parameter representing the remaining vulnerabilities i; the hy_cvc represents the number of new critical vulnerabilities added to the current version of the target open source component within a set period of time; the vc represents the number of vulnerabilities involved in the current version of the target open source component; the cvc represents the number of critical vulnerabilities involved in the current version of the target open source component.

19. The device according to claim 12, It is characterized in that After the fourth acquisition module, it also includes: Based on the comprehensive risk value, reinforcement reminder information is generated and sent to the relevant security reinforcement object of the target open source component.

20. The device according to any one of claims 12-13 or 15 or 16, It is characterized in that The first acquisition module further includes: Obtain configuration information of the project deployed in the production environment; Based on the configuration information, determine a target scanning mode adapted to each open source component; The corresponding open source component is scanned based on the adapted target scanning mode to obtain a scanning result of the open source component, wherein the scanning result is used to obtain the development activity data and the first parameter.

21. The device according to claim 20, It is characterized in that The first acquisition module includes: Starting a master node and a working node corresponding to the production environment, wherein the master node sends the configuration information to the working node; The working node obtains a target scanning mode of each open source component included in the locally deployed project, and scans the open source component based on the target scanning mode to obtain a first scanning result of the open source component; The master node receives the first scanning result of the open source component sent by the working node, and aggregates the first scanning results of the same open source component sent by different working nodes to obtain the scanning result of the open source component.

22. The device according to claim 21, It is characterized in that The device also includes: The device information is read from the configuration information, and based on the device information, the production environment is divided, and the master node and the working node are configured for different production environments.

23. An electronic device, It is characterized in that include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the method according to any one of claims 1 to 11.

24. A non-transitory computer-readable storage medium, It is characterized in that When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the method as claimed in any one of claims 1 to 11.

25. A computer program product, It is characterized in that The invention comprises a computer program, which implements the method according to any one of claims 1 to 11 when being executed by a processor.

Citation Information

Patent Citations

  • Risk assessment method and apparatus for software system vulnerability

    CN105046155A

  • Vulnerability detection method and device for open source component

    CN113177001A

  • Method for determining version of open source component, storage medium and electronic device

    CN113778509A

  • Vulnerability repairing method and device, electronic equipment and computer readable storage medium

    CN115982713A

  • Method, device and equipment for determining risk control scheme for open source component

    CN116028940A