Security risk management and control method and device for open source code, electronic equipment and medium
By scoring various evaluation dimension information of open source code and calculating the total score, the difficulties in open source code risk assessment and management in software products are solved, and the accurate assessment and effective control of risks are achieved.
Patent Information
- Application Number
- CN202411079547.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-11-12
AI Technical Summary
The security risks brought about by introducing open source code into software products are difficult to accurately evaluate and manage, resulting in difficulty in risk control.
By identifying open source code, the scores of its various evaluation dimension information are determined, including source information, security quality information, intellectual property information and management information, and the total score is calculated to facilitate the evaluation and formulation of risk control strategies.
It realizes an accurate assessment of open source code risks, provides strategies that facilitate risk management of software products, and ensures the security of software products.
Smart Images

Figure CN118940279A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of software maintenance and management, and for example, to a method, device, electronic device, and medium for security risk management of open source code. Background Art
[0002] Open source code is often used in the development of software products. Open source code is the source code of computer software that is publicly accessible, allowing anyone to view, modify, and distribute it. This practice encourages technology sharing, collaborative development, and continuous software improvement. However, the use of open source code in software products can also pose risks. Accurately assessing and managing the risks associated with the inclusion of open source code in software products has become a pressing issue.
[0003] It should be noted that the information disclosed in the above background technology section is only used to enhance the understanding of the background of the present disclosure, and therefore may include information that does not constitute prior art known to ordinary technicians in the field. Summary of the Invention
[0004] In order to provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. The summary is not an extensive review, nor is it intended to identify key / critical elements or delineate the scope of protection of these embodiments, but rather serves as a prelude to the detailed description that follows.
[0005] The embodiments of the present disclosure provide a method, apparatus, electronic device, and medium for managing the security risks of open source code, which can accurately assess the risks brought about by the introduction of open source code into software products.
[0006] According to a first aspect of the present disclosure, a method for security risk management of open source code is provided, the risk management method comprising: Identify open source code in software products; Determine a score for each evaluation dimension of the open source code, where the types of evaluation dimension information include open source code source information, and / or open source code security and quality information, and / or open source code intellectual property information, and / or open source code management information; Based on the score of each evaluation dimension information of the open source code, the overall score of the open source code is determined.
[0007] In some embodiments, each evaluation dimension information includes sub-dimension information, and determining the score of each evaluation dimension information of the open source code includes: Determine each sub-dimension information of each evaluation dimension information of the open source code; Determine the score of each sub-dimension information of each evaluation dimension information; Based on the scores of each sub-dimension information of each evaluation dimension information, the scores of each evaluation dimension information of the open source code are counted.
[0008] In some embodiments, when the evaluation dimension information is open source code source information, determining the score of each sub-dimension information of each evaluation dimension information includes: Determine the coding language of the open source code, and based on the proportion of mainstream programming languages in the coding language of the open source code, determine the score of the open source code in the coding language dimension; and / or, determining the copyright owner of the open source code, and determining a score for the open source code in the copyright owner dimension based on information on the proportion of the open source code's copyright owners being from designated countries; and / or, determining code contribution information of the open source code in a specified country, and determining a score of the open source code in a code contribution dimension based on the code contribution information; and / or, determining the percentage of alternative code in a given country for open source code, and determining a score for the open source code on the code richness dimension based on the percentage of alternative code; and / or, determining the implementation of the open source community security management standards for the open source code, and determining the community security score of the open source code based on the percentage of open source communities to which the open source code belongs that meet the security management standards; and / or, determining the country of the hosting platform of the open source code, and determining a score for the hosting platform dimension based on the proportion of the open source code hosting platforms belonging to the designated country; And / or, determine the country to which the open source code download platform belongs, and determine the score of the open source code in the download platform dimension based on the proportion of the open source code download platforms belonging to the specified country.
[0009] In some embodiments, when the evaluation dimension information is open source code security quality information, determining the score of each sub-dimension information of each evaluation dimension information includes: Based on the open source vulnerability data in the open source code security quality information, the open source vulnerability evaluation parameters of each sub-dimensional information are calculated, where the sub-dimensional information includes the open source vulnerability rate, and / or the open source vulnerability severity, and / or the open source vulnerability impact, and / or the open source vulnerability complexity, and / or the open source vulnerability repair rate; Based on the open source vulnerability evaluation parameters of each sub-dimensional information, the score of each sub-dimensional information is determined.
[0010] In some embodiments, when the evaluation dimension information is open source code security quality information, determining the score of each sub-dimension information of each evaluation dimension information includes: Based on the code version update information in the open source code security and quality information, determine the release time of the current version of the open source code and the release time of the latest version of the open source code; The score of the open source code in the version update dimension is determined based on the release time of the current version of the open source code and the release time of the latest version of the open source code.
[0011] In some embodiments, when the evaluation dimension information is open source code intellectual property information, determining the score of each sub-dimension information of each evaluation dimension information includes: Based on the open source license content in the open source code security quality information, the score of each sub-dimension information is determined, wherein the sub-dimension information includes open source license compliance, and / or open source license standardization, and / or open source license reciprocity, and / or open source license compatibility, and / or open source license patent data, and / or open source license scope of application.
[0012] In some embodiments, when the evaluation dimension information is open source code management information, determining the score of each sub-dimension information of each evaluation dimension information includes: Determine the score of the management team dimension based on the team status of the code management team of the open source code; and / or, determining a score for a bill of materials dimension based on the completeness of the code bill of materials for the open source code; and / or, determining a score for a code design dimension based on the compatibility status of the open source code; And / or, based on the security check of the open source code and the security scanning policy configuration status, determine the score of the code generation dimension.
[0013] According to a second aspect of the present disclosure, a security risk management device for open source code is provided, the risk management device comprising: an open source code identification module configured to identify open source code in a software product; A first score determination module is configured to determine a score for each evaluation dimension information of the open source code, where the type of evaluation dimension information includes open source code source information, and / or open source code security and quality information, and / or open source code intellectual property information, and / or open source code management information; The second score determination module is configured to determine the total score of the open source code based on the score of each evaluation dimension information of the open source code.
[0014] According to a third aspect of the present disclosure, an electronic device is provided, comprising a processor and a memory storing program instructions, wherein the processor is configured to execute the open source code security risk management method provided by the first aspect of the present disclosure when running the program instructions.
[0015] According to a fourth aspect of the present disclosure, a storage medium is provided, in which computer program instructions are stored. When the computer program instructions are executed by a processor, the open source code security risk management method provided by the first aspect of the present disclosure is executed.
[0016] The open source code security risk management method, device, electronic device, and medium provided by the embodiments of the present disclosure can achieve the following technical effects: The open source code security risk management method provided by the disclosed embodiments can obtain evaluation dimension information related to the open source code and calculate a score for each evaluation dimension. The score for each evaluation dimension can represent the risk of the open source code in that evaluation dimension. Based on this, an overall score can be obtained based on the score for each evaluation dimension of the open source code. The overall score can represent the risk of the open source code across all evaluation dimensions. This can accurately assess the risks brought about by the introduction of open source code into a software product, facilitating the determination of a risk management strategy appropriate for the current risk situation of the software product.
[0017] The foregoing general description and the following description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] One or more embodiments are exemplarily described by corresponding drawings. These exemplary descriptions and drawings do not limit the embodiments. Elements with the same reference numerals in the drawings are shown as similar elements. The drawings do not constitute a scale limitation. In addition, Figure 1 This is a flow chart of a method for managing and controlling security risks of open source code provided by an embodiment of the present disclosure; Figure 2 This is a flowchart of another open source code security risk management method provided by an embodiment of the present disclosure; Figure 3 This is a flowchart of another open source code security risk management method provided by an embodiment of the present disclosure; Figure 4 This is a flowchart of another open source code security risk management method provided by an embodiment of the present disclosure; Figure 5 This is a schematic diagram of the structure of a security risk management device for open source code provided by an embodiment of the present disclosure; Figure 6 It is a structural diagram of an electronic device provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0019] In order to be able to understand the features and technical content of the embodiments of the present disclosure in more detail, the implementation of the embodiments of the present disclosure is described in detail below in conjunction with the accompanying drawings. The accompanying drawings are for reference only and are not used to limit the embodiments of the present disclosure. In the following technical description, for the sake of convenience of explanation, a full understanding of the disclosed embodiments is provided through multiple details. However, one or more embodiments can still be implemented without these details. In other cases, to simplify the drawings, well-known structures and devices can be simplified for display.
[0020] In the description and claims of the embodiments of the present disclosure, as well as in the accompanying drawings, the terms "first," "second," and the like are used to distinguish similar items and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate to describe the embodiments of the present disclosure herein. In addition, the terms "including," "having," and any variations thereof are intended to cover non-exclusive inclusions.
[0021] Unless otherwise stated, the term "plurality" means two or more.
[0022] In the embodiment of the present disclosure, the character " / " indicates that the preceding and following objects are in an "or" relationship. For example, A / B means: A or B.
[0023] The term "and / or" describes an association between objects, indicating that three relationships can exist. For example, A and / or B means: A or B, or A and B.
[0024] The term "correspondence" may refer to an association relationship or a binding relationship. The correspondence between A and B means that there is an association relationship or a binding relationship between A and B.
[0025] The present disclosure provides an electronic device, which is a device with computing capabilities, such as a personal computer, a server, or a network device. The electronic device can be used to execute the open source code security risk management method provided in the present disclosure.
[0026] In conjunction with the electronic device provided by the embodiment of the present disclosure, the embodiment of the present disclosure provides a security risk management method for open source code, Figure 1 As shown, risk management methods include: S101: The electronic device recognizes open source code in a software product.
[0027] S102: The electronic device determines a score for each evaluation dimension of the open source code.
[0028] In an embodiment of the present disclosure, a website related to open source code can be searched, and evaluation dimension information corresponding to the open source code can be obtained from the corresponding website. Software project documents can be obtained, and evaluation dimension information corresponding to the open source code can be read from the software project documents. After obtaining the evaluation dimension information of the open source code, a score for the evaluation dimension information can be calculated according to a preset score calculation method. Types of evaluation dimension information include open source code source information, and / or open source code security and quality information, and / or open source code intellectual property information, and / or open source code management information.
[0029] S103 , the electronic device determines a total score of the open source code based on the score of each evaluation dimension information of the open source code.
[0030] The open source code security risk management method provided by the disclosed embodiments can obtain evaluation dimension information related to the open source code and calculate a score for each evaluation dimension. The score for each evaluation dimension can represent the risk of the open source code in that evaluation dimension. Based on this, an overall score can be obtained based on the score for each evaluation dimension of the open source code. The overall score can represent the risk of the open source code across all evaluation dimensions. This can accurately assess the risks brought about by the introduction of open source code into a software product, facilitating the determination of a risk management strategy appropriate for the current risk situation of the software product.
[0031] In some embodiments, each evaluation dimension information includes sub-dimension information, and determining the score of each evaluation dimension information of the open source code includes: determining each sub-dimension information of each evaluation dimension information of the open source code; determining the score of each sub-dimension information of each evaluation dimension information; and based on the score of each sub-dimension information of each evaluation dimension information, calculating the score of each evaluation dimension information of the open source code.
[0032] Combine Figure 2 As shown, the embodiment of the present disclosure provides another open source code security risk management method, which includes: S201: The electronic device recognizes open source code in a software product.
[0033] S202: The electronic device determines each sub-dimensional information of each evaluation dimension information of the open source code.
[0034] S203: The electronic device determines the score of each sub-dimension information of each evaluation dimension information.
[0035] S204 , the electronic device calculates the score of each evaluation dimension information of the open source code based on the score of each sub-dimension information of each evaluation dimension information.
[0036] In the embodiment of the present disclosure, the sum of the scores of each sub-dimensional information of each evaluation dimension information may be used as the score of each evaluation dimension information.
[0037] S205 , the electronic device determines a total score of the open source code based on the score of each evaluation dimension information of the open source code.
[0038] In some embodiments, when the evaluation dimension information is open source code source information, the score of each sub-dimensional information of each evaluation dimension information is determined, including: determining the coding language of the open source code, and based on the proportion information of mainstream programming languages in the coding language of the open source code, determining the score of the open source code in the coding language dimension.
[0039] In the embodiment of the present disclosure, the coding language used by the open source code is obtained through the sca tool or by searching in open source code repositories such as Github / Gitee. Then, based on the proportion of mainstream programming languages in the coding languages of the open source code, the score of the open source code in the coding language dimension is determined.
[0040] Alternatively, if open source code is uniformly registered with a programming language and the proportion of mainstream programming languages used is greater than or equal to 80%, the open source code's score in the coding language dimension can be determined to be 4 points. For every 10% decrease in the proportion of mainstream programming languages used, the open source code's score in the coding language dimension will be reduced by 1 point, with the lowest score for the open source code in the coding language dimension being 0.
[0041] Optionally, if the open source code programming language used is a domestic programming language, an additional point can be added to the score of the open source code in the coding language dimension.
[0042] In the embodiments of the present disclosure, mainstream programming languages include but are not limited to Java, JavaScript, Go, PHP, Python, Scala, C, C++, C#, ruby, rust, css, Objective-C, and html.
[0043] In some embodiments, when the evaluation dimension information is open source code source information, the score of each sub-dimensional information of each evaluation dimension information is determined, including: determining the copyright owner of the open source code, and determining the score of the open source code in the copyright owner dimension based on the proportion of the country where the copyright owner of the open source code belongs to a designated country.
[0044] In an embodiment of the present disclosure, the copyright owner and the country of origin of the open source code are queried on platforms such as GitHub, and then the score of the open source code in the copyright owner dimension is determined based on the proportion of the copyright owner of the open source code in a specified country.
[0045] Alternatively, if 80% or more of the copyright holders of the open source code used in a software product are from designated countries (e.g., China), the open source code's copyright holder score in the copyright dimension is determined to be 6. For every 10% decrease in the proportion of the copyright holders of the open source code used in the software product from designated countries (e.g., China), the open source code's copyright holder score in the copyright dimension is deducted by 1, with the lowest open source code score in the copyright dimension being 0.
[0046] In some embodiments, when the evaluation dimension information is open source code source information, the score of each sub-dimensional information of each evaluation dimension information is determined, including: determining the code contribution information of the open source code in a specified country, and determining the score of the open source code in the code contribution dimension based on the code contribution information.
[0047] In an embodiment of the present disclosure, information such as the countries of origin of open source code contributors and the contribution amount of each contributor is searched in open source code repositories such as Github and Gitee, and the proportion of contributors from a specified country (such as China) and the corresponding proportion of contributions from the specified country (such as China) are counted.
[0048] Optionally, if 80% or more of the open source code used in a software product has code contributions from a designated country (e.g., China) and the average proportion of contributors from the designated country (e.g., China) exceeds 50%, the open source code will be assigned a score of 6 in the Code Contribution dimension. For every 10% decrease in the proportion of code contributions from a designated country (e.g., China) and the average proportion of contributors from the designated country (e.g., China) used in the open source code used in the software product, the open source code's score in the Code Contribution dimension will be reduced by 1. If the proportion requirements cannot be met simultaneously, the lowest proportion of the two will be used as the score, with the lowest score for the open source code in the Code Contribution dimension being 0.
[0049] In some embodiments, when the evaluation dimension information is open source code source information, the score of each sub-dimension information of each evaluation dimension information is determined, including: determining the proportion of alternative codes of the open source code in a specified country, and determining the score of the open source code in the code richness dimension based on the proportion of alternative codes.
[0050] Alternatively, if the proportion of alternative code in a specified country (e.g., China) is 0, the open source code's score for code richness is determined to be 0. For every 10% increase in the proportion of alternative code in a specified country (e.g., China) used by the software product, the open source code's score for code richness is increased by 1 point, for a maximum score of 6 points.
[0051] In some embodiments, when the evaluation dimension information is open source code source information, the scores of each sub-dimensional information of each evaluation dimension information are determined, including: determining the implementation of the open source community security management specifications of the open source code, and determining the score of the open source code in the community security dimension based on the proportion of qualified security management specifications of the open source community to which the open source code belongs.
[0052] In the disclosed embodiments, you can search for tags such as Fuzzing and Security test in the Action tag of open source code in open source code repositories such as Github, and search for security policies in the tags. In open source code repositories such as Github, you can search for electronic signatures, hash values, and other materials proving uniqueness in the open source code. You can also search for signed CLAs (Contributor License Agreements) and code reviews by developers in each entry under the PullRequests tag. Based on the above search results, you can determine the implementation of open source community security management specifications for the open source code.
[0053] Optionally, if the open source community formed by the open source code used in the software product does not conduct security scans or implement code release security mechanisms for official version releases, the open source code's score in the community security dimension is determined to be 0. For every 10% increase in the proportion of open source communities formed by the open source code used in the software product that conduct security scans and implement code release security mechanisms for official version releases, the open source code's score in the community security dimension will increase by 1. If the open source code used in the software product cannot meet the proportion requirements at the same time, the lowest proportion of the two will be used for scoring, and the maximum score for the open source code in the community security dimension is 6 points.
[0054] In some embodiments, when the evaluation dimension information is open source code source information, the scores of each sub-dimensional information of each evaluation dimension information are determined, including: determining the country to which the hosting platform of the open source code belongs, and determining the score of the open source code in the hosting platform dimension based on the proportion of the hosting platforms of the open source code belonging to the designated country.
[0055] In an embodiment of the present disclosure, the country of the hosting platform of the open source code can be searched in the open source code repository such as Gitee, and the proportion of the hosting platforms of the open source code belonging to the specified country can be counted.
[0056] Optionally, if the proportion of open source code used by the software product on hosting platforms originating from designated countries is greater than or equal to 80%, the open source code's score in the hosting platform dimension is determined to be 6. For every 10% decrease in the proportion of open source code used by the software product on hosting platforms originating from designated countries, the open source code's score in the hosting platform dimension is deducted by 1, with the lowest score being 0.
[0057] In some embodiments, when the evaluation dimension information is open source code source information, the score of each sub-dimensional information of each evaluation dimension information is determined, including: determining the country to which the open source code download platform belongs, and determining the score of the open source code in the download platform dimension based on the proportion of the open source code download platforms belonging to the designated country.
[0058] In an embodiment of the present disclosure, the software project document includes an open source code bill of materials. The open source code bill of materials can be searched to find out the country to which the open source code download platform belongs, and the proportion of the open source code download platforms belonging to a specified country (such as China) can be determined.
[0059] Optionally, if the percentage of open source code used in a software product's download platforms originating from a designated country (e.g., China) is greater than or equal to 80% and the code has not been tampered with, the open source code's score for the download platform dimension is determined to be 6. For every 10% decrease in the percentage of open source code used in a software product's download platforms originating from a designated country (e.g., China), the open source code's score for the download platform dimension is deducted by 1, with the lowest score for the open source code for the download platform dimension being 0.
[0060] In the above embodiment, the designated country is determined according to the actual situation of the software product and can be China or other countries.
[0061] In some embodiments, when the evaluation dimension information is open source code security and quality information, determining the score for each sub-dimension of each evaluation dimension includes: calculating open source vulnerability evaluation parameters for each sub-dimension based on the open source vulnerability data in the open source code security and quality information; and determining the score for each sub-dimension based on the open source vulnerability evaluation parameters of each sub-dimension. The sub-dimension information includes open source vulnerability rate, and / or open source vulnerability severity, and / or open source vulnerability impact, and / or open source vulnerability complexity, and / or open source vulnerability remediation rate.
[0062] In an embodiment of the present disclosure, a vulnerability security scan can be performed on the open source code of a software product to obtain open source vulnerability data, and open source vulnerability evaluation parameters of each sub-dimensional information can be statistically calculated based on the open source vulnerability data.
[0063] In some embodiments, the sub-dimension information includes the open source vulnerability rate, which can be the open source vulnerability rate per thousand lines. Optionally, if the open source vulnerability rate per thousand lines of open source code used in the software product is less than or equal to 1.5 and the average number of vulnerabilities in the open source code with vulnerabilities is 1, the score of the open source code in the open source vulnerability rate dimension is determined to be 15 points. For every increase of 0.5 in the open source vulnerability rate per thousand lines of open source code used in the software product and every increase of 1 in the average number of vulnerabilities in the open source code with vulnerabilities, the score of the open source code in the open source vulnerability rate dimension is reduced by 1. If the proportion requirements cannot be met at the same time, the score is calculated according to the lowest proportion of the two items. The lowest score of the open source code in the open source vulnerability rate dimension is 0 points.
[0064] In some embodiments, sub-dimension information includes the severity of open source vulnerabilities. Here, you can search for CVSS 3.x version vulnerability information in official vulnerability repositories such as CVE / NVD to determine the severity of the open source code (expressed using severity levels). If the severity of the open source code used by the software product is not medium or above, the score of the open source code in the open source vulnerability severity dimension is determined to be 5 points. For every 10% increase in the proportion of medium or above vulnerabilities in the source code used by the software product, the score of the open source code in the open source vulnerability severity dimension is reduced by 1, and the lowest score of the open source code in the open source vulnerability severity dimension is 0.
[0065] In some embodiments, the sub-dimension information includes the impact of the open source vulnerability. Here, the vulnerability information of the CVSS 3.x version can be searched in official vulnerability libraries such as CVE / NVD to determine the impact of the open source vulnerability (such as vulnerability confidentiality, vulnerability integrity, and vulnerability availability).
[0066] Alternatively, if no two or more of the open source code used in the software product's vulnerability confidentiality, vulnerability integrity, or vulnerability availability ratings are rated high, the open source code's score for the open source vulnerability impact dimension is determined to be 5. For every 10% increase in the proportion of open source code used in the software product with two or more of the vulnerabilities rated high in confidentiality, vulnerability integrity, or vulnerability availability, the open source code's score for the open source vulnerability impact dimension is reduced by 1, with the lowest score for the open source code being 0.
[0067] In some embodiments, the sub-dimension information includes the complexity of open source vulnerabilities. Here, the vulnerability information of the CVSS 3.x version can be searched in official vulnerability libraries such as CVE / NVD to determine the complexity of the open source vulnerabilities.
[0068] Alternatively, if the open source code used by the software product has no vulnerabilities with low attack complexity or medium severity, the score for the open source code in the open source vulnerability complexity dimension is determined to be 5. For every 10% increase in the proportion of open source code vulnerabilities with low attack complexity or medium severity, the score for the open source code in the open source vulnerability complexity dimension is reduced by 1, with the lowest score for the open source code in the open source vulnerability complexity dimension being 0.
[0069] In some embodiments, the sub-dimension information includes an open source vulnerability repair rate, and the software project document includes a vulnerability repair list. The open source vulnerability repair rate can be searched in the vulnerability repair list.
[0070] Alternatively, if the percentage of high-risk vulnerabilities in the open source code of a software product that are fixed within three months of their appearance is greater than or equal to 80%, the open source code's score for the open source vulnerability repair rate dimension is determined to be 5 points. For every 10% decrease in the percentage of high-risk vulnerabilities in the open source code of a software product that are fixed within three months of their appearance, the open source code's score for the open source vulnerability repair rate dimension is deducted by 1, with the lowest score for the open source code being 0 points.
[0071] In some embodiments, when the evaluation dimension information is open source code security and quality information, the scores of each sub-dimensional information of each evaluation dimension information are determined, including: based on the code version update information in the open source code security and quality information, determining the release time of the current version of the open source code and the release time of the latest version of the open source code; based on the release time of the current version of the open source code and the release time of the latest version of the open source code, determining the score of the open source code in the version update dimension.
[0072] In an embodiment of the present disclosure, the release time of the open source code can be searched in open source code repositories such as Github and Gitee, and the proportion of versions in different years can be determined based on the release time of the open source code.
[0073] Alternatively, if all open source code for a software product has a new version released within three years, the open source code's score for the version update dimension is determined to be 5 points. For every 20% decrease in the number of new versions released within three years for the open source code used in the software product, the open source code's score for the version update dimension is reduced by 1, with the lowest score for the open source code for the version update dimension being 0.
[0074] In some embodiments, when the evaluation dimension information is open source code intellectual property information, the score of each sub-dimensional information of each evaluation dimension information is determined, including: based on the open source license content in the open source code security quality information, determining the score of each sub-dimensional information, wherein the sub-dimensional information includes open source license compliance, and / or, open source license standardization, and / or, open source license reciprocity, and / or, open source license compatibility, and / or, open source license patent data, and / or, open source license scope of application.
[0075] In the embodiment of the present disclosure, the license of the open source code can be obtained from the scanning results of the sca tool, and each indicator item can be determined based on the relevant files.
[0076] In some embodiments, the sub-dimension information includes open source license compliance. The evaluation of open source license compliance involves evaluating whether the software product fulfills the relevant terms and obligations stipulated in the open source license, including identifying and assessing the risks of free and reciprocal open source licenses, and judging the compliance of the use of self-developed code and open source code.
[0077] Optionally, if the open source license used in the software product is complete, including clear copyright ownership and patent grant requirements, the open source code will be scored 1 in the open source license compliance dimension. If these requirements are not met, the open source code will be scored 0 in the open source license compliance dimension.
[0078] In some embodiments, the sub-dimension information includes open source license compliance. The evaluation of open source license compliance includes information on the scope of authorization, authorization conditions, breach of contract and termination of authorization, and disclaimers. Optionally, if all open source licenses used by the software product are mainstream open source licenses, the open source code is assigned a score of 1 for the open source license compliance dimension. If these requirements are not met, the open source code is assigned a score of 0 for the open source license compliance dimension.
[0079] In some embodiments, the sub-dimension information includes open source license reciprocity, which is used to identify and assess the risks of free and reciprocal open source licenses, and to determine the compliance of the use of self-developed code and open source code. Optionally, if the open source code license used by the software product includes a strong reciprocal license, isolation measures are adopted, and weak reciprocal licenses are referenced by linking, the score of the open source code in the open source license reciprocity dimension is determined to be 1 point. If the above requirements are not met, the open source code is scored 0 points in the open source license reciprocity dimension.
[0080] In some embodiments, the sub-dimension information includes open source license compatibility, which is used to determine the compliance of license usage between open source code. Optionally, if the open source code license used by the software product meets 100% license compatibility between the open source code and between the open source code and the project, the open source code is determined to have a score of 2 in the open source license compatibility dimension. If the above requirements are not met, the open source code is scored as 0 in the open source license compatibility dimension.
[0081] In some embodiments, the sub-dimension information includes open source license patent data, which is used to count whether the patents involved in the open source code contained in the software product have been granted, and to make an evaluation based on this. Optionally, if the proportion of open source code licenses used by the software product that do not clearly grant patent rights is less than or equal to 20%, the score of the open source code in the open source license patent data dimension is determined to be 2 points. If the proportion of open source code licenses used by the software product that do not clearly grant patent rights is less than or equal to 50%, the score of the open source code in the open source license patent data dimension is determined to be 1 point. If the proportion of open source code licenses used by the software product that do not clearly grant patent rights is greater than 50%, the score of the open source code in the open source license patent data dimension is determined to be 0 points.
[0082] In some embodiments, sub-dimension information includes the scope of application of the open source license. The scope of application of the open source license is used to count the scope of application of each open source license of the software product and the legal statement in the event of a dispute. Optionally, the scope of application of the open source license of the open source code used in the software product is all global. The score of the open source code in the open source license scope dimension is determined to be 1. If the above requirements are not met, the open source code in the open source license scope dimension is scored as 0.
[0083] In some embodiments, when the evaluation dimension information is open source code management information, determining the score of each sub-dimensional information of each evaluation dimension information includes: determining the score of the management team dimension based on the team status of the code management team of the open source code.
[0084] Alternatively, if the open source code management team is well-established with a clear division of labor, and the personnel experience meets project management requirements, the open source code will be assigned a score of 3 in the management team dimension. If the open source code management team does not meet any of the above requirements, the open source code will be assigned a score of 1 in the management team dimension. If the open source code management team does not meet any of the above requirements, the open source code will be assigned a score of 0 in the management team dimension.
[0085] In some embodiments, when the evaluation dimension information is open source code management information, determining the score of each sub-dimensional information of each evaluation dimension information includes: determining the score of the bill of materials dimension based on the completeness of the code bill of materials of the open source code.
[0086] Optionally, if the BOM has traceable open source code information, the score for the BOM dimension is determined to be 3. If the BOM for open source code does not meet any of the above criteria, the score for the BOM dimension is determined to be 1. If the BOM for open source code does not meet both criteria, the score for the BOM dimension is determined to be 0.
[0087] In some embodiments, when the evaluation dimension information is open source code management information, determining the score of each sub-dimensional information of each evaluation dimension information includes: determining the score of the code design dimension based on the compatibility status of the open source code.
[0088] Optionally, if the open source code's code design does not contain open source code compatibility conflicts or non-standard usage, the open source code's code design score is determined to be 3 points. If the open source code's code design contains open source code compatibility conflicts or non-standard usage, the open source code's code design score is determined to be 0 points.
[0089] In some embodiments, when the evaluation dimension information is open source code management information, determining the score of each sub-dimensional information of each evaluation dimension information includes: determining the score of the code generation dimension based on the security check and security scanning policy configuration status of the open source code.
[0090] Optionally, if the code generation process of the open source code has undergone security checks and the security scanning policy is configured appropriately, the code generation score of the open source code is determined to be 3 points. If the code generation process of the open source code does not meet any of the above requirements, the code generation score of the open source code is determined to be 1 point. If the code generation process of the open source code does not meet both of the above requirements, the code generation score of the open source code is determined to be 0 points.
[0091] Combine Figure 3 As shown, the embodiment of the present disclosure provides another open source code security risk management method, which includes: S301: The electronic device recognizes open source code in a software product.
[0092] S302: The electronic device determines a score for each evaluation dimension of the open source code.
[0093] S303: The electronic device calculates the sum of the scores of all evaluation dimension information, and uses the sum as the total score of the open source code.
[0094] Combine Figure 4 As shown, the embodiment of the present disclosure provides another open source code security risk management method, which includes: S401: The electronic device recognizes open source code in the software product.
[0095] S402: The electronic device determines a score for each evaluation dimension of the open source code.
[0096] S403: The electronic device determines a weight coefficient for each evaluation dimension information of the open source code.
[0097] S404: The electronic device performs a weighted summation on the scores and weight coefficients of all evaluation dimension information, and uses the result of the weighted summation as the total score of the open source code.
[0098] In some embodiments, a basic weight coefficient may be pre-configured for each evaluation dimension information. Here, the basic weight coefficient configured for each evaluation dimension information is different.
[0099] Optionally, determining the weight coefficient for each evaluation dimension of the open source code includes: determining a weight adjustment parameter for each evaluation dimension based on the estimated number of users of the software product; and calculating a final basic weight coefficient for each evaluation dimension based on the basic weight coefficient and the weight adjustment parameter for each evaluation dimension. Here, the weight adjustment parameter for each evaluation dimension has a preset relationship (e.g., positive or negative correlation) with the estimated number of users. Based on the estimated number of users, the basic weight coefficient is adjusted based on the weight adjustment parameter to obtain a final weight coefficient, so that the importance of each evaluation dimension is consistent with the scenario corresponding to the estimated number of users, ensuring that the overall score can more accurately represent the risk of the open source code.
[0100] In some embodiments, a baseline user volume can be configured, the difference between the estimated user volume and the baseline user volume is defined as the user volume deviation, and a functional relationship is established between the weight adjustment parameter of each evaluation dimension information and the user volume deviation. The functional relationship can represent the changing relationship (positive or negative correlation) between the weight adjustment parameter of the evaluation dimension information and the user volume deviation. Determining the weight coefficient of each evaluation dimension information of the open source code includes: calculating the user volume deviation between the estimated user volume of the software product and the baseline user volume; substituting the user volume deviation into the functional relationship for each evaluation dimension information to obtain the weight adjustment parameter for each evaluation dimension information; and using the sum of the weight adjustment parameter for each evaluation dimension information and the basic weight coefficient as the weight coefficient for each evaluation dimension information.
[0101] Optionally, the basic weight coefficient of each evaluation dimension information configuration is 1, and the value of the weight adjustment parameter is between -0.5 and 0.5.
[0102] In some embodiments, the estimated number of users of a software product can be determined based on information such as the type of software product (such as professional software, social software, shopping software, etc.), the country to which the software product is to be promoted, the user type of the software product, and the number of users of similar products of the software product.
[0103] In some embodiments, after determining the total score of the open source code, a risk management strategy for the software product may be determined based on the total score of the open source code and the score of each evaluation dimension information.
[0104] Combine Figure 5As shown, an embodiment of the present disclosure provides an open source code security risk management device 500 , which includes an open source code identification module 501 , a first score determination module 502 , and a second score determination module 503 .
[0105] The open source code identification module 501 is configured to identify open source code in a software product.
[0106] The first score determination module 502 is configured to determine a score for each evaluation dimension information of the open source code.
[0107] The types of evaluation dimension information include open source code source information, and / or, open source code security and quality information, and / or, open source code intellectual property information, and / or, open source code management information; The second score determination module 503 is configured to determine the total score of the open source code based on the score of each evaluation dimension information of the open source code.
[0108] The open source code security risk management device provided by the embodiments of the present disclosure can obtain evaluation dimension information related to the open source code and calculate a score for each evaluation dimension. The score for each evaluation dimension can represent the risk of the open source code in that evaluation dimension. Based on this, an overall score can be obtained based on the score of each evaluation dimension of the open source code. The overall score can represent the risk of the open source code across all evaluation dimensions. This can accurately assess the risks brought about by the introduction of open source code into a software product, facilitating the determination of a risk management strategy appropriate for the current risk situation of the software product.
[0109] In some embodiments, each evaluation dimension information includes sub-dimension information, and the first score determination module 502 is configured to: Determine each sub-dimension information of each evaluation dimension information of the open source code; Determine the score of each sub-dimension information of each evaluation dimension information; Based on the scores of each sub-dimension information of each evaluation dimension information, the scores of each evaluation dimension information of the open source code are counted.
[0110] In some embodiments, when the evaluation dimension information is open source code source information, the first score determination module 502 is configured to: Determine the coding language of the open source code, and based on the proportion of mainstream programming languages in the coding language of the open source code, determine the score of the open source code in the coding language dimension; and / or, determining the copyright owner of the open source code, and determining a score for the open source code in the copyright owner dimension based on information on the proportion of the open source code's copyright owners being from designated countries; and / or, determining code contribution information of the open source code in a specified country, and determining a score of the open source code in a code contribution dimension based on the code contribution information; and / or, determining the percentage of alternative code in a given country for open source code, and determining a score for the open source code on the code richness dimension based on the percentage of alternative code; and / or, determining the implementation of the open source community security management standards for the open source code, and determining the community security score of the open source code based on the percentage of open source communities to which the open source code belongs that meet the security management standards; and / or, determining the country of the hosting platform of the open source code, and determining a score for the hosting platform dimension based on the proportion of the open source code hosting platforms belonging to the designated country; And / or, determine the country to which the open source code download platform belongs, and determine the score of the open source code in the download platform dimension based on the proportion of the open source code download platforms belonging to the specified country.
[0111] In some embodiments, when the evaluation dimension information is open source code security quality information, the first score determination module 502 is configured to: Based on the open source vulnerability data in the open source code security quality information, the open source vulnerability evaluation parameters of each sub-dimensional information are calculated, where the sub-dimensional information includes the open source vulnerability rate, and / or the open source vulnerability severity, and / or the open source vulnerability impact, and / or the open source vulnerability complexity, and / or the open source vulnerability repair rate; Based on the open source vulnerability evaluation parameters of each sub-dimensional information, the score of each sub-dimensional information is determined.
[0112] In some embodiments, when the evaluation dimension information is open source code security quality information, the first score determination module 502 is configured to: Based on the code version update information in the open source code security and quality information, determine the release time of the current version of the open source code and the release time of the latest version of the open source code; The score of the open source code in the version update dimension is determined based on the release time of the current version of the open source code and the release time of the latest version of the open source code.
[0113] In some embodiments, when the evaluation dimension information is open source code intellectual property information, the first score determination module 502 is configured to: Based on the open source license content in the open source code security quality information, the score of each sub-dimension information is determined, wherein the sub-dimension information includes open source license compliance, and / or open source license standardization, and / or open source license reciprocity, and / or open source license compatibility, and / or open source license patent data, and / or open source license scope of application.
[0114] In some embodiments, when the evaluation dimension information is open source code management information, the first score determination module 502 is configured to: Determine the score of the management team dimension based on the team status of the code management team of the open source code; and / or, determining a score for a bill of materials dimension based on the completeness of the code bill of materials for the open source code; and / or, determining a score for a code design dimension based on the compatibility status of the open source code; And / or, based on the security check of the open source code and the security scanning policy configuration status, determine the score of the code generation dimension.
[0115] In some embodiments, the second score determination module 503 is further configured to determine a risk management strategy for the software product based on the total score of the open source code and the score of each evaluation dimension information.
[0116] Combine Figure 6 As shown, an embodiment of the present disclosure provides an electronic device 600, which includes a processor 601 and a memory 602. Optionally, the electronic device 600 may further include a communication interface 603 and a bus 604. The processor 601, the communication interface 603, and the memory 602 may communicate with each other via the bus 604. The communication interface 603 may be used for information transmission. The processor 601 may invoke logic instructions in the memory 602 to execute the open source code security risk management method of the above embodiment.
[0117] In addition, the logic instructions in the memory 602 can be implemented in the form of software functional units and can be stored in a computer-readable storage medium when sold or used as an independent product.
[0118] Memory 602, as a computer-readable storage medium, can be used to store software programs and computer-executable programs, such as program instructions / modules corresponding to the methods in the embodiments of the present disclosure. Processor 601 executes the program instructions / modules stored in memory 602 to execute functional applications and data processing, thereby implementing the open source code security risk management method in the above-mentioned embodiments.
[0119] The memory 602 may include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function; the data storage area may store data generated based on the use of the terminal device. Furthermore, the memory 602 may include high-speed random access memory and non-volatile memory.
[0120] An embodiment of the present disclosure provides a computer-readable storage medium storing computer-executable instructions, wherein the computer-executable instructions are configured to execute the above-mentioned open source code security risk management method.
[0121] The technical solutions of the embodiments of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes one or more instructions for causing a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in the embodiments of the present disclosure. The aforementioned storage medium may be a non-transitory storage medium, such as a USB flash drive, a mobile hard drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, among other media capable of storing program code.
[0122] The above description and the accompanying drawings sufficiently illustrate the embodiments of the present disclosure to enable those skilled in the art to practice them. Other embodiments may include structural, logical, electrical, process and other changes. The embodiments represent only possible variations. Unless expressly required, individual components and functions are optional, and the order of operations may vary. Portions and features of some embodiments may be included in or replace portions and features of other embodiments. Moreover, the terms used in this application are only used to describe the embodiments and are not used to limit the claims. As used in the description of the embodiments and claims, the singular forms "a", "an" and "the" are intended to also include the plural forms unless the context clearly indicates otherwise. Similarly, the term "and / or" as used in this application means any and all possible combinations of one or more of the associated listings. In addition, when used in this application, the term "comprise" and its variations "comprises" and / or comprising refer to the presence of stated features, wholes, steps, operations, elements, and / or components, but do not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or groups thereof. In the absence of further restrictions, an element defined by the sentence "comprising a..." does not exclude the presence of other identical elements in the process, method or device that includes the element. In this article, each embodiment may focus on the differences from other embodiments, and the same and similar parts between the various embodiments can be referenced to each other. For the methods, products, etc. disclosed in the embodiments, if they correspond to the method part disclosed in the embodiments, then the relevant parts can be referred to the description of the method part.
[0123] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software may depend on the specific application and design constraints of the technical solution. The technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the embodiments of the present disclosure. The technicians will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0124] In the embodiments disclosed herein, the disclosed methods and products (including but not limited to devices and equipment) can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units may be merely a logical functional division. In actual implementation, other divisions may be used, such as combining or integrating multiple units or components into another system, or omitting or disabling some features. Furthermore, the couplings or direct couplings or communication connections shown or discussed may be through interfaces, indirect couplings or communication connections between devices or units, and may be electrical, mechanical, or other forms. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, i.e., they may be located in one location or distributed across multiple network units. Some or all of these units may be selected to implement the embodiments according to actual needs. Furthermore, the functional units in the disclosed embodiments may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit.
[0125] The flowcharts and block diagrams in the accompanying drawings show the possible implementation architectures, functions and operations of the systems, methods and computer program products according to the embodiments of the present disclosure. In this regard, each box in the flowchart or block diagram can represent a module, program segment or part of the code, and the module, program segment or part of the code contains one or more executable instructions for implementing the specified logical functions. In some alternative implementations, the functions marked in the box can also occur in an order different from that marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. In the descriptions corresponding to the flowcharts and block diagrams in the accompanying drawings, the operations or steps corresponding to different boxes can also occur in an order different from that disclosed in the description, and sometimes there is no specific order between different operations or steps. For example, two consecutive operations or steps can actually be executed substantially in parallel, or they can sometimes be executed in the opposite order, which can depend on the functions involved. Each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented by a dedicated hardware-based system that performs the specified function or action, or may be implemented by a combination of dedicated hardware and computer instructions.
Claims
1. A method for security risk management of open source code, characterized in that: include: Identify open source code in software products; Determine a score for each evaluation dimension information of the open source code, where the type of evaluation dimension information includes open source code source information, and / or, open source code security quality information, and / or, open source code intellectual property information, and / or, open source code management information; Based on the score of each evaluation dimension information of the open source code, the overall score of the open source code is determined.
2. The method according to claim 1, characterized in that Each evaluation dimension information includes sub-dimension information, which determines the score of each evaluation dimension information of the open source code, including: Determine each sub-dimension information of each evaluation dimension information of the open source code; Determine the score of each sub-dimension information of each evaluation dimension information; Based on the scores of each sub-dimension information of each evaluation dimension information, the scores of each evaluation dimension information of the open source code are counted.
3. The method according to claim 2, characterized in that When the evaluation dimension information is open source code source information, the score of each sub-dimension information of each evaluation dimension information is determined, including: Determine the coding language of the open source code, and determine the score of the open source code in the coding language dimension based on the proportion of mainstream programming languages in the coding language of the open source code; and / or, determining the copyright owner of the open source code, and determining the score of the open source code in the copyright owner dimension based on information on the proportion of the countries of origin of the copyright owners of the open source code being designated countries; and / or, determining code contribution information of the open source code in a specified country, and determining a score of the open source code in a code contribution dimension based on the code contribution information; and / or, determining the percentage of alternative codes of the open source code in a specified country, and determining a score of the open source code on the code richness dimension based on the percentage of alternative codes; And / or, determine the implementation of the open source community security management specifications of the open source code, and determine the score of the open source code in the community security dimension based on the proportion of the open source community to which the open source code belongs that meets the security management specifications; and / or, determining the country of the hosting platform of the open source code, and determining a score of the open source code in the hosting platform dimension based on the proportion of the hosting platforms of the open source code that belong to the specified country; And / or, determine the country to which the open source code download platform belongs, and determine the score of the open source code in the download platform dimension based on the proportion of the open source code download platforms belonging to the specified country.
4. The method according to claim 2, characterized in that When the evaluation dimension information is open source code security quality information, the scores of each sub-dimension information of each evaluation dimension information are determined, including: Based on the open source vulnerability data in the open source code security quality information, the open source vulnerability evaluation parameters of each sub-dimensional information are counted, wherein the sub-dimensional information includes the open source vulnerability rate, and / or, the open source vulnerability severity, and / or, the open source vulnerability impact, and / or, the open source vulnerability complexity, and / or, the open source vulnerability repair rate; Based on the open source vulnerability evaluation parameters of each sub-dimensional information, the score of each sub-dimensional information is determined.
5. The method according to claim 2, characterized in that: When the evaluation dimension information is open source code security quality information, the scores of each sub-dimension information of each evaluation dimension information are determined, including: Based on the code version update information in the open source code security quality information, determine the release time of the current version of the open source code and the release time of the latest version of the open source code; Based on the release time of the current version of the open source code and the release time of the latest version of the open source code, the score of the open source code in the version update dimension is determined.
6. The method according to claim 2, characterized in that: When the evaluation dimension information is open source code intellectual property information, the score of each sub-dimension information of each evaluation dimension information is determined, including: Based on the open source license content in the open source code security quality information, determine the score of each sub-dimension information, wherein the sub-dimension information includes open source license compliance, and / or, open source license standardization, and / or, open source license reciprocity, and / or, open source license compatibility, and / or, open source license patent data, and / or, open source license scope of application.
7. The method according to claim 2, characterized in that: When the evaluation dimension information is open source code management information, the score of each sub-dimension information of each evaluation dimension information is determined, including: Determine the score of the management team dimension based on the team status of the code management team of the open source code; and / or, determining a score for a bill of materials dimension based on the completeness of the code bill of materials for the open source code; and / or, determining a score for a code design dimension based on the compatibility status of the open source code; And / or, determine the score of the code generation dimension based on the security check of the open source code and the security scanning policy configuration status.
8. A security risk management and control device for open source code, characterized in that: include: an open source code identification module configured to identify open source code in a software product; A first score determination module is configured to determine a score for each evaluation dimension information of the open source code, where the type of the evaluation dimension information includes open source code source information, and / or, open source code security quality information, and / or, open source code intellectual property information, and / or, open source code management information; The second score determination module is configured to determine the total score of the open source code based on the score of each evaluation dimension information of the open source code.
9. An electronic device comprising a processor and a memory storing program instructions, characterized in that: The processor is configured to execute the open source code security risk management method according to any one of claims 1 to 7 when running program instructions.
10. A storage medium, characterized in that: The storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the open source code security risk management method as described in any one of claims 1 to 7 is executed.
