Automatic code auditing method and system

Through automated code auditing methods and systems, data scanning and parsing combined with automatic audit tools are used to solve the problem of inefficient code auditing in the existing technology, intelligent and automated code auditing is realized, and the accuracy and reliability of audits are improved. .

CN119442236APending Publication Date: 2025-02-14GUANGZHOU SHIYUE NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411571431.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-14

AI Technical Summary

Technical Problem

The existing code audit methods mainly rely on manual inspections, resulting in inefficiency and waste of resources, and lack of intelligent and automated solutions.

Method used

An automated code audit method and system is proposed. Through the combination of data scanning, analysis and automatic audit tools, automatic code review is realized, visual audit results are generated, and pushed to the target receiving object through the operation and maintenance platform.

Benefits of technology

It improves the intelligence and efficiency of code audits, enhances the accuracy and reliability of audits, reduces manual errors, and improves code quality and security.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119442236A_ABST
    Figure CN119442236A_ABST
Patent Text Reader

Abstract

The invention discloses an automatic code auditing method and system, and the method comprises the steps: determining a to-be-audited code, carrying out the data scanning operation of the to-be-audited code, and obtaining a data scanning result; wherein the data scanning result comprises a plurality of code data; analyzing the data scanning result to obtain a data analysis result; and based on a predetermined automatic auditing tool, executing a code auditing operation on the data analysis result to obtain a code auditing result corresponding to the to-be-audited code. It can be seen that automatic code auditing can be achieved, the intelligence and efficiency of code auditing can be improved, and the accuracy and reliability of code auditing can be further 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 auditing, and in particular to an automated code auditing method and system. Background Art

[0002] With the continuous development of science and technology, information technology has also developed. Information security has become a matter of great concern to people, and the security of the program codes used in information systems plays a decisive role in the degree of information security.

[0003] Currently, most code auditing methods are conducted manually, which involves checking and analyzing the code line by line to find security vulnerabilities in the code. However, this method relies on manual review of the code word by word, which results in low code auditing efficiency and wastes human resources. Therefore, it is particularly important to provide a new code auditing method to improve the efficiency and intelligence of code auditing. Summary of the invention

[0004] The present invention provides an automated code auditing method and system, which can realize automated code auditing, help improve the intelligence and efficiency of code auditing, and further help improve the accuracy and reliability of code auditing.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses an automated code auditing method, the method comprising:

[0006] Determine the code to be audited, perform a data scanning operation on the code to be audited, and obtain a data scanning result; wherein the data scanning result includes a plurality of code data;

[0007] Performing a parsing operation on the data scanning result to obtain a data parsing result;

[0008] A code review operation is performed on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited.

[0009] As an optional embodiment, in the first aspect of the present invention, the method further comprises:

[0010] Determine a target recipient corresponding to the code audit result, and push the code audit result to the target recipient through a predetermined operation and maintenance platform;

[0011] The target receiving device includes a code database corresponding to the code to be audited and / or a terminal corresponding to the target receiving object.

[0012] As an optional embodiment, in the first aspect of the present invention, the method further comprises:

[0013] Based on the code audit result, determine the code review information corresponding to the code to be audited, wherein the code review information includes one or more of code security information and code specification information corresponding to the code to be audited;

[0014] Based on the code review information, a visual audit result corresponding to the code to be audited is generated, and the visual audit result is transmitted to a predetermined operation and maintenance platform, so as to display the visual audit result in a preset display device through the predetermined operation and maintenance platform.

[0015] As an optional implementation, in the first aspect of the present invention, performing a parsing operation on the data scanning result to obtain a data parsing result includes:

[0016] Transmitting all the code data included in the data scanning result to a predetermined repository manager, and performing a data parsing operation on all the code data by the predetermined repository manager to obtain a data parsing result;

[0017] The data analysis operation includes one or more of a data classification analysis operation and a data cleaning operation.

[0018] As an optional implementation, in the first aspect of the present invention, the code review operation is performed on the data parsing result based on the predetermined automatic audit tool to obtain the code audit result corresponding to the code to be audited, including:

[0019] Based on the predetermined automatic audit tool, a format adjustment operation is performed on all the code data included in the data analysis result to obtain the code data after the format adjustment, and a code review operation is performed on all the code data through the predetermined automatic audit tool to obtain the code audit result corresponding to the code to be audited;

[0020] The code review operation includes one or more of a code security review operation and a code specification review operation.

[0021] As an optional implementation, in the first aspect of the present invention, before performing the parsing operation on the data scanning result to obtain the data parsing result, the method further includes:

[0022] Determining whether there is data to be eliminated in the data scanning result;

[0023] When it is determined that the data to be eliminated exists in the data scanning result, a data filtering operation is performed on the data to be eliminated included in the data scanning result to obtain a data filtering result;

[0024] Based on the data filtering result, an update operation is performed on the data scanning result, and the analysis operation on the data scanning result is triggered to obtain the data analysis result.

[0025] As an optional implementation, in the first aspect of the present invention, performing a data filtering operation on the data to be removed included in the data scanning result to obtain a data filtering result includes:

[0026] According to the data to be removed, performing a data filtering operation on the data to be removed included in the data scanning result to obtain at least one filtered data block;

[0027] A data combination operation is performed on all the filtered data blocks to obtain a data filtering result.

[0028] A second aspect of the present invention discloses an automated code auditing system, the system comprising:

[0029] A determination module is used to determine the code to be audited;

[0030] A scanning module, used to perform a data scanning operation on the code to be audited to obtain a data scanning result; wherein the data scanning result includes a plurality of code data;

[0031] An analysis module, used to perform an analysis operation on the data scanning result to obtain a data analysis result;

[0032] The review module is used to perform a code review operation on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited.

[0033] As an optional implementation, in the second aspect of the present invention, the determination module is further used to determine a target receiving object corresponding to the code audit result;

[0034] The device also includes:

[0035] A push module, used to push the code audit result to the target recipient through a predetermined operation and maintenance platform;

[0036] The target receiving device includes a code database corresponding to the code to be audited and / or a terminal corresponding to the target receiving object.

[0037] As an optional implementation, in the second aspect of the present invention, the determination module is further used to determine the code review information corresponding to the code to be audited based on the code audit result, wherein the code review information includes one or more of code security information and code specification information corresponding to the code to be audited;

[0038] The device also includes:

[0039] A generation module, used to generate a visual audit result corresponding to the code to be audited according to the code review information;

[0040] The display module is used to transmit the visual audit result to a predetermined operation and maintenance platform so as to display the visual audit result in a preset display device through the predetermined operation and maintenance platform.

[0041] As an optional implementation, in the second aspect of the present invention, the parsing module performs a parsing operation on the data scanning result, and a specific method of obtaining the data parsing result includes:

[0042] Transmitting all the code data included in the data scanning result to a predetermined repository manager, and performing a data parsing operation on all the code data by the predetermined repository manager to obtain a data parsing result;

[0043] The data analysis operation includes one or more of a data classification analysis operation and a data cleaning operation.

[0044] As an optional implementation, in the second aspect of the present invention, the review module performs a code review operation on the data parsing result based on a predetermined automatic audit tool, and a specific method for obtaining the code audit result corresponding to the code to be audited includes:

[0045] Based on the predetermined automatic audit tool, a format adjustment operation is performed on all the code data included in the data analysis result to obtain the code data after the format adjustment, and a code review operation is performed on all the code data through the predetermined automatic audit tool to obtain the code audit result corresponding to the code to be audited;

[0046] The code review operation includes one or more of a code security review operation and a code specification review operation.

[0047] As an optional implementation, in the second aspect of the present invention, the device further includes:

[0048] A judgment module, used for judging whether there is data to be eliminated in the data scanning result before the parsing module performs a parsing operation on the data scanning result to obtain the data parsing result;

[0049] A filtering module, configured to perform a data filtering operation on the data to be eliminated included in the data scanning result to obtain a data filtering result when the judging module judges that the data to be eliminated exists in the data scanning result;

[0050] The updating module is used to perform an updating operation on the data scanning result based on the data filtering result, and trigger the parsing module to perform the parsing operation on the data scanning result to obtain the data parsing result.

[0051] As an optional implementation, in the second aspect of the present invention, the filtering module performs a data filtering operation on the data to be removed included in the data scanning result, and a specific method of obtaining the data filtering result includes:

[0052] According to the data to be removed, performing a data filtering operation on the data to be removed included in the data scanning result to obtain at least one filtered data block;

[0053] A data combination operation is performed on all the filtered data blocks to obtain a data filtering result.

[0054] A third aspect of the present invention discloses another automated code auditing system, the system comprising:

[0055] A memory storing executable program code;

[0056] a processor coupled to the memory;

[0057] The processor calls the executable program code stored in the memory to execute the automated code auditing method disclosed in the first aspect of the present invention.

[0058] A fourth aspect of the present invention discloses a computer storage medium, wherein the computer storage medium stores computer instructions, and when the computer instructions are called, they are used to execute the automated code auditing method disclosed in the first aspect of the present invention.

[0059] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0060] In the embodiment of the present invention, the code to be audited is determined, a data scanning operation is performed on the code to be audited, and a data scanning result is obtained; wherein the data scanning result includes a plurality of code data; a parsing operation is performed on the data scanning result to obtain a data parsing result; based on a predetermined automatic audit tool, a code review operation is performed on the data parsing result to obtain a code audit result corresponding to the code to be audited. It can be seen that the implementation of the present invention can realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and can further be conducive to improving the accuracy and reliability of code auditing. BRIEF DESCRIPTION OF THE DRAWINGS

[0061] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0062] Figure 1 It is a flowchart of an automated code auditing method disclosed in an embodiment of the present invention;

[0063] Figure 2 It is a flowchart of another automated code auditing method disclosed in an embodiment of the present invention;

[0064] Figure 3 It is a structural diagram of an automated code auditing system disclosed in an embodiment of the present invention;

[0065] Figure 4 It is a structural diagram of another automated code auditing system disclosed in an embodiment of the present invention;

[0066] Figure 5 It is a structural diagram of another automated code auditing system disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0067] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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.

[0068] The terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish different objects rather than to describe a specific order. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or terminal including a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units inherent to these processes, methods, products or terminals.

[0069] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present invention. The appearance of the phrase in various places in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0070] The present invention discloses an automated code auditing method and system, which can realize automated code auditing, help improve the intelligence and efficiency of code auditing, and further help improve the accuracy and reliability of code auditing. The following are detailed descriptions.

[0071] Embodiment 1

[0072] See also Figure 1 , Figure 1 This is a flow chart of an automated code auditing method disclosed in an embodiment of the present invention. Figure 1 The described automated code auditing method can be applied to an automated code auditing system, wherein the automated code auditing system can be integrated in a cloud server or a local server, which is not limited in the embodiments of the present invention. Figure 1 As shown, the automated code audit method may include the following operations:

[0073] 101. Determine the code to be audited, perform data scanning operation on the code to be audited, and obtain the data scanning result.

[0074] In the embodiment of the present invention, the data scanning result includes a plurality of code data.

[0075] In the embodiment of the present invention, optionally, the code to be audited may include code submitted by a user through a code review system.

[0076] In the embodiment of the present invention, optionally, performing a data scanning operation on the code to be audited to obtain a data scanning result may include:

[0077] Submit the code to be audited to gitlab to trigger gitlab's scanning task for the code to be audited, and communicate with the code scanning server through the pipeline to transfer the code to be audited to the code scanning server through the pipeline, redirect the code file to the scanning server, and automatically scan the script to obtain the data scanning results.

[0078] In the embodiment of the present invention, optionally, the data scanning operation may include one or more of security scanning and compliance scanning of the code to be audited.

[0079] 102. Perform a parsing operation on the data scanning result to obtain a data parsing result.

[0080] In the embodiment of the present invention, optionally, the data scanning result may trigger a data analysis task on the data scanning result, so as to perform an analysis operation on the data scanning result through gitlab, thereby obtaining the data analysis result.

[0081] 103. Perform a code review operation on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited.

[0082] In the embodiment of the present invention, optionally, the predetermined automatic audit tool may be an audit tool integrated in the automated code audit system; further, the automatic audit tool may be a pre-integrated and trained audit tool.

[0083] In the embodiment of the present invention, optionally, the code audit result may include one or more of a code security audit result and a code specification audit result corresponding to the code to be audited.

[0084] It can be seen that implementation Figure 1 The described automated code auditing method can perform a data scanning operation on the audited code to obtain a data scanning result, and perform a parsing operation on the data scanning result to obtain a data parsing result, and based on a predetermined automatic auditing tool, perform a code review operation on the data parsing result to obtain a code audit result corresponding to the audited code. The automated code auditing process can significantly reduce the time required for manual code review, improve auditing efficiency, and improve auditing intelligence. Automated tools can work continuously to reduce human errors caused by fatigue or negligence. Automated audits can discover and fix potential security vulnerabilities and coding errors, improve the overall quality of the code, and automated audits can help timely discover security risks in the code, take measures in advance, and reduce potential losses. Compliance checks can also be integrated to ensure that the code complies with industry standards and regulatory requirements, and can realize automated code audits, which is conducive to improving the intelligence and efficiency of code audits, and further can help improve the accuracy and reliability of code audits.

[0085] Embodiment 2

[0086] See also Figure 2 , Figure 2 : is a flow chart of another automated code auditing method disclosed in an embodiment of the present invention. Figure 2 The described automated code auditing method can be applied to an automated code auditing system, wherein the automated code auditing system can be integrated in a cloud server or a local server, which is not limited in the embodiments of the present invention. Figure 2 As shown, the automated code audit method may include the following operations:

[0087] 201. Determine the code to be audited, perform a data scanning operation on the code to be audited, and obtain a data scanning result.

[0088] 202. Perform a parsing operation on the data scanning result to obtain a data parsing result.

[0089] 203. Perform a code review operation on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited.

[0090] In the embodiment of the present invention, for the detailed description of steps 201 to 203, please refer to the other descriptions of steps 101 to 103 in the first embodiment, and the embodiment of the present invention will not be repeated.

[0091] 204. Determine the target recipient corresponding to the code audit result, and push the code audit result to the target recipient through a predetermined operation and maintenance platform.

[0092] In the embodiment of the present invention, the target receiving device includes a code database corresponding to the code to be audited and / or a terminal corresponding to the target receiving object.

[0093] In an embodiment of the present invention, optionally, the code database may be a database for storing all code data; the terminal corresponding to the target receiving object may be a terminal corresponding to the object sending the code to be audited; wherein the terminal corresponding to the target receiving object may be a PC or a smart mobile terminal, wherein the smart mobile terminal may include one or more of a smart phone, a smart tablet, and a smart watch.

[0094] In an embodiment of the present invention, optionally, pushing the code audit results to the target receiving object through a predetermined operation and maintenance platform can be based on pre-set push parameters; wherein the push parameters may include one or more of the push method and the data display form corresponding to the code audit results.

[0095] It can be seen that implementation Figure 2The described automated code audit method can determine the target recipients corresponding to the code audit results and push the code audit results to the target recipients through the operation and maintenance platform. The automated push of code audit results can reduce the need for manual distribution, thereby saving time and human resources and improving the efficiency of the entire audit process. Pushing through a preset operation and maintenance platform can reduce human errors and ensure the accuracy and reliability of the audit results. The audit results can be quickly pushed to the target recipients, so that relevant personnel can obtain immediate feedback and speed up problem identification and repair. The automated push and recording functions help meet compliance requirements and provide traceable records for audits, which not only improves the efficiency and accuracy of the code audit process, but also enhances security, transparency and collaboration. It can realize automated code audits, which is conducive to improving the intelligence and efficiency of code audits, and further can help improve the accuracy and reliability of code audits.

[0096] In an optional embodiment, based on the code audit result, code review information corresponding to the code to be audited is determined, wherein the code review information includes one or more of code security information and code specification information corresponding to the code to be audited;

[0097] Based on the code review information, a visual audit result corresponding to the code to be audited is generated, and the visual audit result is transmitted to a predetermined operation and maintenance platform, so as to display the visual audit result in a preset display device through the predetermined operation and maintenance platform.

[0098] In this optional embodiment, the code review information includes one or more of code security information and code specification information corresponding to the code to be audited.

[0099] In this optional embodiment, optionally, the code security information may include one or more of information on the number of security vulnerabilities corresponding to the code to be audited and information on the type of security vulnerabilities; the code standard information may include one or more of information on the total number of code lines corresponding to the code to be audited and information on the number of unfixed code non-standardizations.

[0100] In this optional embodiment, optionally, the visual audit result corresponding to the code to be audited may at least include code security information and code specification information corresponding to the code to be audited; further, the visual audit result may be in one of the forms of text, picture, or video.

[0101] In the embodiment of the present invention, optionally, the preset display device can be one or more of an LED screen, a smart phone, a smart tablet computer, and a smart watch.

[0102] It can be seen that the implementation of this optional embodiment can determine the code review information corresponding to the code to be audited based on the code audit results, generate visual audit results corresponding to the code to be audited based on the code review information, and transmit the visual audit results to the operation and maintenance platform, so that the visual audit results can be displayed in a preset display device through the operation and maintenance platform. By determining the code security information based on the code audit results, security vulnerabilities can be discovered and repaired in a timely manner, and the security of software products can be improved. By reviewing the code specification information, it can be ensured that the code follows best practices and standards, thereby improving the readability, maintainability and overall quality of the code. The generated visual audit results make complex code audit information more intuitive and easy to understand, which is convenient for developers and auditors to quickly understand the problem Therefore, by automatically generating and transmitting visual audit results, the time for manual collation and reporting is reduced, and the efficiency of the audit process is improved. By displaying the visual audit results in real time on the operation and maintenance platform, the team can monitor the code status in a timely manner and respond quickly to potential problems. The visual results provide intuitive data support for users and managers, and help track compliance standards to ensure that the software development process complies with industry regulations and legal requirements. It can also improve the transparency of the software development process, which not only improves the security and quality of the code, but also improves the efficiency and transparency of the audit process. It can also realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and further can help improve the accuracy and reliability of code auditing.

[0103] In another optional embodiment, performing a parsing operation on the data scanning result to obtain a data parsing result includes:

[0104] Transmitting all code data included in the data scanning result to a predetermined repository manager, and performing a data parsing operation on all code data by the predetermined repository manager to obtain a data parsing result;

[0105] The data analysis operation includes one or more of data classification and analysis operations and data cleaning operations.

[0106] In this optional embodiment, optionally, the predetermined repository manager may be gitlab.

[0107] In this optional embodiment, optionally, a data analysis operation is performed on all code data through a predetermined repository manager, and the data analysis result can be obtained by triggering a data analysis task in the repository manager to perform a data analysis operation on the code data in the data scanning result.

[0108] In this optional embodiment, optionally, the data classification and analysis operation may include data classification operation, data grading operation, data update operation, and data analysis operation; the data cleaning operation may include data missing value processing operation, data outlier processing operation, data format standardization processing operation, data type processing operation, data consistency processing operation, data deduplication operation, and data normalization operation.

[0109] It can be seen that the implementation of this optional embodiment can transmit all code data included in the data scanning results to the repository manager, and perform data parsing operations on all code data through the repository manager to obtain data parsing results. The automated data parsing operation can reduce the time and labor intensity of manual data processing and improve the overall efficiency of data management. The data classification and analysis and data cleaning operations can improve the accuracy, completeness and consistency of the data, thereby improving the data quality. In the data parsing process, sensitive data can be identified and processed to ensure data security and privacy protection. Data classification and analysis can help meet industry standards and regulatory requirements, especially in data classification and sensitive data processing. The classification and cleaning operations in the data parsing process can improve the transparency and traceability of data processing, and through continuous data analysis and feedback, the data quality and data processing process can be continuously improved. Through automated and systematic data parsing operations, not only the efficiency and quality of data processing are improved, but also the security and compliance of data are enhanced. In addition, automated code auditing can be realized, which is conducive to improving the intelligence and efficiency of code auditing, and further can be conducive to improving the accuracy and reliability of code auditing.

[0110] In another optional embodiment, a code review operation is performed on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited, including:

[0111] Based on the predetermined automatic audit tool, a format adjustment operation is performed on all code data included in the data parsing result to obtain the format-adjusted code data, and a code review operation is performed on all code data through the predetermined automatic audit tool to obtain the code audit result corresponding to the code to be audited;

[0112] The code review operation includes one or more of a code security review operation and a code specification review operation.

[0113] In this optional embodiment, the predetermined automatic audit tool may be an audit tool integrated based on an automated code audit system.

[0114] In this optional embodiment, optionally, the above-mentioned automatic audit tool based on the predetermined determination performs a format adjustment operation on all code data included in the data analysis result to obtain the code data after the format adjustment, which may include:

[0115] Performing format adjustment operations on all code data included in the data analysis results based on a predetermined automatic audit tool, and determining whether the data formats corresponding to all code data meet the preset format requirements;

[0116] When it is determined that the data formats corresponding to all the code data meet the preset format requirements, format-adjusted code data is generated based on all the format-adjusted code data;

[0117] When it is determined that the data formats corresponding to all the code data do not meet the preset format requirements, the step of re-triggering the execution of the format adjustment operation on all the code data included in the data analysis result based on the predetermined automatic audit tool is triggered.

[0118] In this optional embodiment, optionally, the code review operation is performed on all code data by using a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited, which may include:

[0119] Through the pre-determined automatic audit tool, an automated code review operation is performed on all code data to obtain the code audit results corresponding to the code to be audited.

[0120] It can be seen that the implementation of this optional embodiment can perform a format adjustment operation on all code data included in the data parsing results based on the automatic audit tool to obtain the format-adjusted code data, and perform a code review operation on all code data through the automatic audit tool to obtain the code audit result corresponding to the code to be audited. The intelligence and efficiency of code auditing can be improved through automated code review, which can also help improve the review quality of code review. Through code review, team members can find and fix errors and vulnerabilities in the code, thereby further improving the code quality, and the automated tool can perform a comprehensive automatic audit of the code to ensure the consistency and comprehensiveness of the code quality. By combining the automatic audit tool and the code review operation, not only the security and quality of the code are improved, but also the communication and collaboration capabilities of the team are enhanced, the efficiency and transparency of the audit process are improved, and the security and compliance of the data are enhanced. Automated code auditing can also be achieved, which is conducive to improving the intelligence and efficiency of code auditing, and further can help improve the accuracy and reliability of code auditing.

[0121] In yet another optional embodiment, before performing a parsing operation on the data scanning result to obtain the data parsing result, the method further includes:

[0122] Determine whether there is data to be eliminated in the data scanning results;

[0123] When it is determined that there is data to be eliminated in the data scanning result, a data filtering operation is performed on the data to be eliminated included in the data scanning result to obtain a data filtering result;

[0124] Based on the data filtering result, an update operation is performed on the data scanning result, and an analysis operation is triggered to perform on the data scanning result to obtain the data analysis result.

[0125] In this optional embodiment, further optionally, when it is determined that there is no data to be eliminated in the data scanning result, the process can be terminated.

[0126] In this optional embodiment, the data to be removed may optionally include one or more of whitelist data, false positive data, and vulnerability data.

[0127] In this optional embodiment, optionally, the above-mentioned updating operation on the data scanning result based on the data filtering result may include:

[0128] Based on the data filtering result, an update operation is performed on the code data corresponding to the data filtering result included in the data scanning result, so as to delete the code data corresponding to the data filtering result included in the data scanning result, and update the data scanning result.

[0129] It can be seen that the implementation of this optional embodiment can determine whether there is data to be eliminated in the data scanning result. If so, a data filtering operation is performed on the data to be eliminated included in the data scanning result to obtain a data filtering result. Based on the data filtering result, an update operation is performed on the data scanning result and a step of performing a parsing operation on the data scanning result to obtain a data parsing result is triggered. By eliminating unnecessary data, the noise in the data set can be reduced, the quality of the data and the accuracy of the analysis results can be improved. Eliminating unnecessary data can reduce the resources required for storing and processing data, reduce costs, and reduce the amount of data to speed up data processing and improve data processing efficiency. Sensitive data can also be eliminated in time to reduce the risk of data leakage and prevent sensitive data from being improperly processed or abused. By eliminating irrelevant or redundant data, the data structure can be made clearer and more orderly. Adding a data filtering step before data parsing not only improves the quality and security of the data, but also optimizes the data processing process, enhances the compliance and flexibility of data processing, improves the efficiency and transparency of the code audit process, and also enhances the security and compliance of the data. It can also realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and further can be conducive to improving the accuracy and reliability of code auditing.

[0130] In yet another optional embodiment, a data filtering operation is performed on the data to be removed included in the data scanning result to obtain a data filtering result, including:

[0131] According to the data to be removed, a data filtering operation is performed on the data to be removed included in the data scanning result to obtain at least one filtered data block;

[0132] A data combination operation is performed on all filtered data blocks to obtain a data filtering result.

[0133] In this optional embodiment, further optionally, before performing a data filtering operation on the data to be eliminated included in the data scanning results to obtain at least one filtered data block, the various types of code data submitted this time can be integrated, and a data filtering operation can be performed based on all the integrated code data and the data to be eliminated to obtain a filtered data block.

[0134] In this optional embodiment, optionally, for example, data such as whitelists and false alarms are filtered out in file units, and at the same time, the problematic code, submission time, etc. are mapped to the specific author to form small data blocks, and each small data block is combined into a large data block to form data in JSON format to obtain the data filtering result after the data combination operation.

[0135] In this optional embodiment, JSON (JavaScript Object Notation) is a lightweight data exchange format that is easy for people to read and write, and is also easy for machines to parse and generate. It is based on a subset of JavaScript, but is language independent and can be read by a variety of programming languages. Data in JSON format consists of key-value pairs, and data is stored and transmitted in text form.

[0136] It can be seen that the implementation of this optional embodiment can perform a data filtering operation on the data to be eliminated included in the data scanning result according to the data to be eliminated to obtain at least one filtered data block, and perform a data combination operation on all filtered data blocks to obtain a data filtering result. It can ensure that the remaining data is more relevant by eliminating irrelevant or unnecessary data, which helps to improve the relevance and accuracy of data analysis. By reducing the amount of data, the data processing speed can be accelerated, the efficiency of data processing and analysis can be improved, and erroneous or abnormal data can be eliminated to reduce the problems that these data may cause in subsequent processing and analysis. The data after filtering and combining operations is neater and more orderly, and the availability and ease of use of the data are improved. It can also adapt to real-time changes in data and support dynamic management of data by dynamically filtering and combining data blocks. By adding data filtering and combination steps before data parsing, not only the quality and security of the data are improved, but also the data processing process is optimized, the cost is reduced, and the compliance and flexibility of data processing are enhanced. It can also realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and further can be conducive to improving the accuracy and reliability of code auditing.

[0137] Embodiment 3

[0138] See also Figure 3 , Figure 3 Schematic diagram of the structure of an automated code audit system disclosed in an embodiment of the present invention. Figure 3 As shown, the automated code audit system may include:

[0139] A determination module 301 is used to determine the code to be audited;

[0140] Scanning module 302, used to perform data scanning operation on the audit code to obtain data scanning results; wherein the data scanning results include a number of code data;

[0141] The parsing module 303 is used to perform a parsing operation on the data scanning result to obtain a data parsing result;

[0142] The review module 304 is used to perform a code review operation on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited.

[0143] It can be seen that implementation Figure 3The described device can perform a data scanning operation on the audit code to obtain a data scanning result, and perform a parsing operation on the data scanning result to obtain a data parsing result, and perform a code review operation on the data parsing result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the audit code. The automated code audit process can significantly reduce the time required for manual code review, improve audit efficiency and improve audit intelligence. Automated tools can work continuously to reduce human errors caused by fatigue or negligence. Automated audits can discover and fix potential security vulnerabilities and coding errors, improve the overall quality of the code, and automated audits can help timely discover security risks in the code, take measures in advance, and reduce potential losses. Compliance checks can also be integrated to ensure that the code complies with industry standards and regulatory requirements, and can realize automated code audits, which is conducive to improving the intelligence and efficiency of code audits, and further can help improve the accuracy and reliability of code audits.

[0144] In an optional embodiment, if Figure 4 As shown, the determination module 301 is also used to determine the target receiving object corresponding to the code audit result;

[0145] The device also includes:

[0146] The push module 305 is used to push the code audit results to the target recipient through a predetermined operation and maintenance platform;

[0147] The target receiving device includes a code database corresponding to the code to be audited and / or a terminal corresponding to the target receiving object.

[0148] It can be seen that implementation Figure 4 The described device can determine the target receiving object corresponding to the code audit result and push the code audit result to the target receiving object through the operation and maintenance platform. It can reduce the need for manual distribution by automatically pushing the code audit result, thereby saving time and human resources and improving the efficiency of the entire audit process. Pushing through a preset operation and maintenance platform can reduce human errors and ensure the accuracy and reliability of the audit results. The audit results can be quickly pushed to the target receiving object, so that relevant personnel can obtain feedback immediately, speeding up the identification and repair of problems. The automated push and recording functions help meet compliance requirements and provide traceable records for audits, which not only improves the efficiency and accuracy of the code audit process, but also enhances security, transparency and collaboration. It can realize automated code audits, which is conducive to improving the intelligence and efficiency of code audits, and further can help improve the accuracy and reliability of code audits.

[0149] In another optional embodiment, Figure 4 As shown, the determination module 301 is further used to determine the code review information corresponding to the code to be audited based on the code audit result, wherein the code review information includes one or more of the code security information and code specification information corresponding to the code to be audited;

[0150] The device also includes:

[0151] A generating module 306, for generating a visual audit result corresponding to the code to be audited according to the code review information;

[0152] The display module 307 is used to transmit the visual audit result to a predetermined operation and maintenance platform so as to display the visual audit result in a preset display device through the predetermined operation and maintenance platform.

[0153] It can be seen that implementation Figure 4 The described device can determine the code review information corresponding to the code to be audited based on the code audit results, generate the visual audit results corresponding to the code to be audited according to the code review information, and transmit the visual audit results to the operation and maintenance platform so that the visual audit results can be displayed in a preset display device through the operation and maintenance platform. By determining the code security information based on the code audit results, security vulnerabilities can be discovered and repaired in a timely manner to improve the security of software products. By reviewing the code specification information, it can ensure that the code follows best practices and standards, thereby improving the readability, maintainability and overall quality of the code. The generated visual audit results make complex code audit information more intuitive and easy to understand, which is convenient for developers and auditors to quickly understand the problem. By automatically generating and transmitting visual audit results, the time for manual compilation and reporting is reduced, and the efficiency of the audit process is improved. By displaying visual audit results in real time on the operation and maintenance platform, the team can monitor the code status in a timely manner and respond quickly to potential problems. The visual results provide intuitive data support for users and managers, and help track compliance standards, ensure that the software development process complies with industry regulations and legal requirements, and improve the transparency of the software development process. It not only improves the security and quality of the code, but also improves the efficiency and transparency of the audit process. It can also realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and further can help improve the accuracy and reliability of code auditing.

[0154] In yet another optional embodiment, Figure 4 As shown, the parsing module 303 performs parsing operations on the data scanning results, and the specific method of obtaining the data parsing results includes:

[0155] Transmitting all code data included in the data scanning result to a predetermined repository manager, and performing a data parsing operation on all code data by the predetermined repository manager to obtain a data parsing result;

[0156] The data analysis operation includes one or more of data classification and analysis operations and data cleaning operations.

[0157] It can be seen that implementation Figure 4 The described device is capable of transmitting all code data included in the data scanning results to the repository manager, and performing data parsing operations on all code data through the repository manager to obtain data parsing results. The automated data parsing operations can reduce the time and labor intensity of manual data processing and improve the overall efficiency of data management. The data classification and parsing and data cleaning operations can improve the accuracy, completeness and consistency of the data, thereby improving the data quality. In the data parsing process, sensitive data can be identified and processed to ensure data security and privacy protection. Data classification and parsing can help meet industry standards and regulatory requirements, especially in data classification and sensitive data processing. The classification and cleaning operations in the data parsing process can improve the transparency and traceability of data processing, and through continuous data analysis and feedback, the data quality and data processing process can be continuously improved. Through automated and systematic data parsing operations, not only the efficiency and quality of data processing are improved, but also the security and compliance of data are enhanced. In addition, automated code auditing can be realized, which is conducive to improving the intelligence and efficiency of code auditing, and further can be conducive to improving the accuracy and reliability of code auditing.

[0158] In yet another optional embodiment, Figure 4 As shown, the review module 304 performs a code review operation on the data analysis result based on a predetermined automatic audit tool, and the specific method of obtaining the code audit result corresponding to the code to be audited includes:

[0159] Based on the predetermined automatic audit tool, a format adjustment operation is performed on all code data included in the data parsing result to obtain the format-adjusted code data, and a code review operation is performed on all code data through the predetermined automatic audit tool to obtain the code audit result corresponding to the code to be audited;

[0160] The code review operation includes one or more of a code security review operation and a code specification review operation.

[0161] It can be seen that implementation Figure 4The described device can perform a format adjustment operation on all code data included in the data parsing results based on the automatic audit tool to obtain the format-adjusted code data, and perform a code review operation on all code data through the automatic audit tool to obtain the code audit result corresponding to the code to be audited. It can improve the intelligence and efficiency of code auditing through automated code review, which can also help improve the review quality of code review. Through code review, team members can find and fix errors and vulnerabilities in the code, thereby further improving the code quality, and can perform a comprehensive automatic audit of the code through automated tools to ensure the consistency and comprehensiveness of the code quality. By combining automated audit tools and code review operations, not only the security and quality of the code are improved, but also the communication and collaboration capabilities of the team are enhanced, the efficiency and transparency of the audit process are improved, and the security and compliance of data are enhanced. It can also realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and further can help improve the accuracy and reliability of code auditing.

[0162] In yet another optional embodiment, Figure 4 As shown, the device also includes:

[0163] The judgment module 308 is used to judge whether there is data to be removed in the data scanning result before the analysis module 303 performs the analysis operation on the data scanning result and obtains the data analysis result;

[0164] The filtering module 309 is used to perform a data filtering operation on the data to be removed included in the data scanning result to obtain a data filtering result when the judging module 308 judges that there is data to be removed in the data scanning result;

[0165] The updating module 310 is used to perform an updating operation on the data scanning result based on the data filtering result, and trigger the parsing module 303 to perform a parsing operation on the data scanning result to obtain a data parsing result.

[0166] It can be seen that implementation Figure 4The described device can determine whether there is data to be eliminated in the data scanning result. If so, a data filtering operation is performed on the data to be eliminated included in the data scanning result to obtain a data filtering result. Based on the data filtering result, an update operation is performed on the data scanning result and a step of performing a parsing operation on the data scanning result to obtain a data parsing result is triggered. By eliminating unnecessary data, the noise in the data set can be reduced, the quality of the data and the accuracy of the analysis results can be improved. Eliminating unnecessary data can reduce the resources required for storing and processing data, reduce costs, and reduce the amount of data to speed up data processing and improve data processing efficiency. Sensitive data can also be eliminated in time to reduce the risk of data leakage and prevent sensitive data from being improperly processed or abused. By eliminating irrelevant or redundant data, the data structure can be made clearer and more orderly. Adding a data filtering step before data parsing not only improves the quality and security of the data, but also optimizes the data processing process, enhances the compliance and flexibility of data processing, improves the efficiency and transparency of the code audit process, and also enhances the security and compliance of the data. It can also realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and further can be conducive to improving the accuracy and reliability of code auditing.

[0167] In yet another optional embodiment, Figure 4 As shown, the filtering module 309 performs a data filtering operation on the data to be removed included in the data scanning result, and the specific method of obtaining the data filtering result includes:

[0168] According to the data to be removed, a data filtering operation is performed on the data to be removed included in the data scanning result to obtain at least one filtered data block;

[0169] A data combination operation is performed on all filtered data blocks to obtain a data filtering result.

[0170] It can be seen that implementation Figure 4The described device can perform data filtering operations on the data to be eliminated included in the data scanning results according to the data to be eliminated to obtain at least one filtered data block, and perform data combination operations on all filtered data blocks to obtain data filtering results. It can ensure that the remaining data is more relevant by eliminating irrelevant or unnecessary data, which helps to improve the relevance and accuracy of data analysis. It can speed up data processing by reducing the amount of data, improve the efficiency of data processing and analysis, and eliminate erroneous or abnormal data to reduce the problems that these data may cause in subsequent processing and analysis. The data after filtering and combining operations is neater and more orderly, which improves the availability and ease of use of the data. It can also adapt to real-time changes in data and support dynamic management of data by dynamically filtering and combining data blocks. By adding data filtering and combination steps before data parsing, it not only improves the quality and security of the data, but also optimizes the data processing process, reduces costs, and enhances the compliance and flexibility of data processing. It can also realize automated code auditing, which is conducive to improving the intelligence and efficiency of code auditing, and further can be conducive to improving the accuracy and reliability of code auditing.

[0171] Embodiment 4

[0172] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of another structure of an automated code audit system disclosed in an embodiment of the present invention. Figure 5 As shown, the automated code audit system may include:

[0173] A memory 401 storing executable program codes;

[0174] a processor 402 coupled to the memory 401;

[0175] The processor 402 calls the executable program code stored in the memory 401 to execute the steps of the automated code auditing method described in the first embodiment of the present invention or the second embodiment of the present invention.

[0176] Embodiment 5

[0177] An embodiment of the present invention discloses a computer storage medium, which stores computer instructions. When the computer instructions are called, they are used to execute the steps of the automated code auditing method described in Embodiment 1 or Embodiment 2 of the present invention.

[0178] Embodiment 6

[0179] An embodiment of the present invention discloses a computer program product, which includes a non-transitory computer-readable storage medium storing a computer program, and the computer program is operable to enable a computer to execute the steps in the automated code auditing method described in Embodiment 1 or Embodiment 2.

[0180] The system embodiment described above is only illustrative, wherein the modules described as separate components may or may not be physically separated, and the components displayed as modules may or may not be physical modules, that is, they may be located in one place, or they may be distributed on multiple network modules. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without paying creative labor.

[0181] Through the specific description of the above embodiments, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on such an understanding, the above technical solution can be essentially or partly contributed to the prior art in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, and the storage medium includes a read-only memory (ROM), a random access memory (RAM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), a one-time programmable read-only memory (OTPROM), an electronically erasable rewritable read-only memory (EEPROM), a compact disc (CD-ROM) or other optical disc storage, magnetic disk storage, magnetic tape storage, or any other computer-readable medium that can be used to carry or store data.

[0182] Finally, it should be noted that the automated code auditing method and system disclosed in the embodiments of the present invention disclose only the preferred embodiments of the present invention, which are only used to illustrate the technical solution of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments can still be modified, or some of the technical features can be replaced by equivalents. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An automated code auditing method, characterized in that: The method comprises: Determine the code to be audited, perform a data scanning operation on the code to be audited, and obtain a data scanning result; wherein the data scanning result includes a plurality of code data; Performing a parsing operation on the data scanning result to obtain a data parsing result; A code review operation is performed on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited.

2. The automated code auditing method according to claim 1, characterized in that: The method further comprises: Determine a target recipient corresponding to the code audit result, and push the code audit result to the target recipient through a predetermined operation and maintenance platform; The target receiving device includes a code database corresponding to the code to be audited and / or a terminal corresponding to the target receiving object.

3. The automated code auditing method according to claim 1, characterized in that: The method further comprises: Based on the code audit result, determine the code review information corresponding to the code to be audited, wherein the code review information includes one or more of code security information and code specification information corresponding to the code to be audited; Based on the code review information, a visual audit result corresponding to the code to be audited is generated, and the visual audit result is transmitted to a predetermined operation and maintenance platform, so as to display the visual audit result in a preset display device through the predetermined operation and maintenance platform.

4. The automated code auditing method according to claim 1, characterized in that: The performing of a parsing operation on the data scanning result to obtain a data parsing result includes: Transmitting all the code data included in the data scanning result to a predetermined repository manager, and performing a data parsing operation on all the code data by the predetermined repository manager to obtain a data parsing result; The data analysis operation includes one or more of a data classification analysis operation and a data cleaning operation.

5. The automated code auditing method according to claim 1, characterized in that: The performing of a code review operation on the data analysis result based on the predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited includes: Based on the predetermined automatic audit tool, a format adjustment operation is performed on all the code data included in the data analysis result to obtain the code data after the format adjustment, and a code review operation is performed on all the code data through the predetermined automatic audit tool to obtain the code audit result corresponding to the code to be audited; The code review operation includes one or more of a code security review operation and a code specification review operation.

6. The automated code auditing method according to claim 1, characterized in that: Before performing the parsing operation on the data scanning result to obtain the data parsing result, the method further includes: Determining whether there is data to be eliminated in the data scanning result; When it is determined that the data to be eliminated exists in the data scanning result, a data filtering operation is performed on the data to be eliminated included in the data scanning result to obtain a data filtering result; Based on the data filtering result, an update operation is performed on the data scanning result, and the analysis operation on the data scanning result is triggered to obtain the data analysis result.

7. The automated code auditing method according to claim 6, characterized in that: The performing of a data filtering operation on the data to be removed included in the data scanning result to obtain a data filtering result includes: According to the data to be removed, performing a data filtering operation on the data to be removed included in the data scanning result to obtain at least one filtered data block; A data combination operation is performed on all the filtered data blocks to obtain a data filtering result.

8. An automated code auditing system, characterized in that: The system comprises: A determination module is used to determine the code to be audited; A scanning module, used to perform a data scanning operation on the code to be audited to obtain a data scanning result; wherein the data scanning result includes a plurality of code data; An analysis module, used to perform an analysis operation on the data scanning result to obtain a data analysis result; The review module is used to perform a code review operation on the data analysis result based on a predetermined automatic audit tool to obtain a code audit result corresponding to the code to be audited.

9. An automated code auditing system, characterized in that: The system comprises: A memory storing executable program code; a processor coupled to the memory; The processor calls the executable program code stored in the memory to execute the automated code auditing method as described in any one of claims 1-7.

10. A computer storage medium, characterized in that: The computer storage medium stores computer instructions, which, when called, are used to execute the automated code auditing method as described in any one of claims 1-7.