Code vulnerability identification method and device, equipment and storage medium

By determining Source points in the code and cropping, the prompt words for building large language models are solved, the noise problem caused by full code construction is significantly reduced, and the false alarm rate and omission rate are improved, and the accuracy of code vulnerability identification is improved.

CN119066664APending Publication Date: 2024-12-03HANGZHOU DBAPPSECURITY CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411224605.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-03
Publication Date
2024-12-03

AI Technical Summary

Technical Problem

When the existing technology uses a large language model to identify code vulnerabilities, using full code to build prompt words leads to excessive noise, resulting in high false alarm rates and missed alarm rates.

Method used

By determining the Source point of parameters passed from outside in the source code, constructing an abstract syntax tree, traversing the tree nodes to determine the data flow relationship, performing code cropping based on these nodes, building code slices and inputting large language models to obtain vulnerability identification results .

Benefits of technology

The false alarm rate and missed alarm rate of output results of large language models are reduced, and the accuracy and interpretability of code vulnerability identification are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119066664A_ABST
    Figure CN119066664A_ABST
Patent Text Reader

Abstract

The invention discloses a code vulnerability identification method, device and equipment and a storage medium, which are applied to the field of network security, and are characterized in that Source tree nodes of Source points are determined in an abstract syntax tree by constructing the abstract syntax tree of source codes; traversing by taking each Source tree node as a starting point, and determining an association tree node having a data flow relationship with each Source tree node; performing code restoration according to a data flow sequence based on each Source tree node and the corresponding association tree node to obtain a code slice; and inputting cue words constructed based on all code slices into the large language model to obtain an output vulnerability recognition result. According to the method, the cue word of the large language model is constructed through the code segment obtained by performing code cutting on the Source point in the code, so that the problem of relatively high false alarm rate and missing report rate of an output result of the large language model caused by overhigh noise input by the model when the cue word of the large language model is constructed through full-quantity codes is avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network security, and in particular to a code vulnerability identification method, device, electronic device and computer-readable storage medium. Background Art

[0002] The rapid growth of the number of vulnerabilities seriously threatens the security of cyberspace. Attackers can use vulnerabilities to steal personal information, private data, and even tamper with intelligent software and hardware. Therefore, it is very important to realize the automatic identification of code vulnerabilities. In the process of identifying code vulnerabilities through a large language model, the existing technology generally constructs the prompt words of the large language model through the full code to obtain the code vulnerability identification result output by the model. The input of the full code will cause excessive noise, which will eventually lead to a high false alarm rate and false negative rate of the output result of the large language model. Summary of the invention

[0003] The purpose of the present invention is to provide a code vulnerability identification method, device, electronic device and computer-readable storage medium, which are applied to the field of network security. The method performs code cutting through the Source point in the code, and constructs the prompt words of the large language model through the cut code segments, thereby avoiding the problem that the prompt words of the large language model are constructed through the full amount of code, which makes the noise of the model input too large and causes the false alarm rate and missed alarm rate of the large language model output result to be high.

[0004] In order to solve the above technical problems, the present invention provides a code vulnerability identification method, comprising:

[0005] Determine a Source point of a parameter passed in from outside in a source code, construct an abstract syntax tree of the source code, and determine a Source tree node of the Source point in the abstract syntax tree;

[0006] Traversing the abstract syntax tree starting from each of the Source tree nodes to determine associated tree nodes having a data flow relationship with each of the Source tree nodes;

[0007] Based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes, code restoration is performed in a data flow order to obtain code slices of each of the Source points;

[0008] Prompt words are constructed based on all the code slices, and the prompt words are input into a large language model to obtain a vulnerability identification result output by the large language model.

[0009] Optionally, inputting the prompt word into a large language model to obtain a vulnerability identification result output by the large language model includes:

[0010] The prompt word is input into the large language model to obtain the vulnerability identification type and vulnerability exploitation chain information output by the large language model.

[0011] Optionally, the performing code restoration based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes in a data flow order to obtain code slices for each of the Source points includes:

[0012] Determine a data flow branch starting from each of the Source tree nodes;

[0013] Based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes, code restoration is performed according to the data flow order in each of the data flow branches to obtain the code slices of each of the Source points.

[0014] Optionally, constructing prompt words based on all the code slices includes:

[0015] Obtaining keywords for the vulnerability identification task and a technical description of the code slice;

[0016] A prompt word is constructed based on the keywords, the technical description and all the code slices.

[0017] Optionally, the method further includes:

[0018] Obtaining manual analysis results of the code slice;

[0019] Determine difference analysis data based on the manual research and judgment results and the vulnerability identification results;

[0020] The large language model and / or the prompt word are updated based on the difference analysis data.

[0021] Optionally, traversing the abstract syntax tree with each of the Source tree nodes as a starting point to determine associated tree nodes having a data flow relationship with each of the Source tree nodes includes:

[0022] In the abstract syntax tree, each Source tree node is taken as a starting point, and all classes in the abstract syntax tree are traversed to determine the associated tree nodes that have a data flow relationship with each Source tree node.

[0023] Optionally, the data flow in the data flow relationship includes: data transfer based on function calls, data transfer based on method calls, variable assignment, object property assignment, information exchange between different parts of the source code based on method calls, information exchange between different parts of the source code based on return values, and object initialization assignment based on constructors.

[0024] In order to solve the above technical problems, the present invention provides a code vulnerability identification device, comprising:

[0025] The first module is used to determine a Source point of a parameter passed in from the outside in a source code, construct an abstract syntax tree of the source code, and determine a Source tree node of the Source point in the abstract syntax tree;

[0026] The second module is used to traverse the abstract syntax tree starting from each Source tree node to determine an associated tree node having a data flow relationship with each Source tree node;

[0027] The third module is used to perform code restoration based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes in a data flow order to obtain code slices of each of the Source points;

[0028] The fourth module is used to construct prompt words based on all the code slices, input the prompt words into the large language model, and obtain the vulnerability identification results output by the large language model.

[0029] In order to solve the above technical problems, the present invention provides an electronic device, comprising:

[0030] Memory, for storing computer programs;

[0031] A processor is used to implement the code vulnerability identification method when executing the computer program.

[0032] In order to solve the above technical problems, the present invention provides a computer-readable storage medium, in which computer-executable instructions are stored. When the computer-executable instructions are executed by a processor, the code vulnerability identification method is implemented.

[0033] It can be seen that the method of the present invention constructs an abstract syntax tree of the source code by determining the Source point of the parameters passed in from the outside in the source code; traverses the abstract syntax tree with each Source point as the starting point to determine the associated tree nodes with which the data flow relationship exists with each Source point; restores the code according to the data flow order based on each Source point and the associated tree node to obtain the code slices of each Source point; constructs prompt words based on all code slices, inputs the prompt words into the large language model, and obtains the vulnerability identification results output by the large language model. That is, by constructing the prompt words of the large language model through the cut code segments, it avoids the problem of constructing the prompt words of the large language model through the full amount of code, which makes the model input too noisy and causes the large language model output result to have a high false alarm rate and missed alarm rate. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0035] Figure 1 A flowchart of a code vulnerability identification method provided by an embodiment of the present invention;

[0036] Figure 2 This is a structural block diagram of a code vulnerability identification device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0037] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0038] In the past, static source code vulnerability detection methods, vulnerability detection methods based on code similarity have high false positive and false negative rates when detecting variant vulnerabilities. Rule-based vulnerability detection methods rely on manual expert definition of rules, which cannot define all vulnerability rules and have high manual overhead. In recent years, with the rapid development of deep learning, new research ideas have been provided for the field of vulnerability detection.

[0039] The existing related technologies include code vulnerability analysis methods based on large language models. In the process of code vulnerability analysis based on large language models, the existing related technologies generally use the full amount of code as input to construct prompt words. Since not all codes in the full amount of code have a high correlation with the analysis of code vulnerabilities, the noise of the large language model input is too high, which affects the accuracy of code vulnerability identification.

[0040] The present invention aims to improve the accuracy and explainability of automatic code vulnerability analysis, and provides a new automatic code vulnerability analysis solution based on a large model. Code slicing is achieved through an abstract syntax tree and Source points, and prompt words of a large language model are constructed based on code slicing. The prompt words are input into the large language model to obtain vulnerability analysis results, and the prompt words and the large model are optimized through tuning technology based on the vulnerability analysis results to solve the existing technical problems in automatic code vulnerability analysis.

[0041] The following combination Figure 1 , Figure 1 A flowchart of a code vulnerability identification method provided by an embodiment of the present invention, the method may include:

[0042] S101: Determine a Source point of a parameter passed in from outside in a source code, construct an abstract syntax tree of the source code, and determine a Source tree node of the Source point in the abstract syntax tree.

[0043] The Source point in this embodiment refers to the starting position of the code segment that may cause security vulnerabilities, representing user input or data sources from the outside, that is, the position in the code where parameters can be passed in from the outside is called the Source point. Based on the Source point, external parameters can be received and bound from different sources. If the external parameters are controllable by the user and these parameters are not filtered and checked in the code, then there may be vulnerabilities in these places. Therefore, this embodiment can cut the source code based on the Source point to construct code slices, and construct the prompt words (Prompt) of the large language model based on the cut code slices to reduce the vulnerability missed reporting rate and false alarm rate.

[0044] This embodiment does not limit the specific method of determining the Source point in the source code, nor does it limit the specific type of the source code. When the source code is code in the JavaScript programming language, the Source point can be an annotation in the source code, such as @SessionAttribute, @ModelAttribute, @PathVariable, @RequestPart, @RequestParam, @RequestBody, @RequestHeader, etc. The above annotations can be used alone or in combination with the annotation @RequestMapping.

[0045] An abstract syntax tree is a tree data structure used to represent the structure of source code in computer programming. Source code is structured. The essence of code is not a string, but a data structure with complex topology. Using a string to represent source code will lose a lot of structural information. At the same time, it is difficult for a string to express the grammatical information and semantic information of the source code. In order to obtain complete representation information of the code (including grammatical structure and semantic information), this embodiment can construct an abstract syntax tree of the source code, convert the code in the source code into tree nodes, and convert the structural relationship between the codes into edges between tree nodes.

[0046] After the abstract syntax tree is constructed, this embodiment may determine the Source tree node corresponding to the Source point in the tree nodes in the abstract syntax tree.

[0047] S102: traverse the abstract syntax tree starting from each Source tree node to determine associated tree nodes having a data flow relationship with each Source tree node.

[0048] In this embodiment, each Source tree node can be used as a starting point for traversal in the abstract syntax tree, and associated tree nodes having a data flow relationship with each Source tree node can be determined from the tree nodes of the abstract syntax tree. That is, for any Source tree node, an associated tree node having a data flow relationship with the Source tree node can be determined from the tree nodes of the abstract syntax tree.

[0049] This embodiment does not limit the specific definition of data flow in the data flow relationship, and can generally include: data transfer based on function calls, data transfer based on method calls, variable assignment, object property assignment, information exchange between different parts of the source code based on method calls, information exchange between different parts of the source code based on return values, object initialization assignment based on constructors, etc.

[0050] Furthermore, to ensure that every part of the source code, including deeply nested code structures, is thoroughly analyzed, this embodiment can not only perform a loop traversal on the class where the Source tree node is located, but also add a loop traversal on other classes except the class where the Source tree node is located. That is, this embodiment can take each source tree node as the starting point in the abstract syntax tree, traverse all classes in the abstract syntax tree, and determine the associated tree nodes that have a data flow relationship with each source tree node.

[0051] S103: Code restoration is performed based on each Source tree node and the associated tree nodes of each Source tree node in the order of data flow to obtain code slices of each Source point.

[0052] In this embodiment, code restoration can be performed based on each Source tree node and the tree nodes associated with each Source tree node in the order of data flow to obtain code slices of each Source point. That is, for any Source tree node, the tree node is converted into corresponding code based on the Source tree node and the tree nodes associated with the Source tree node in the order of data flow to obtain the code slice of the Source point.

[0053] Since there may be multiple data flow branches in the data flow process starting from the Source tree node, this embodiment can determine the data flow branch starting from each Source tree node; based on each Source tree node and the associated tree nodes of each Source tree node, code restoration is performed according to the data flow order in each data flow branch to obtain code slices for each Source point.

[0054] This embodiment can perform code cutting based on the Source point to obtain code slices for each Source point, retaining only the code that has a data flow relationship with the Source point and excluding irrelevant code parts, thereby streamlining the Prompt while removing irrelevant information that may affect vulnerability analysis.

[0055] S104: Construct prompt words based on all code slices, input the prompt words into the large language model, and obtain the vulnerability identification results output by the large language model.

[0056] This embodiment can construct prompt words based on all code slices cut from the source code, input the prompt words into the large language model, and obtain the vulnerability identification results output by the large language model. This embodiment does not limit the specific type of the large language model, which can generally be an existing large language model or a large language model built and trained by the user.

[0057] This embodiment does not limit the specific method of constructing prompt words based on all code slices, which generally includes detailed technical descriptions, keywords, code slices and other information. Therefore, this embodiment can obtain keywords of vulnerability identification tasks and technical descriptions of code slices; construct prompt words based on keywords, technical descriptions and all code slices.

[0058] The constructed prompt words are input into the large language model. The large language model uses its deep learning and natural language processing capabilities to automatically identify and analyze security vulnerabilities in code slices. This embodiment does not limit the types of vulnerabilities that the large language model can identify.

[0059] Furthermore, in this embodiment, in order to help developers and security analysts deeply understand the impact of vulnerabilities and take corresponding remedial measures, the vulnerability identification results output by the large language model in this embodiment can include not only the vulnerability type but also the corresponding vulnerability exploitation chain information. That is, the prompt word is input into the large language model to obtain the vulnerability identification type and vulnerability exploitation chain information output by the large language model, and the vulnerability exploitation chain information can include a detailed explanation of the vulnerability exploitation chain and a specific vulnerability repair solution.

[0060] In order to further reduce the rate of missed reports and false positive reports of vulnerabilities, this embodiment can use tuning technology to optimize the prompt and large language model. These optimization measures can be a continuous process. Through manual judgment of the model output results, the prompt and model are adjusted and improved to achieve higher judgment quality, forming a positive cycle and continuously improving the performance of vulnerability analysis technology. That is, this embodiment can obtain the manual judgment results of code slices; determine the difference analysis data based on the manual judgment results and the vulnerability identification results; and update the large language model and / or prompt words based on the difference analysis data.

[0061] This embodiment can analyze the data through differential analysis to identify where the model has false positives or false negatives, and conduct case studies to understand why the model failed to identify correctly. The model is then optimized through model optimization technology, and the performance of the model is re-evaluated and continuously evaluated to ensure that the adjustment is effective. In addition, the knowledge and experience gained from manual judgment are integrated into the model to establish a feedback loop so that the model can continue to learn and improve. Ultimately, all adjustment and optimization processes should be recorded in detail for future reference and further analysis, so as to gradually narrow the gap between manual judgment and model output and improve the accuracy and reliability of the model.

[0062] When faced with differential analysis data between manual judgment results and model outputs, first of all, we must deeply understand the judgment logic of the model and its performance on specific vulnerability types, and identify the deficiencies of the model in judging specific vulnerability patterns through the differential results of manual judgment, such as false positives or omissions when dealing with complex database injections or cross-site scripting attacks. This embodiment can optimize the content of the Prompt through differential analysis data to ensure that it contains sufficient contextual information and keywords to guide the model to more accurately identify and analyze vulnerabilities in the code. In addition, this embodiment can continuously test and verify the response of the large language model to different Prompts, select those Prompts that can produce the most accurate output, and use them as the input of the model. In this way, the model can gradually learn how to more accurately identify and analyze vulnerabilities in the code, ultimately improving the accuracy and reliability of vulnerability judgment.

[0063] Based on the above embodiments, the method of the present invention performs code cutting through the Source points in the code, and constructs the prompt words of the large language model through the cut code segments, thereby avoiding the problem that the prompt words of the large language model are constructed through the full amount of code, which makes the noise of the model input too large and causes the false alarm rate and missed alarm rate of the large language model output result to be high.

[0064] The following combination Figure 2 , Figure 2 A structural block diagram of a code vulnerability identification device provided by an embodiment of the present invention, the device may include:

[0065] The first module 100 is used to determine a Source point of a parameter introduced from outside in a source code, construct an abstract syntax tree of the source code, and determine a Source tree node of the Source point in the abstract syntax tree;

[0066] The second module 200 is used to traverse the abstract syntax tree starting from each Source tree node to determine an associated tree node having a data flow relationship with each Source tree node;

[0067] The third module 300 is used to perform code restoration based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes according to the data flow order to obtain code slices of each of the Source points;

[0068] The fourth module 400 is used to construct prompt words based on all the code slices, input the prompt words into a large language model, and obtain a vulnerability identification result output by the large language model.

[0069] Based on the above embodiments, the method of the present invention performs code cutting through the Source points in the code, and constructs the prompt words of the large language model through the cut code segments, thereby avoiding the problem that the prompt words of the large language model are constructed through the full amount of code, which makes the noise of the model input too large and causes the false alarm rate and missed alarm rate of the large language model output result to be high.

[0070] Based on the above embodiment, the fourth module 400 may include:

[0071] The first unit is used to input the prompt word into the large language model to obtain the vulnerability identification type and vulnerability exploitation chain information output by the large language model.

[0072] Based on the above embodiments, the third module 300 may include:

[0073] The second unit is used to determine a data flow branch starting from each of the Source tree nodes;

[0074] The third unit is used to perform code restoration based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes according to the data flow order in each of the data flow branches to obtain the code slices of each of the Source points.

[0075] Based on the above embodiments, the fourth module 400 may include:

[0076] Unit 4, used to obtain keywords for vulnerability identification tasks and technical description of the code slices;

[0077] The fifth unit is used to construct prompt words based on the keywords, the technical description and all the code slices.

[0078] Based on the above embodiments, the method further includes:

[0079] The fifth module is used to obtain the manual judgment result of the code slice;

[0080] A sixth module is used to determine difference analysis data based on the manual research and judgment results and the vulnerability identification results;

[0081] The seventh module is used to update the large language model and / or the prompt word based on the difference analysis data.

[0082] Based on the above embodiments, the second module 200 may include:

[0083] The sixth unit is used to traverse all classes of the abstract syntax tree with each of the Source tree nodes as a starting point in the abstract syntax tree to determine the associated tree nodes having a data flow relationship with each of the Source tree nodes.

[0084] Based on the above embodiments, the data flow in the data flow relationship includes: data transfer based on function calls, data transfer based on method calls, variable assignment, object property assignment, information exchange between different parts of the source code based on method calls, information exchange between different parts of the source code based on return values, and object initialization assignment based on constructors.

[0085] Based on the above embodiments, the present invention further provides an electronic device, which may include a memory and a processor, wherein the memory stores a computer program, and when the processor calls the computer program in the memory, the steps provided in the above embodiments may be implemented. Of course, the device may also include various necessary network interfaces, power supplies, and other components.

[0086] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by an execution terminal or a processor, the method provided in the embodiment of the present invention can be implemented; the storage medium may include: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program codes.

[0087] In this article, relational terms such as first and second, etc. are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "comprise", "include" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.

[0088] The above is a detailed introduction to a method, device, equipment and storage medium provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for a person skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for identifying code vulnerabilities, characterized in that: include: Determine a Source point of a parameter passed in from outside in a source code, construct an abstract syntax tree of the source code, and determine a Source tree node of the Source point in the abstract syntax tree; Traversing the abstract syntax tree starting from each of the Source tree nodes to determine associated tree nodes having a data flow relationship with each of the Source tree nodes; Based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes, code restoration is performed in a data flow order to obtain code slices of each of the Source points; Prompt words are constructed based on all the code slices, and the prompt words are input into a large language model to obtain a vulnerability identification result output by the large language model.

2. The code vulnerability identification method according to claim 1, characterized in that: The step of inputting the prompt word into a large language model to obtain a vulnerability identification result output by the large language model includes: The prompt word is input into the large language model to obtain the vulnerability identification type and vulnerability exploitation chain information output by the large language model.

3. The code vulnerability identification method according to claim 1, characterized in that: The code restoration based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes is performed in a data flow order to obtain a code slice of each of the Source points, including: Determine a data flow branch starting from each of the Source tree nodes; Based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes, code restoration is performed according to the data flow order in each of the data flow branches to obtain the code slices of each of the Source points.

4. The code vulnerability identification method according to claim 1, characterized in that: The step of constructing prompt words based on all the code slices includes: Obtaining keywords for the vulnerability identification task and a technical description of the code slice; The prompt word is constructed based on the keyword, the technical description and all the code slices.

5. The code vulnerability identification method according to claim 1, characterized in that: Also includes: Obtaining manual analysis results of the code slice; Determine difference analysis data based on the manual research and judgment results and the vulnerability identification results; The large language model and / or the prompt word are updated based on the difference analysis data.

6. The method for identifying code vulnerabilities according to claim 1, characterized in that: The traversing the abstract syntax tree with each of the Source tree nodes as a starting point to determine associated tree nodes having a data flow relationship with each of the Source tree nodes includes: In the abstract syntax tree, each Source tree node is taken as a starting point, and all classes in the abstract syntax tree are traversed to determine the associated tree nodes that have a data flow relationship with each Source tree node.

7. The code vulnerability identification method according to claim 1, characterized in that: The data flow in the data flow relationship includes: data transfer based on function calls, data transfer based on method calls, variable assignment, object attribute assignment, information exchange between different parts of the source code based on method calls, information exchange between different parts of the source code based on return values, and object initialization assignment based on constructors.

8. A code vulnerability identification device, characterized in that: include: The first module is used to determine a Source point of a parameter passed in from the outside in a source code, construct an abstract syntax tree of the source code, and determine a Source tree node of the Source point in the abstract syntax tree; The second module is used to traverse the abstract syntax tree starting from each Source tree node to determine an associated tree node having a data flow relationship with each Source tree node; The third module is used to perform code restoration based on each of the Source tree nodes and the associated tree nodes of each of the Source tree nodes in a data flow order to obtain code slices of each of the Source points; The fourth module is used to construct prompt words based on all the code slices, input the prompt words into the large language model, and obtain the vulnerability identification results output by the large language model.

9. An electronic device, characterized in that: include: Memory, for storing computer programs; A processor, configured to implement the code vulnerability identification method as claimed in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by a processor, the code vulnerability identification method according to any one of claims 1 to 7 is implemented.

Citation Information

Cited By

  • Software testing method and system based on large model

    CN119441065A