Method and system for removing vulnerabilties in software code

The use of machine learning algorithms to automate the elimination of vulnerabilities in program code addresses the labor-intensive and error-prone manual processes, enhancing software security and development efficiency by converting source code into vulnerability-free versions.

WO2024232777A1PCT designated stage expired Publication Date: 2024-11-14PUBLICHNOE AKTSIONERNOE OBSHCHESTVO SBERBANK ROSSIA

Patent Information

Application Number
PCT/RU2023/000143
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-05-11
Publication Date
2024-11-14

AI Technical Summary

Technical Problem

Current methods for software development in large financial organizations, such as banks, are labor-intensive and time-consuming due to the manual checking of vulnerabilities in program code by cybersecurity experts, which increases verification time and is prone to human error, without an effective automated solution for eliminating vulnerabilities.

Method used

A computer-implemented method using machine learning algorithms to automate the process of checking and eliminating vulnerabilities in program code by converting source code into abstract syntax trees, processing them through machine learning models to generate vulnerability-free code, thereby speeding up the vulnerability elimination process.

Benefits of technology

This approach significantly increases software security by automating the elimination of vulnerabilities, reducing development time, and enhancing the reliability of software by eliminating potential threats and errors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure RU2023000143_14112024_PF_FP_ABST
    Figure RU2023000143_14112024_PF_FP_ABST
Patent Text Reader

Abstract

A method for removing vulnerabilities in software code is implemented by a processor and contains the steps of: obtaining data about vulnerabilities in a software code (101); obtaining, on the basis of the preceding step, data containing at least a block of source code and the type of a detected vulnerability (102); converting the source code containing a vulnerability into an abstract syntax tree (AST) (103, 104); generating an ordered sequence (105) that represents the types of each element of a path; processing the ordered sequence using an encoding machine learning model (106); processing a matrix of hidden sequences using a generative machine learning model (107); transferring the ordered sequence obtained in the preceding step into a block of source code (108) that is equivalent in function to the original block of source code. The method provides enhanced software security by removing vulnerabilities in software code.
Need to check novelty before this filing date? Find Prior Art

Description

A METHOD AND SYSTEM FOR ELIMINATING VULNERABILITIES IN SOFTWARE CODE AREA OF TECHNOLOGY

[0001] The claimed technical solution generally relates to the field of computer technology, and in particular to an automated method and system for eliminating vulnerabilities in software code using machine learning algorithms. LEVEL OF TECHNOLOGY

[0002] With the development of information technology, IT solutions (“Information technology” Information technology (IT) has begun to have a significant impact on all spheres and industries of life. Currently, various companies and organizations are actively implementing and utilizing IT solutions within their structures.

[0003] Developing software for large financial institutions (such as banks) is always labor-intensive and painstaking. Furthermore, when developing a software product, it's necessary to consider all risks of vulnerabilities in the code. These checks involve cybersecurity experts who manually check for vulnerabilities in the software code of the product being developed, which significantly increases the time required for verification and also does not eliminate the possibility of human error.

[0004] Known in the art is patent US 8631384B2 "Creating a Test Progression Plan," patent holder: IBM, published: December 1, 2011. This solution describes an automated process for generating software test plans. This known solution automatically generates a software test execution plan by calculating, for each unit of the testing period, the effort to execute test blocks (ATTx) and the effort to complete test block (CCx). Three variables characterizing the testing strategy are introduced into the calculation: efficiency, which represents the effectiveness of the testing team, the defect density ratio, and the verification coefficient value. When selecting a testing strategy, the test manager determines the values ​​of the three variables that influence the development plan.During test execution, the cumulative "attempt" curve of ATTx values ​​and the cumulative "completion" curve of CCx values ​​allow the test manager to compare the effort already undertaken with the expected effort to be undertaken. test units that were undertaken and for test units that were completed, that is, when the defects found in the code were corrected.

[0005] A disadvantage of known solutions in this area of ​​technology is the lack of the ability to automatically eliminate vulnerabilities in software code. DISCLOSURE OF THE INVENTION

[0006] The proposed technical solution proposes a new approach to eliminating vulnerabilities in software code. This solution uses a machine learning algorithm that automates the code review process and significantly accelerates the process of remediating vulnerabilities in software code.

[0007] This solves the technical problem of automated elimination of vulnerabilities in software code.

[0008] The technical result achieved by solving this problem is an increase in software security by eliminating vulnerabilities in the program code.

[0009] The specified technical result is achieved by implementing a computer-implemented method for eliminating vulnerabilities in software code, performed using at least one processor and containing the following stages: - receive data about vulnerabilities in software code; - based on the previous stage, obtain data containing at least a block of source code and the type of vulnerability detected; - transform the source code containing the vulnerability into an abstract syntax tree (AST), in which internal nodes are mapped to programming language operators, and leaves to corresponding operands; - form a path to bypass vertices in the AST; - form an ordered sequence that represents the types of each path element; - process the ordered sequence using a machine learning coding model trained on ordered sequences of vulnerability data, during which they obtain representation of an ordered sequence as a matrix of hidden states; - process the matrix of hidden sequences using a generative machine learning model trained on matrices of hidden states of sequences for vulnerabilities, sequences without vulnerabilities and their source codes, during which a new ordered sequence is obtained that corresponds to the source program code in terms of the functions performed, but with the vulnerability eliminated in it; - translate the ordered sequence obtained at the previous stage into a block of source code that is equivalent in functionality to the original block of source code.

[0010] In one particular embodiment of the method, the ordered sequence that represents the types of each path element is multidimensional and represents a graph. [UN] In another particular embodiment of the method, the source code containing the vulnerability is converted into a control flow graph (CFG), in which the internal nodes are mapped to programming language operators, and the leaves to the corresponding operands.

[0012] In another particular embodiment of the method, the source code containing the vulnerability is converted into a control dependency graph (CDG), in which the internal nodes are mapped to programming language operators, and the leaves to the corresponding operands.

[0013] In another particular embodiment of the method, the source code containing the vulnerability is converted into a data dependency graph (DDG), in which the internal nodes are mapped to programming language operators, and the leaves to the corresponding operands.

[0014] In another particular embodiment of the method, the source code containing the vulnerability is converted into a program dependency graph (PDG), in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

[0015] In another particular embodiment of the method, the source code containing the vulnerability is converted into a code property graph (CPG), in which The internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

[0016] In addition, the stated technical result is achieved through a system for eliminating vulnerabilities in software code, which contains: - at least one processor; - at least one memory connected to the processor, which contains machine-readable instructions that, when executed by at least one processor, ensure the implementation of the claimed method. BRIEF DESCRIPTION OF DRAWINGS

[0017] Fig. 1 illustrates a block diagram of the claimed method.

[0018] Fig. 2 illustrates an example of the general view of a computing system that ensures the implementation of the claimed solution. IMPLEMENTATION OF THE INVENTION

[0001] Below, the concepts and terms necessary for understanding this technical solution will be described.

[0002] A model in machine learning (ML) is a set of artificial intelligence methods whose characteristic feature is not a direct solution to a problem, but learning in the process of applying solutions to many similar problems.

[0003] A software vulnerability is a flaw in a system that can be exploited to intentionally compromise its integrity and cause it to malfunction. Vulnerabilities can result from programming errors, design flaws, weak passwords, viruses and other malware, or script and SQL injections. Vulnerabilities can be exploitable or unexploitable.

[0004] Exploit - a computer program, a fragment of program code, or a sequence of commands that takes advantage of vulnerabilities in software and is used to carry out an attack on a computing system.

[0005] Exploitable vulnerability - A vulnerability in software for which an exploit can be created and applied.

[0006] AST - Abstract Syntax Tree. A finite labeled tree in which internal nodes are mapped to programming language operators and leaves to corresponding operands.

[0007] The F-1 measure is a joint assessment of precision and recall.

[0008] ROC curve is a graphical characteristic of the quality of a binary classifier, reflecting the dependence of the proportion of true-positive classifications on the proportion of false-positive classifications when varying the threshold of the decision rule.

[0009] A confusion matrix is ​​a way to divide the objects being classified into four categories depending on the combination of the actual class and the classifier response.

[0010] Connectors are software components that collect data from information sources (Task Management System / Release Collaboration System / Version Management System / Project Management System / Enterprise Service Management System / etc.) and convert the data to the required structure and format. [UN] Warehouse - a system for storing large volumes of data collected and processed by connectors, as well as data generated by other system components.

[0012] This technical solution can be implemented on a computer, in the form of an automated information system (AIS) or a machine-readable medium containing instructions for performing the above-mentioned method.

[0013] The technical solution can be implemented in the form of a distributed computer system.

[0014] In this solution, the term “system” refers to a computer system, a computer (electronic computer), a numerical control (CNC), a PLC (programmable logic controller), computerized control systems, and any other devices capable of performing a given, clearly defined sequence of computing operations (actions, instructions).

[0015] A command processing device is an electronic unit or integrated circuit (microprocessor) that executes machine instructions (programs) /

[0016] The command processing unit reads and executes machine instructions (programs) from one or more data storage devices, such as devices such as as random access memory (RAM) and / or read-only memory (ROM). ROM can include, but is not limited to, hard drives (HDD), flash memory, solid-state drives (SSD), optical storage media (CD, DVD, BD, MD, etc.), etc.

[0017] A program is a sequence of instructions intended for execution by a computer control device or a command processing device.

[0018] Preparing data for training.

[0019] The model was trained using historical data on software vulnerabilities, divided into two classes: vulnerable code (class 1) and non-vulnerable code (class 0).

[0020] The machine learning model for each vulnerability type is trained using pre-labeled data. At the time of model creation, between 2,178 and 55,949 vulnerabilities were available, depending on the vulnerability type, discovered within a given timeframe (e.g., 1-3 months).

[0021] The training set consisted exclusively of unique vulnerabilities, ranging from 153 to 2,147 depending on the vulnerability type. To evaluate the model's quality, the dataset was split into two parts: training and validation sets. The split was random, with 70% assigned to the training set and 30% to the validation set.

[0022] The weighted f-1 score for all classifiers is on average around 0.89.

[0023] As shown in Fig. 1, the computer-implemented method for eliminating vulnerabilities in software code (100) consists of several stages performed by at least one processor.

[0024] At stage (101), data on vulnerabilities in the software code is obtained.

[0025] At this stage, vulnerability data is obtained. In one particular embodiment of the invention, this data is obtained by scanning the program code using the SAST (Static Application Security Testing) tool.

[0026] Next, at step (102), data is obtained based on the previous step, containing at least the source code file and the type of vulnerability detected.

[0027] Next, at step (103), the source code containing the vulnerability is converted into an abstract syntax tree (AST), in which the internal nodes are mapped to programming language operators, and the leaves to the corresponding operands.

[0028] At this stage, syntactic analysis (parsing) of the source code contained in the file obtained at Stage (103) and written in any programming language (Java, C#, ASP, Visual Basic, C, C++, PHP, Apex, Ruby, JavaScript, VBScript, Perl, Swift, Python, Groovy, Scala, etc.) is performed, the result of which is a parse tree or an abstract syntax tree displaying the dependencies between all elements of the source code, containing information about their positions in the source code (line number of the beginning of the element, column number of the beginning of the element, line number of the end of the element, column number of the end of the element), their classes, such as expressions, statements, declarations, etc., the types of their classes, their names, their parent and inherited elements, comments to them, etc.

[0029] In one of the particular implementation options of the claimed technical solution, the source code containing the vulnerability is converted into a control flow graph (CFG), in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

[0030] In another particular embodiment of the claimed technical solution, the source code containing the vulnerability is converted into a control dependency graph (CDG), in which the internal nodes are mapped to programming language operators, and the leaves to the corresponding operands.

[0031] In another particular embodiment of the claimed technical solution, the source code containing the vulnerability is converted into a data dependency graph (DDG), in which the internal nodes are mapped to programming language operators, and the leaves to the corresponding operands.

[0032] In another particular embodiment of the claimed technical solution, the source code containing the vulnerability is converted into a program dependency graph (PDG), in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

[0033] In another particular embodiment of the claimed technical solution, the source code containing the vulnerability is converted into a code property graph (CPG), in which the internal nodes are mapped to programming language operators, and the leaves to the corresponding operands.

[0034] Next, at step (104), a path for traversing the AST vertices is formed.

[0035] Next, at step (105), an ordered sequence is formed that represents the types of each element.

[0036] At this stage, from the path of traversal of vertices in the AST, formed in stage (105), in which each element contains the information obtained in stage (104), an ordered sequence of element class types (vertex types) of this path is formed.

[0037] In one particular embodiment of the invention, the ordered sequence representing the types of each path element is multidimensional and is a graph (a graph representation of an abstract syntax tree (AST).

[0038] Next, at step (106), the ordered sequence is processed using a machine learning (ML) coding model trained on ordered sequences of vulnerability data, during which a representation of the ordered sequence is obtained in the form of a matrix of hidden states.

[0039] At this stage, a dictionary of all possible AST node class types obtained in Stage (103) is formed. The values ​​of this dictionary for each sequence formed in Stage (105) will be the numbers of corresponding types present in the given sequence and / or N-grams of such types. From the values ​​of this dictionary, a numerical vector of the same dimension is formed for all sequences using at least one of the methods. • Bag-of-words • One-hot encoding (ONE) • Encoding the dictionary with unique indices • Word2Vec • Vector representations of types - “Embedding” and / or their combinations.

[0040] To obtain Embedding types, technologies such as neural networks can be used: Fully Connected, Recurrent, Convolutional, Transformers. In one particular embodiment of the invention, pre-trained neural networks are used to obtain vector representations of types, such as DistilBERT: smaller, faster, cheaper, lighter; ALBERT (Lite BERT Google); TinyBERT; T-NLG (Turing Natural Language). Generation); USE (Universal Sentence Encoder); ELMo (Embeddings from Language Models) or networks inherited from them.

[0041] Vectorization To extract features from the generated dictionaries, the TF-IDF (term-frequency times inverse document-frequency) vectorization method was used. The vectorizer was trained on a training set without stop words (stop_words=None) and without IDF. Given the size of the training set and the presence of very common features in each element, the IDF component would not be able to calculate specific features for each dictionary. 1- and 2-gram vectorizations were used (the parameter was selected empirically).

[0042] Training a machine learning model To obtain a matrix of latent sequences, an encoder (coding) block of a generative machine learning model is used. This block can be an embedding layer, randomly trained or initialized. Further neural networks can be used: fully connected, recurrent, convolutional, or transformer. In one particular embodiment of the invention, the encoder block is at least one layer of a neural network of the following types: Recurrent neural networks (RNN), Long short term memory (LSTM), Gated recurrent units (GRU), Neural Turing machines (NMT), Bidirectional RNN, LSTM and GRU (BiRNN, BiLSTM and BiGRU), Deep residual networks (DRN), Echo state networks (ESN), Liquid state machines (LSM), Kohonen self-organizing map (KN, or organizing (feature) map, SOM, SOFM).

[0043] Next, at step (107), the matrix of hidden sequences is processed using a generative machine learning (ML) model trained on matrices of hidden states of sequences for vulnerabilities, sequences without vulnerabilities, and their source codes, during which a new ordered sequence is obtained that corresponds to the source program code in terms of the functions performed, but with the vulnerability eliminated in it.

[0044] This processing is performed by the generator (decoder) block of the generative machine learning model. This block can be a Variational Autoencoder (VAE) type decoder, Deep Learning Methods, limited Boltzmann machine (RBM), Deep Belief Network (DBN), neural networks: Fully connected, Recurrent, Convolutional, Transformers.

[0045] In one particular embodiment of the invention, the decoder block is at least one layer of a neural network of the following types: Convolutional neural networks (CNN), Recurrent neural networks (RNN), Long short term memory (LSTM), Gated recurrent units (GRU), Neural Turing machines (NMT), Bidirectional RNN, LSTM and GRU (BiRNN, BiLSTM and BiGRU), Deep residual networks (DRN), Echo state networks (ESN), Liquid state machines (LSM), Kohonen self-organizing map (KN, or organizing (feature) map, SOM, SOFM).

[0046] In one particular embodiment of the invention, generative adversarial networks (GAN) are used as a machine learning model. This generative adversarial network may contain an encoder block with the layers specified in the section above. It may contain a decoder block with the layers specified in the section above. The discriminator block (discriminant model) in one particular embodiment of the invention contains neural networks: Fully Connected, Recurrent, Convolutional, Transformers; Classifiers: DecisionTree, LogRegression, Bayes, SVM, K-means, RandomForest, gradient boosting: XGBoost, LightGBM.

[0047] Training proceeds as follows: operations are performed on two groups of program code blocks, where the first blocks of program code are vulnerable code, and the second blocks of program code are not vulnerable code. These blocks are converted into an ordered sequence of AST tree elements according to steps (101)–(106).

[0048] Next, a vulnerable code sequence, A, and a corresponding non-vulnerable code sequence, B, are obtained. The resulting sequence, A (the code with the vulnerability), is fed to the encoder (coding) block of the generative machine learning model. A hidden state matrix (107) is obtained. This hidden state matrix is ​​fed to the generator (decoder) block of the generative machine learning model (108). A new (recovered) ordered sequence, B, is obtained. This sequence (B) is compared with the original sequence B (code without the vulnerability). The resulting discrepancies are converted into a quantitative characteristic using the selected loss function. This quantitative characteristic is used to train the neural network using the selected learning algorithm.

[0049] In one particular embodiment of the invention, at least one of the loss functions is used: KLD (Calculates the Kulbeck-Leibler divergence loss between the true value and the predicted value), MAE (Calculates the mean absolute error between labels and predictions), MAPE (Calculates the mean absolute percentage error between the true value and the predicted value), MSE (Calculates the root mean square error between labels and predictions), MSLE (Calculates the root mean square logarithmic error between the true value and the predicted value), binary crossentropy (Calculates the binary crossentropy loss), binary focal crossentropy (Calculates the binary focal crossentropy loss), categorical crossentropy (Calculates the categorical crossentropy loss), categorical hinge (Calculates the categorical "lasso" loss between the true value and the predicted value), cosine similarity (Calculates the cosine similarity between labels and predictions),hinge (Calculates the hinge loss between the true value and the predicted value), huber (Calculates the Huber loss), kl divergence (Calculates the Kullback-Leibler divergence loss between the true value and the predicted value), kullback leibler divergence (Calculates the Kullback-Leibler divergence loss between the true value and the predicted value), log cosh (Logarithm of the hyperbolic cosine of the prediction error), logcosh (Logarithm of the hyperbolic cosine of the prediction error), mean absolute error (Calculates the mean absolute error between labels and predictions), mean_absolute_percentage_error (Calculates the mean absolute percentage error between the true value and the predicted value), mean squared error (Calculates the mean squared error between labels and predictions), mean squared logarithmic error (Calculates the root mean squared logarithmic error between the true value and the predicted value),poisson (Computes the Poisson loss between the true value and the predicted value), sparse categorical crossentropy (Computes the sparse categorical crossentropy loss), squared hinge (Computes the squared lasso loss between the true value and the predicted value). These loss functions are often labeled as: binary cross entropy, binary cross entropy with logits, poisson_nll loss, cosine embedding loss, cross entropy, ctc loss, gaussian nll loss, hinge embedding loss, kl div, ll loss, mse loss, margin ranking loss, multilabel margin loss, multilabel soft margin loss, multi margin loss, nll loss, huber loss, smooth ll loss, soft margin loss, tripletjmargin loss, triplet_margin with distance loss.

[0050] In one particular embodiment of the invention, at least one of the following training algorithms is used: Adadelta, Adagrad, Adam, AdamW, SparseAdam, Adamax, ASGD, LBFGS, NAdam, RAdam, RMSprop, Rprop, FTRL, SGD, FastSGD, SGD-Nesterov, SAGA, SAGA+.

[0051] Next, at step (108), the ordered sequence obtained at the previous step is translated into a block of source code that is equivalent in functionality to the original block of source code.

[0052] As a result, this approach allows for the formation and prioritization of tasks to eliminate deficiencies in the software being developed, thereby increasing the speed of software code development, reducing the number of errors in the software code, and also directly impacting the security of the software code, which ensures an increase in the speed of software updates or the release of software to the market by eliminating vulnerabilities and increasing the reliability of the software from the actions of attackers aimed at: • Theft of sensitive information • Causing reputational or financial damage to an organization or user • Destruction of important data or obstruction of access to important data • Distortion of information • Theft of funds.

[0053] Fig. 2 shows an example of a general view of a computing system (300) that ensures the implementation of the claimed method or is part of a computer system, for example, a server, a personal computer, part of a computing cluster, processing the necessary data for the implementation of the claimed technical solution.

[0054] In general, the system (300) comprises one or more processors (301), memory means such as RAM (302) and ROM (303), input / output interfaces (304), input / output devices (1105), and a device for network interaction (306), united by a common information exchange bus.

[0055] The processor (301) (or several processors, a multi-core processor, etc.) can be selected from a range of devices that are widely used at present, for example, from such manufacturers as: Intel™, AMD™, Apple™, Samsung Exynos™, MediaTEK™, Qualcomm Snapdragon™, etc. Under the processor or one of the processors used in the system (300), it is also necessary to take into account a graphic processor, for example, NVIDIA GPU or Graphcore, the type of which is also suitable for the full or partial implementation of the method, and can also be used for training and applying machine learning models in various information systems.

[0056] RAM (302) is random access memory (RAM) and is designed to store machine-readable instructions executed by the processor (301) to perform the necessary logical data processing operations. RAM (302) typically contains executable instructions from the operating system and corresponding software components (applications, software modules, etc.). The available memory of a graphics card or graphics processor (GPU) can also serve as RAM (302).

[0057] ROM (303) is one or more permanent data storage devices, such as a hard disk drive (HDD), a solid-state drive (SSD), flash memory (EEPROM, NAND, etc.), optical storage media (CD-R / RW, DVD-R / RW, BlueRay Disc, MD), etc.

[0058] Various types of I / O interfaces (304) are used to organize the operation of system components (300) and to organize the operation of external connected devices. The choice of the appropriate interfaces depends on the specific design of the computing device, which may include, but are not limited to: PCI, AGP, PS / 2, IrDa, FireWire, LPT, COM, SATA, IDE, Lightning, USB (2.0, 3.0, 3.1, micro, mini, type C), TRS / Audio jack (2.5, 3.5, 6.35), HDMI, DVI, VGA, Display Port, RJ45, RS232, etc.

[0059] To ensure user interaction with the computing system (300), various means (305) of I / O information are used, for example, a keyboard, a display (monitor), a touch display, a touchpad, a joystick, a mouse, a light pen, a stylus, a touch panel, a trackball, speakers, a microphone, augmented reality means, optical sensors, a tablet, light indicators, a projector, a camera, biometric identification means (a retinal scanner, a fingerprint scanner, a voice recognition module), etc.

[0060] The network interaction means (306) ensures the transmission of data via an internal or external computer network, for example, an Intranet, the Internet, a LAN, etc. One or more means (306) may be, but are not limited to: an Ethernet card, a GSM modem, a GPRS modem, an LTE modem, a 5G modem, a satellite communication module, an NFC module, a Bluetooth and / or BLE module, a Wi-Fi module, etc.

[0061] The submitted application materials disclose preferred examples of the implementation of the technical solution and should not be interpreted as limiting other, particular examples of its implementation that do not go beyond the scope of the requested legal protection, which are obvious to specialists in the relevant field of technology.

Claims

FORMULA 1. A computer-implemented method for eliminating vulnerabilities in software code, executed using at least one processor and comprising the steps of: - receive data about vulnerabilities in software code; - based on the previous stage, obtain data containing at least a block of source code and the type of vulnerability detected; - transform the source code containing the vulnerability into an abstract syntax tree (AST), in which internal nodes are mapped to programming language operators and leaves to corresponding operands; - form a path to bypass vertices in the AST; - form an ordered sequence that represents the types of each path element; - process the ordered sequence using a machine learning coding model trained on ordered sequences of vulnerability data, during which a representation of the ordered sequence is obtained in the form of a matrix of hidden states; - process the matrix of hidden sequences using a generative machine learning model trained on matrices of hidden states of sequences for vulnerabilities, sequences without vulnerabilities and their source codes, during which a new ordered sequence is obtained that corresponds to the source program code in terms of the functions performed, but with the vulnerability eliminated in it; - translate the ordered sequence obtained at the previous stage into a block of source code that is equivalent in functionality to the original block of source code.

2. The method according to claim 1, characterized in that the ordered sequence, which represents the types of each element of the path, is multidimensional and represents a graph.

3. The method according to paragraph 1, characterized in that the source code containing the vulnerability is converted into a control flow graph (CFG), in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

4. The method according to claim 1, characterized in that the source code containing the vulnerability is converted into a control dependency graph (CDG) in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

5. The method according to claim 1, characterized in that the source code containing the vulnerability is converted into a data dependency graph (DDG), in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

6. The method according to claim 1, characterized in that the source code containing the vulnerability is converted into a program dependency graph (PDG), in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

7. The method according to claim 1, characterized in that the source code containing the vulnerability is converted into a code property graph (CPG) in which the internal nodes are associated with programming language operators, and the leaves with the corresponding operands.

8. A system for eliminating vulnerabilities in software code, comprising at least one processor and memory storing machine-readable instructions that, when executed by the processor, implement the method according to any of paragraphs 1-7.

Citation Information

Patent Citations

  • Code homology detection method based on code fingerprint and device thereof

    CN107169358A

  • Function-level code vulnerability detection method based on slice attribute graph representation learning

    CN112699377A

  • Method and system for identifying exploited vulnerabilities in the program code

    RU2790005C1

  • System and method for information flow analysis of application code

    US11514172B2

  • Locating security vulnerabilities in source code

    US20130167241A1

Cited By

  • Method for determining influenced function of system based on change code and related device

    CN120045440A