Code defect vulnerability scanning determination method based on knowledge base

By segmenting the code, calculating anomaly tendency evaluation values, and conducting offensive testing, the problem of low code vulnerability identification efficiency in the existing technology is solved, the vulnerability identification efficiency and analysis accuracy are improved, and the security of the code is enhanced.

CN118586009AInactive Publication Date: 2024-09-03BEIJING KEYWARE TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411072469.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-06
Publication Date
2024-09-03
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The identification efficiency of code vulnerabilities in the existing technology is low and cannot effectively improve the security of application software systems.

Method used

By dividing the target code into sub-code segments, calculate the code duplication and conditional probability, analyze the abnormal tendency evaluation value, conduct offensive testing and mark the sub-code segments, regenerate new sub-code segments for testing, and adjust the attack frequency and error log account Than, store it in a temporary or vulnerability database to improve vulnerability identification efficiency.

Benefits of technology

It improves the control accuracy of code structure complexity and vulnerability identification efficiency, expands the types of sub-code segments in the vulnerability database, and enhances the accuracy of analysis and vulnerability identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118586009A
    Figure CN118586009A
Patent Text Reader

Abstract

The invention relates to the technical field of code detection, in particular to a knowledge base-based code defect vulnerability scanning determination method, which comprises the following steps of: generating a sub-code segment; calculating an abnormal tendency evaluation value of the target code; analyzing whether the abnormal tendency of the target code is qualified or not; testing and marking aggressiveness; regenerating a new sub-code segment; adjusting the attack frequency; according to the method, the exception tendency of the target code is comprehensively analyzed based on the conditional probability and the repetition degree between the sub-code segments, the control precision for the structural complexity of the target code is improved, the aggressiveness test is performed on the target code with the unqualified exception tendency, the sub-code segments are marked according to the test result, and the test efficiency is improved. And the sub-code segments with the vulnerabilities are stored in the vulnerability database, so that the sub-code segments can be subsequently compared with code segments in the vulnerability database to judge whether the target code segments have the vulnerabilities, and the vulnerability identification efficiency of the codes is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of code detection, and in particular to a code defect vulnerability scanning and determination method based on a knowledge base. Background Art

[0002] Code defect vulnerabilities are a very important security issue that requires comprehensive closed-loop management measures to solve. Use automated scanning tools, manual penetration testing, and other methods to fully discover security vulnerabilities in systems and applications. This is the first step in closed-loop management and lays the foundation for subsequent evaluation and repair. Existing technologies use machine self-learning technology to learn and identify effective defects based on historical code audit information, thereby enhancing the security of application software systems. However, the efficiency of identifying code vulnerabilities is low.

[0003] Chinese patent application number: CN202310636553.5 discloses a source code defect static audit detection system, including: AI automatic audit module, through machine self-learning technology, based on historical code audit information, function whitelist and code defect knowledge base, learn to identify effective defects; third-party component detection module, used to detect open source code vulnerabilities according to the defect rule set of the public vulnerability library; bytecode scanning module, through Java bytecode scanning technology, for graphical display and defect location tracking; deployment module, used for virtualized cloud deployment, distributed deployment, and mirror deployment. The advantages of this application are: consolidating the source: solving security problems from the source of the code, realizing security left shift, and enhancing the security and robustness of the application software system; autonomous and controllable: the product is independently developed, safe and controllable, and meets the requirements of the trust creation; flexible deployment: the product can be deployed in virtualization, distributed, and Docker images; cost-effective: high performance indicators and low prices. It can be seen that the source code defect static audit detection system has the following problems: low efficiency in identifying code vulnerabilities. Summary of the invention

[0004] To this end, the present invention provides a knowledge base-based code defect vulnerability scanning and determination method to overcome the problem of low efficiency in identifying code vulnerabilities in the prior art.

[0005] To achieve the above objectives, the present invention provides a method for scanning and determining code defects and vulnerabilities based on a knowledge base. The method comprises: Step S1, dividing the target code of the knowledge base into several sub-code segments; Step S2, calculating the abnormal tendency evaluation value of the target code based on the code repetition degree of each sub-code segment and the conditional probability of each sub-code segment; Step S3, analyzing whether the abnormal tendency of the target code is qualified based on the abnormal tendency evaluation value; Step S4, performing an aggressiveness test on the target code with an abnormal tendency that fails to meet the standards, and marking each sub-code segment; Step S5: regenerate a new sub-code segment based on the secondary sub-code segment, and perform an offensive test to mark the new sub-code segment; Step S6: adjusting the attack frequency on the sub-code segment based on the proportion of the first-level sub-code segment.

[0006] Furthermore, in the step S2, the conditional probabilities between the sub-code segments are calculated respectively, and the abnormal tendency evaluation value for the target code is calculated based on the calculated average value P of the conditional probabilities and the code repetition C of each sub-code segment, and the abnormal tendency evaluation value S=α×P / P0+β×C / C0 is set, wherein α is the conditional probability weight coefficient, β is the repetition weight coefficient, P0 is the preset average value, and C0 is the preset code repetition.

[0007] Further, in step S3, the abnormal tendency of the target code is analyzed based on the abnormal tendency evaluation value to determine whether it is qualified. If the abnormal tendency evaluation value is less than or equal to the first preset abnormal tendency evaluation value, it is determined that the abnormal tendency of the target code is qualified; If the abnormal tendency evaluation value is greater than the first preset abnormal tendency evaluation value, the abnormal tendency of the target code is determined to be unqualified, and an aggressiveness test is performed on each of the sub-code segments, and a test log is recorded.

[0008] Furthermore, in step S4, when the aggressiveness test is completed for each sub-code segment, the sub-code segment is marked based on the error log ratio of the aggressiveness test for a single sub-code segment. If the error log ratio is less than or equal to a first preset error log ratio, marking the sub-code segment as a first-level sub-code segment; If the error log ratio is greater than the first preset error log ratio and less than or equal to the second preset error log ratio, marking the sub-code segment as a secondary sub-code segment, and storing the sub-code segment in a temporary database; If the error log ratio is greater than the second preset error log ratio, the sub-code segment is marked as a third-level sub-code segment, and the sub-code segment is stored in the vulnerability database.

[0009] Furthermore, when marking of each of the sub-code segments is completed, the first preset abnormal tendency evaluation value is adjusted based on the proportion of the number of the secondary sub-code segments.

[0010] Furthermore, when the marking of each sub-code segment is completed, the sub-code segments in the temporary database are randomly connected, and a number of new sub-code segments are randomly generated again, and an attack test is performed on each new sub-code segment, and each new sub-code segment is marked based on the new error log ratio of each new sub-code segment after the attack test. If the new error log ratio is less than or equal to the second preset error log ratio, marking the new sub-code segment as a secondary sub-code segment, and storing the new sub-code segment in the temporary database; If the new error log ratio is greater than the second preset error log ratio, the new sub-code segment is marked as a third-level sub-code segment, and the new sub-code segment is stored in the vulnerability database.

[0011] Further, when the marking of each of the new sub-code segments is completed, the number of generated new sub-code segments is determined based on the third-level proportion of the third-level sub-code segments, If the third-level proportion is less than or equal to the preset third-level proportion, determining that the number of the generated new sub-code segments is the first-level number; If the third-level proportion is greater than the preset third-level proportion, it is determined that the number of the generated new sub-code segments is the second-level number.

[0012] Furthermore, when the sub-code segments are marked, the attack frequency in the attack test process for each sub-code segment is corrected based on the first-level proportion of the marked first-level sub-code segments.

[0013] Further, when each of the sub-code segments is marked complete, it is determined whether to update the component version based on the proportion of the third-level sub-code segments. If the proportion of the third-level sub-code segments is greater than or equal to the proportion of the preset third-level sub-code segments, it is determined that the component version is low, and the component version is updated; If the proportion of the third-level sub-code segments is less than the proportion of the preset third-level sub-code segments, it is determined that the component version is normal and the component version is not updated.

[0014] Furthermore, the attack test includes: analyzing whether the sub-code segment has a vulnerability based on the matching degree between the known vulnerability code segment in the big data and the sub-code segment, and testing the sub-code segment using a black box test.

[0015] Compared with the prior art, the beneficial effect of the present invention lies in that, in the present invention, the greater the conditional probability between each sub-code segment, the closer the connection between each sub-code segment, the stronger the dependency between codes, the more rigorous the code needs to be tested, the higher the repetition of each sub-code segment, the greater the maintenance difficulty, the abnormal tendency of the target code is comprehensively analyzed based on the conditional probability and repetition between each sub-code segment, the control accuracy of the structural complexity of the target code is improved, the target code with unqualified abnormal tendency is subjected to an aggressive test, and each sub-code segment is marked according to the test results, and the sub-code segment with vulnerabilities is stored in the vulnerability database, which is convenient for subsequent comparison with the code segment in the vulnerability database to determine whether the target code segment has vulnerabilities, thereby improving the vulnerability identification efficiency of the code.

[0016] Furthermore, in the present invention, the secondary sub-code segments are stored in a temporary database, and the sub-code segments are recombined to generate new sub-code segments, the newly generated sub-code segments are tested, and the sub-code segments with vulnerabilities are stored in a vulnerability database, thereby achieving an expansion of the types of sub-code segments in the vulnerability database.

[0017] Furthermore, in the present invention, the first preset abnormal tendency evaluation value is reduced according to the proportion of the secondary sub-code segment, thereby narrowing the range of qualified target codes, increasing the range of target codes that need further analysis, and improving the analysis accuracy of the target code segment. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 A flowchart of a method for scanning and determining code defects and vulnerabilities based on a knowledge base of the present invention; Figure 2 A flow chart of analyzing whether the abnormal tendency of a target code is qualified according to the present invention; Figure 3 A flowchart of the sub-code segments marked in the present invention; Figure 4 The present invention is a flow chart for adjusting the first preset abnormal tendency evaluation value. DETAILED DESCRIPTION

[0019] In order to make the objects and advantages of the present invention more clearly understood, the present invention is further described below in conjunction with embodiments; it should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.

[0020] It should be pointed out that the data in this embodiment are obtained by comprehensive analysis and evaluation of the historical data of the system of the present invention in the six months before this judgment and the corresponding historical judgment results. Before this detection, the system of the present invention comprehensively determines the values ​​of the preset parameter standards for this judgment based on the evaluation values ​​of the 37,383 retrieval results detected cumulatively in the first three months. It can be understood by those skilled in the art that the system of the present invention can determine the single parameter mentioned above by selecting the value with the highest proportion as the preset standard parameter according to the data distribution, using weighted summation to use the obtained value as the preset standard parameter, substituting each historical data into a specific formula and using the value obtained by the formula as the preset standard parameter or other selection methods, as long as the system of the present invention can clearly define the different specific situations in the single judgment process through the obtained values.

[0021] The preferred embodiments of the present invention are described below with reference to the accompanying drawings. It should be understood by those skilled in the art that these embodiments are only used to explain the technical principles of the present invention and are not intended to limit the protection scope of the present invention.

[0022] It should be noted that, in the description of the present invention, terms such as "up", "down", "left", "right", "inside" and "outside" indicating directions or positional relationships are based on the directions or positional relationships shown in the drawings. This is merely for the convenience of description and does not indicate or imply that the device or element must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it cannot be understood as a limitation on the present invention.

[0023] In addition, it should be noted that in the description of the present invention, unless otherwise clearly specified and limited, the terms "installed", "connected", and "connected" should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components. For those skilled in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.

[0024] See also Figure 1 As shown, it is a flow chart of the code defect vulnerability scanning and determination method based on the knowledge base of the present invention.

[0025] The embodiment of the present invention provides a method for scanning and determining code defects and vulnerabilities based on a knowledge base, comprising: Step S1, dividing the target code of the knowledge base into several sub-code segments; Step S2, calculating the abnormal tendency evaluation value of the target code based on the code repetition degree of each sub-code segment and the conditional probability of each sub-code segment; Step S3, analyzing whether the abnormal tendency of the target code is qualified based on the abnormal tendency evaluation value; Step S4, performing an aggressiveness test on the target code with an abnormal tendency that fails to meet the standards, and marking each sub-code segment; Step S5: regenerate a new sub-code segment based on the secondary sub-code segment, and perform an offensive test to mark the new sub-code segment; Step S6: adjusting the attack frequency on the sub-code segment based on the proportion of the first-level sub-code segment.

[0026] Specifically, in the step S2, the conditional probabilities between the sub-code segments are calculated respectively, and the abnormal tendency evaluation value for the target code is calculated based on the calculated average value P of the conditional probabilities and the code repetition C of each sub-code segment, and the abnormal tendency evaluation value S=α×P / P0+β×C / C0 is set, wherein α is the conditional probability weight coefficient, β is the repetition weight coefficient, P0 is the preset average value, and C0 is the preset code repetition.

[0027] In the embodiment of the present invention, the conditional probability weight coefficient is 0.35, the repetition weight coefficient is 0.65, P0 is 0.65, and the preset code repetition is 0.75.

[0028] In the present invention, the greater the conditional probability between each sub-code segment, the closer the connection between each sub-code segment, the stronger the dependency between codes, the more rigorous the code needs to be tested, the higher the repetition of each sub-code segment, the greater the maintenance difficulty, the abnormal tendency of the target code is comprehensively analyzed based on the conditional probability and repetition between each sub-code segment, the control accuracy of the structural complexity of the target code is improved, the target code with unqualified abnormal tendency is tested for aggressiveness, and each sub-code segment is marked according to the test results, and the sub-code segment with vulnerabilities is stored in the vulnerability database, which is convenient for subsequent comparison with the code segment in the vulnerability database to determine whether the target code segment has vulnerabilities, thereby improving the vulnerability identification efficiency of the code.

[0029] See also Figure 2 As shown, it is a flowchart for analyzing whether the abnormal tendency of the target code is qualified.

[0030] Specifically, in step S3, the abnormal tendency of the target code is analyzed based on the abnormal tendency evaluation value to determine whether it is qualified. If the abnormal tendency evaluation value is less than or equal to the first preset abnormal tendency evaluation value, it is determined that the abnormal tendency of the target code is qualified; If the abnormal tendency evaluation value is greater than the first preset abnormal tendency evaluation value, the abnormal tendency of the target code is determined to be unqualified, and an aggressiveness test is performed on each of the sub-code segments, and a test log is recorded.

[0031] In the embodiment of the present invention, the first preset abnormal tendency evaluation value is 1.05.

[0032] See also Figure 3 As shown, it is a flowchart of the marking sub-code segment.

[0033] Specifically, in step S4, when the aggressiveness test is completed for each sub-code segment, the sub-code segment is marked based on the error log ratio of the aggressiveness test for a single sub-code segment. If the error log ratio is less than or equal to a first preset error log ratio, marking the sub-code segment as a first-level sub-code segment; If the error log ratio is greater than the first preset error log ratio and less than or equal to the second preset error log ratio, marking the sub-code segment as a secondary sub-code segment, and storing the sub-code segment in a temporary database; If the error log ratio is greater than the second preset error log ratio, the sub-code segment is marked as a third-level sub-code segment, and the sub-code segment is stored in the vulnerability database.

[0034] In the embodiment of the present invention, the error log ratio is the ratio of the number of error logs to the total number of logs, the first preset error log ratio is 0.3, and the second preset error log ratio is 0.4.

[0035] In the present invention, the secondary sub-code segments are stored in a temporary database, and the sub-code segments are recombined to generate new sub-code segments, the newly generated sub-code segments are tested, and the sub-code segments with vulnerabilities are stored in a vulnerability database, thereby achieving an expansion of the types of sub-code segments in the vulnerability database.

[0036] See also Figure 4 As shown, it is a flow chart for adjusting the first preset abnormal tendency evaluation value.

[0037] Specifically, when marking of each of the sub-code segments is completed, the first preset abnormal tendency evaluation value is adjusted based on the proportion of the number of the secondary sub-code segments. If the quantity ratio is less than or equal to the preset quantity ratio, the first adjustment coefficient t1 is selected to adjust the first preset abnormal tendency evaluation value D to the corresponding value, and the adjusted first preset abnormal tendency evaluation value D'=t1×D0 is set, where D0 is the initial first preset abnormal tendency evaluation value before adjustment; If the quantity ratio is greater than the preset quantity ratio, the second adjustment coefficient t2 is selected to adjust the first preset abnormal tendency evaluation value D to a corresponding value, and the adjusted first preset abnormal tendency evaluation value D' is set to be t2×D0.

[0038] In the embodiment of the present invention, the first adjustment coefficient is 0.9, and the second adjustment coefficient is 0.8.

[0039] In the present invention, the first preset abnormal tendency evaluation value is reduced according to the proportion of the secondary sub-code segment, the range of qualified target codes is narrowed, the range of target codes that need further analysis is increased, and the analysis accuracy of the target code segment is improved.

[0040] Specifically, when the marking of each sub-code segment is completed, the sub-code segments in the temporary database are randomly connected, and a number of new sub-code segments are randomly regenerated, and an attack test is performed on each new sub-code segment, and each new sub-code segment is marked based on the proportion of new error logs of each new sub-code segment after the attack test. If the new error log ratio is less than or equal to the second preset error log ratio, marking the new sub-code segment as a secondary sub-code segment, and storing the new sub-code segment in the temporary database; If the new error log ratio is greater than the second preset error log ratio, the new sub-code segment is marked as a third-level sub-code segment, and the new sub-code segment is stored in the vulnerability database.

[0041] Specifically, when marking of each of the new sub-code segments is completed, the number of generated new sub-code segments is determined based on the third-level proportion of the third-level sub-code segments. If the third-level proportion is less than or equal to the preset third-level proportion, determining that the number of the generated new sub-code segments is the first-level number; If the third-level proportion is greater than the preset third-level proportion, it is determined that the number of the generated new sub-code segments is the second-level number.

[0042] Specifically, when the sub-code segments are marked, the attack frequency in the attack test process for each sub-code segment is corrected based on the first-level proportion of the marked first-level sub-code segments. If the first-level proportion is less than or equal to the preset first-level proportion, it is determined that the first correction coefficient z1 is selected to correct the attack frequency V to the corresponding value, and the corrected attack frequency V'=z1×V0 is set, where V0 is the initial attack frequency before correction; If the first-level proportion is greater than the preset first-level proportion, it is determined to select the second correction coefficient z2 to correct the attack frequency V to a corresponding value, and the corrected attack frequency V'=z2×V0 is set.

[0043] In the embodiment of the present invention, the first correction coefficient is 2, and the second correction coefficient is 2.5.

[0044] Specifically, when each of the sub-code segments is marked complete, it is determined whether to update the component version based on the proportion of the third-level sub-code segments. If the proportion of the third-level sub-code segments is greater than or equal to the proportion of the preset third-level sub-code segments, it is determined that the component version is low, and the component version is updated; If the proportion of the third-level sub-code segments is less than the proportion of the preset third-level sub-code segments, it is determined that the component version is normal and the component version is not updated.

[0045] Specifically, the attack test includes: analyzing whether the sub-code segment has a vulnerability based on the matching degree between the known vulnerability code segment in the big data and the sub-code segment, and testing the sub-code segment using a black box test.

[0046] So far, the technical solutions of the present invention have been described in conjunction with the preferred embodiments shown in the accompanying drawings. However, it is easy for those skilled in the art to understand that the protection scope of the present invention is obviously not limited to these specific embodiments. Without departing from the principle of the present invention, those skilled in the art can make equivalent changes or substitutions to the relevant technical features, and the technical solutions after these changes or substitutions will fall within the protection scope of the present invention.

[0047] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A code defect vulnerability scanning and determination method based on knowledge base, It is characterized in that include: Step S1, dividing the target code of the knowledge base into several sub-code segments; Step S2, calculating the abnormal tendency evaluation value of the target code based on the code repetition degree of each sub-code segment and the conditional probability of each sub-code segment; Step S3, analyzing whether the abnormal tendency of the target code is qualified based on the abnormal tendency evaluation value; Step S4, performing an aggressiveness test on the target code with an abnormal tendency that fails to meet the standards, and marking each sub-code segment; Step S5: regenerate a new sub-code segment based on the secondary sub-code segment, and perform an offensive test to mark the new sub-code segment; Step S6: adjusting the attack frequency on the sub-code segment based on the proportion of the first-level sub-code segment.

2. The method for scanning and determining code defects and vulnerabilities based on a knowledge base according to claim 1, It is characterized in that In the step S2, the conditional probabilities between the sub-code segments are calculated respectively, and the abnormal tendency evaluation value for the target code is calculated based on the calculated average value P of the conditional probabilities and the code repetition C of each sub-code segment, and the abnormal tendency evaluation value S=α×P / P0+β×C / C0 is set, wherein α is the conditional probability weight coefficient, β is the repetition weight coefficient, P0 is the preset average value, and C0 is the preset code repetition.

3. The code defect vulnerability scanning and determination method based on the knowledge base according to claim 2, It is characterized in that In step S3, the abnormal tendency of the target code is analyzed based on the abnormal tendency evaluation value to determine whether it is qualified. If the abnormal tendency evaluation value is less than or equal to the first preset abnormal tendency evaluation value, it is determined that the abnormal tendency of the target code is qualified; If the abnormal tendency evaluation value is greater than the first preset abnormal tendency evaluation value, the abnormal tendency of the target code is determined to be unqualified, and an aggressiveness test is performed on each of the sub-code segments, and a test log is recorded.

4. The code defect vulnerability scanning and determination method based on the knowledge base according to claim 3, It is characterized in that In step S4, when the aggressiveness test of each sub-code segment is completed, the sub-code segment is marked based on the error log ratio of the aggressiveness test for a single sub-code segment. If the error log ratio is less than or equal to a first preset error log ratio, marking the sub-code segment as a first-level sub-code segment; If the error log ratio is greater than the first preset error log ratio and less than or equal to the second preset error log ratio, marking the sub-code segment as a secondary sub-code segment, and storing the sub-code segment in a temporary database; If the error log ratio is greater than the second preset error log ratio, the sub-code segment is marked as a third-level sub-code segment, and the sub-code segment is stored in the vulnerability database.

5. The method for scanning and determining code defects and vulnerabilities based on a knowledge base according to claim 4, It is characterized in that When marking of each of the sub-code segments is completed, the first preset abnormal tendency evaluation value is adjusted based on the proportion of the number of the secondary sub-code segments.

6. The method for scanning and determining code defects and vulnerabilities based on a knowledge base according to claim 5, It is characterized in that When the marking of each sub-code segment is completed, the sub-code segments in the temporary database are randomly connected, and a number of new sub-code segments are randomly generated again, and an attack test is performed on each new sub-code segment, and each new sub-code segment is marked based on the new error log ratio of each new sub-code segment after the attack test. If the new error log ratio is less than or equal to the second preset error log ratio, marking the new sub-code segment as a secondary sub-code segment, and storing the new sub-code segment in the temporary database; If the new error log ratio is greater than the second preset error log ratio, the new sub-code segment is marked as a third-level sub-code segment, and the new sub-code segment is stored in the vulnerability database.

7. The method for scanning and determining code defects and vulnerabilities based on a knowledge base according to claim 6, It is characterized in that When marking of each of the new sub-code segments is completed, the number of generated new sub-code segments is determined based on the third-level proportion of the third-level sub-code segments, If the third-level proportion is less than or equal to the preset third-level proportion, determining that the number of the generated new sub-code segments is the first-level number; If the third-level proportion is greater than the preset third-level proportion, it is determined that the number of the generated new sub-code segments is the second-level number.

8. The method for scanning and determining code defects and vulnerabilities based on a knowledge base according to claim 7, It is characterized in that When the marking of the sub-code segments is completed, the attack frequency in the attack test process for each sub-code segment is corrected based on the first-level proportion of the marked first-level sub-code segments.

9. The method for scanning and determining code defects and vulnerabilities based on a knowledge base according to claim 8, It is characterized in that When marking each of the sub-code segments as completed, determining whether to update the component version based on the proportion of the third-level sub-code segments, If the proportion of the third-level sub-code segments is greater than or equal to the proportion of the preset third-level sub-code segments, it is determined that the component version is low, and the component version is updated; If the proportion of the third-level sub-code segments is less than the proportion of the preset third-level sub-code segments, it is determined that the component version is normal and the component version is not updated.

10. The method for scanning and determining code defects and vulnerabilities based on a knowledge base according to claim 9, It is characterized in that The attack test includes: analyzing whether the sub-code segment has a vulnerability based on the matching degree between the known vulnerability code segment in the big data and the sub-code segment, and testing the sub-code segment using a black box test.

Citation Information

Patent Citations

  • Code testing method and device, computer device and storage medium

    CN110362467A

  • Quick vulnerability positioning method, electronic device and storage medium

    CN110866258A

  • Application vulnerability detection method and system

    CN111291377A

  • Fuzzy testing method and device based on code similarity and storage medium

    CN114491566A

  • System and method for locating and correcting vulnerabilities in a target computer system

    US20190018967A1