Code auditing tool configuration method and device

Through intelligent configuration code auditing tools, configuration parameters are generated according to the specific needs of the code to be audited, and code auditing is integrated in the CI/CD pipeline, the problem of unstable code audit quality and lack of normative constraints in the existing technology is solved, and a more efficient and secure code audit process is achieved.

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

Patent Information

Application Number
CN202411519879.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

When existing code audit tools audit back-end developer code, there are problems such as uneven audit quality and lack of normative constraints, resulting in vulnerability risks and low security in the code.

Method used

Provides an intelligent configuration method for code auditing tools. By obtaining the code information of the code to be audited, determining its audit requirements, generating matching code audit configuration parameters, and generating matching code audit tools based on these parameters. The method also includes integrating code auditing in the CI/CD pipeline, performing audit operations, determining whether the audit results meet preset conditions, and optimizing and updating based on the results.

Benefits of technology

Improve the accuracy and reliability of code audits, enhance the security of code audits and operation, and ensure that the code complies with security and quality standards before deployment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119513872A_ABST
    Figure CN119513872A_ABST
Patent Text Reader

Abstract

The invention discloses a code auditing tool configuration method and device, and the method comprises the steps: obtaining the code information of a to-be-audited code, and determining the code auditing demand of the to-be-audited code according to the code information; according to the code auditing requirement, code auditing configuration parameters matched with the to-be-audited code are generated, and a code auditing tool matched with the to-be-audited code is generated based on all the code auditing configuration parameters. It can be seen that the code auditing tool can be intelligently configured, the accuracy and reliability of code auditing can be improved, and then the safety of code auditing and code running can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of intelligent configuration technology, and in particular to a configuration method and device for a code audit tool. Background Art

[0002] Code audit is a process of evaluating the quality, security, performance, and maintainability of software code. It is usually performed by professional software auditors or automated tools to identify errors, vulnerabilities, inconsistencies, and non-compliance with coding standards in the code. Code audit is an important part of the software development life cycle and can help improve the quality and security of software.

[0003] However, the current auditing of backend developers' codes through code auditing tools has uneven audit quality and lacks normative constraints, which will lead to code vulnerability risks and technical problems of low security. It can be seen that it is particularly important to provide a new configuration method for code auditing tools to improve the accuracy and reliability of code auditing and thus improve the security of code auditing and operation. Summary of the invention

[0004] The present invention provides a configuration method and device for a code audit tool, which can perform intelligent configuration of the code audit tool, which is beneficial to improving the accuracy and reliability of code auditing, and further beneficial to improving the security of code auditing and code operation.

[0005] In order to solve the above technical problems, the first aspect of the present invention discloses a configuration method of a code audit tool, the method comprising:

[0006] Obtaining code information of the code to be audited, and determining code audit requirements of the code to be audited based on the code information;

[0007] According to the code audit requirements, code audit configuration parameters matching the code to be audited are generated, and based on all the code audit configuration parameters, a code audit tool matching the code to be audited is generated.

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

[0009] Based on the code audit tool and the code to be audited, audit requirement information is determined, and target deployment parameters are determined based on the audit requirement information, wherein the target deployment parameters include a code development and deployment process, and the code development and deployment process includes a CI / CD pipeline;

[0010] An audit operation is performed on the code to be audited according to the target deployment parameters and the code audit tool to obtain a code audit result of the code to be audited.

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

[0012] Determine whether the code audit result meets the preset code audit conditions;

[0013] When it is determined that the code audit result does not meet the preset code audit conditions, the target reason why the code audit result does not meet the preset code audit conditions is analyzed, and the target reason is fed back to the problem tracking system that matches the code to be audited, so as to generate audit processing parameters that match the target reason through the problem tracking system.

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

[0015] Determine whether the code audit result meets the preset audit optimization conditions;

[0016] When it is determined that the code audit result meets the preset audit optimization condition, the configuration parameters to be optimized in the code audit tool are determined according to the code audit result and the code audit tool, and the optimization factors corresponding to the configuration parameters to be optimized are determined, and based on all the configuration parameters to be optimized and all the optimization factors, audit tool update parameters are generated;

[0017] According to the audit tool update parameters, an update operation is performed on the code audit tool.

[0018] As an optional implementation, in the first aspect of the present invention, generating, according to the code audit requirement, code audit configuration parameters matching the code to be audited includes:

[0019] According to the code audit requirement, determine the code data parameters corresponding to the code to be audited, wherein the code data parameters include one or more of the code data type parameters and code data format parameters of the code to be audited;

[0020] Based on the code data parameters, determine the code audit rules corresponding to the code to be audited, and based on the code audit rules and code audit requirements, determine the code audit configuration requirements;

[0021] According to the code audit configuration requirement, a code audit configuration parameter matching the code audit configuration requirement is determined from a predetermined set of code configuration parameters.

[0022] As an optional implementation, in the first aspect of the present invention, generating a code audit tool matching the code to be audited based on all the code audit configuration parameters includes:

[0023] Determine a code inspection tool for the code to be audited, and generate an automatic audit program based on the code inspection tool and all the code audit configuration parameters;

[0024] Based on the automatic operation audit program, perform parameter verification operation on all the code audit configuration parameters, obtain parameter verification results, and determine whether the parameter verification results meet the preset parameter verification conditions;

[0025] When it is determined that the parameter verification result does not meet the preset parameter verification condition, a data processing operation is performed on all the code audit configuration parameters to obtain a data processing result, and an update operation is performed on all the code audit configuration parameters based on the data processing result, and the operation of determining whether the parameter verification result meets the preset parameter verification condition is re-executed;

[0026] When it is determined that the parameter verification result meets the preset parameter verification condition, a code audit tool matching the code to be audited is generated based on all the code audit configuration parameters.

[0027] As an optional implementation, in the first aspect of the present invention, performing an update operation on the code audit tool according to the audit tool update parameter includes:

[0028] Obtaining code feedback information corresponding to the code audit result, and determining an audit tool optimization plan based on the audit tool update parameters;

[0029] Based on the code feedback information, determine the feasibility of the audit tool optimization solution, and judge whether the feasibility of the solution meets the preset tool optimization conditions;

[0030] When it is determined that the feasibility of the solution meets the preset tool optimization condition, an update operation is performed on the code audit tool based on the audit tool optimization solution;

[0031] When it is determined that the feasibility of the solution does not meet the preset optimization conditions of the tool, a data processing operation is performed on the audit tool update parameters, and an update operation is performed on the code audit tool based on the processed audit tool update parameters;

[0032] The data processing operation includes one or more of a false alarm rule processing operation and a special file processing operation.

[0033] A second aspect of the present invention discloses a configuration device for a code audit tool, the device comprising:

[0034] The acquisition module is used to obtain the code information of the code to be audited;

[0035] A determination module, used to determine the code audit requirements of the code to be audited according to the code information;

[0036] A generation module is used to generate code audit configuration parameters that match the code to be audited according to the code audit requirements, and to generate a code audit tool that matches the code to be audited based on all the code audit configuration parameters.

[0037] As an optional implementation, in the second aspect of the present invention, the determination module is further used to determine audit requirement information based on the code audit tool and the code to be audited, and determine target deployment parameters based on the audit requirement information, wherein the target deployment parameters include a code development and deployment process, and the code development and deployment process includes a CI / CD pipeline;

[0038] The device also includes:

[0039] The audit module is used to perform an audit operation on the code to be audited according to the target deployment parameters and the code audit tool to obtain a code audit result of the code to be audited.

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

[0041] A first judgment module is used to judge whether the code audit result meets the preset code audit condition;

[0042] An analysis module, configured to analyze a target reason why the code audit result does not meet the preset code audit condition when the first judgment module determines that the code audit result does not meet the preset code audit condition;

[0043] A feedback module is used to feed back the target cause to the problem tracking system that matches the code to be audited, so as to generate an audit processing parameter that matches the target cause through the problem tracking system.

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

[0045] The second judgment module is used to judge whether the code audit result meets the preset audit optimization condition;

[0046] The determination module is further configured to determine, when the second judgment module determines that the code audit result satisfies the preset audit optimization condition, the configuration parameters to be optimized in the code audit tool according to the code audit result and the code audit tool, and determine the optimization factors corresponding to the configuration parameters to be optimized;

[0047] The generating module is further used to generate audit tool update parameters based on all the configuration parameters to be optimized and all the optimization factors;

[0048] An update module is used to perform an update operation on the code audit tool according to update parameters of the audit tool.

[0049] As an optional implementation, in the second aspect of the present invention, the specific manner in which the generation module generates the code audit configuration parameters matching the code to be audited according to the code audit requirements includes:

[0050] According to the code audit requirement, determine the code data parameters corresponding to the code to be audited, wherein the code data parameters include one or more of the code data type parameters and code data format parameters of the code to be audited;

[0051] Based on the code data parameters, determine the code audit rules corresponding to the code to be audited, and based on the code audit rules and code audit requirements, determine the code audit configuration requirements;

[0052] According to the code audit configuration requirement, a code audit configuration parameter matching the code audit configuration requirement is determined from a predetermined set of code configuration parameters.

[0053] As an optional implementation, in the second aspect of the present invention, the specific manner in which the generation module generates a code audit tool matching the code to be audited based on all the code audit configuration parameters includes:

[0054] Determine a code inspection tool for the code to be audited, and generate an automatic audit program based on the code inspection tool and all the code audit configuration parameters;

[0055] Based on the automatic operation audit program, perform parameter verification operation on all the code audit configuration parameters, obtain parameter verification results, and determine whether the parameter verification results meet the preset parameter verification conditions;

[0056] When it is determined that the parameter verification result does not meet the preset parameter verification condition, a data processing operation is performed on all the code audit configuration parameters to obtain a data processing result, and an update operation is performed on all the code audit configuration parameters based on the data processing result, and the operation of determining whether the parameter verification result meets the preset parameter verification condition is re-executed;

[0057] When it is determined that the parameter verification result meets the preset parameter verification condition, a code audit tool matching the code to be audited is generated based on all the code audit configuration parameters.

[0058] As an optional implementation, in the second aspect of the present invention, the specific manner in which the update module performs an update operation on the code audit tool according to the audit tool update parameter includes:

[0059] Obtaining code feedback information corresponding to the code audit result, and determining an audit tool optimization plan based on the audit tool update parameters;

[0060] Based on the code feedback information, determine the feasibility of the audit tool optimization solution, and judge whether the feasibility of the solution meets the preset tool optimization conditions;

[0061] When it is determined that the feasibility of the solution meets the preset tool optimization condition, an update operation is performed on the code audit tool based on the audit tool optimization solution;

[0062] When it is determined that the feasibility of the solution does not meet the preset optimization conditions of the tool, a data processing operation is performed on the audit tool update parameters, and an update operation is performed on the code audit tool based on the processed audit tool update parameters;

[0063] The data processing operation includes one or more of a false alarm rule processing operation and a special file processing operation.

[0064] A third aspect of the present invention discloses another configuration device for a code audit tool, the device comprising:

[0065] A memory storing executable program code;

[0066] a processor coupled to the memory;

[0067] The processor calls the executable program code stored in the memory to execute the configuration method of the code audit tool disclosed in the first aspect of the present invention.

[0068] The fourth aspect 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 configuration method of the code audit tool disclosed in the first aspect of the present invention.

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

[0070] In the embodiment of the present invention, the code information of the code to be audited is obtained, and the code audit requirements of the code to be audited are determined according to the code information; according to the code audit requirements, code audit configuration parameters matching the code to be audited are generated, and based on all code audit configuration parameters, a code audit tool matching the code to be audited is generated. It can be seen that the implementation of the present invention can intelligently configure the code audit tool, which is conducive to improving the accuracy and reliability of the code audit, and further conducive to improving the security of the code audit and code operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0071] 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.

[0072] Figure 1 It is a flowchart of a configuration method of a code audit tool disclosed in an embodiment of the present invention;

[0073] Figure 2 It is a flowchart of another configuration method of a code audit tool disclosed in an embodiment of the present invention;

[0074] Figure 3 It is a structural schematic diagram of a configuration device of a code audit tool disclosed in an embodiment of the present invention;

[0075] Figure 4 It is a structural schematic diagram of another configuration device of a code audit tool disclosed in an embodiment of the present invention;

[0076] Figure 5 It is a structural diagram of a configuration device of another code audit tool disclosed in an embodiment of the present invention. DETAILED DESCRIPTION

[0077] 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.

[0078] 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, device, product or end 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 ends.

[0079] 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.

[0080] The present invention discloses a configuration method and device of a code audit tool, which can intelligently configure the code audit tool, which is beneficial to improving the accuracy and reliability of code audit, and further beneficial to improving the security of code audit and code operation. The following are detailed descriptions.

[0081] Embodiment 1

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

[0083] 101. Obtain code information of the code to be audited, and determine the code audit requirements of the code to be audited based on the code information.

[0084] In an embodiment of the present invention, optionally, the code information of the code to be audited can be obtained in real time, can be obtained periodically according to a preset time period, or can be obtained when the code audit tool needs to be configured, which is not specifically limited in the embodiment of the present invention.

[0085] In an embodiment of the present invention, optionally, the code information of the code to be audited may include one or more of the source code programming language information, project architecture information, database configuration information, service permission configuration information, and resource usage information of the code to be audited; wherein the source code programming language information includes the programming language used in the source code, such as PHP, Java, C / C++, JavaScript, etc., because different languages ​​may require different audit tools and methods; the project architecture information may include a front-end and back-end separated operating architecture, a service directory permission classification, a combination of an authentication session and an application platform, etc.; the database configuration information may include checking the configuration specifications of the database, including the writing specifications of SQL statements; the service permission configuration information may include reviewing the permission configuration of the WEB service to ensure proper access control; the resource usage information may include reviewing the usage of resources in the code, such as memory management, file operations, etc., to discover potential resource abuse or leakage issues.

[0086] In an embodiment of the present invention, optionally, the code audit requirements of the code to be audited may include one or more of the type of code to be audited, code specifications, information of a system that requires integration of a code audit tool, and information of a project that requires code auditing.

[0087] 102. Generate code audit configuration parameters that match the code to be audited according to code audit requirements, and generate a code audit tool that matches the code to be audited based on all code audit configuration parameters.

[0088] In an embodiment of the present invention, optionally, the code audit configuration parameters may include one or more of audit rule configuration parameters, audit result report format configuration parameters, and configuration integration option configuration parameters.

[0089] In the embodiment of the present invention, optionally, the number of code audit configuration parameters is at least one; further, the number of code audit configuration parameters may be one or more, which is not specifically limited in the embodiment of the present invention.

[0090] In the embodiment of the present invention, optionally, the code audit tool includes all code audit configuration parameters.

[0091] It can be seen that implementation Figure 1The configuration method of the described code audit tool can obtain code information of the code to be audited, determine the code audit requirements of the code to be audited based on the code information, and generate matching code audit configuration parameters based on the code audit requirements. The matching code audit tool is generated based on the code audit configuration parameters, and can obtain detailed information of the code to be audited, such as programming language, framework, dependency library, etc., to more accurately determine the focus and scope of the audit, thereby improving audit efficiency and audit intelligence, and a comprehensive understanding of code information can help identify potential high-risk areas, such as common security vulnerabilities, sensitive data processing, etc., so as to pay more attention during the audit process, reduce audit risks, and help improve the security and reliability of code audits. It can also generate matching code audit configuration parameters, such as audit rules, vulnerability library, scanning depth, etc., according to the characteristics and requirements of the code to be audited, to implement customized audit strategies, thereby realizing targeted configuration of code audit tools, which is conducive to improving the accuracy and reliability of the configuration of code audit tools. Code audit tools generated based on code audit configuration parameters can realize automated scanning and detection, reduce manual intervention, improve audit efficiency, and timely discover and repair security vulnerabilities in the code through code auditing, thereby improving the overall security of code audit tools. Code audit tools can be intelligently configured, which is conducive to improving the accuracy and reliability of code audits, and thus also conducive to improving the security of code audits and code operation.

[0092] Embodiment 2

[0093] See also Figure 2 , Figure 2 It is a flowchart of another configuration method of a code audit tool disclosed in an embodiment of the present invention. Figure 2 The configuration method of the code audit tool described can be applied to a configuration device of the code audit tool, wherein the configuration device of the code audit tool can be integrated in a cloud server or a local server, which is not limited in the embodiment of the present invention. Figure 2 As shown, the configuration method of the code audit tool may include the following operations:

[0094] 201. Obtain code information of the code to be audited, and determine code audit requirements of the code to be audited based on the code information.

[0095] 202. Generate code audit configuration parameters that match the code to be audited according to code audit requirements, and generate a code audit tool that matches the code to be audited based on all code audit configuration parameters.

[0096] In the embodiment of the present invention, for the detailed description of step 201 - step 202, please refer to the other descriptions of step 101 - step 102 in the first embodiment, and the embodiment of the present invention will not be repeated.

[0097] 203. Based on the code audit tool and the code to be audited, determine the audit requirement information, and determine the target deployment parameters based on the audit requirement information.

[0098] In an embodiment of the present invention, the target deployment parameter includes a code development and deployment process, and the code development and deployment process includes a CI / CD pipeline.

[0099] In an embodiment of the present invention, optionally, a CI / CD pipeline is an automated process designed to simplify and speed up the software development life cycle; wherein, Continuous Integration (CI): This is an automated process in which developers frequently merge code changes into a shared repository. Each time the code is merged, the build and test steps are automatically executed to ensure the reliability of the merged code changes; Continuous Delivery (CD): Based on CI, continuous delivery further advances the output of build and test to all steps to verify and ultimately deploy it to the production environment. This makes the software development cycle more efficient, allowing high-quality software to be delivered quickly and reliably; Continuous Deployment: As the final stage of a mature CI / CD pipeline, continuous deployment automatically releases the developer's changes from the version library to the production environment for user use. This makes it easier to continuously receive and integrate user feedback.

[0100] 204. Perform an audit operation on the code to be audited according to the target deployment parameters and the code audit tool to obtain a code audit result of the code to be audited.

[0101] In an embodiment of the present invention, optionally, for example, the corresponding registration can be completed on the gitlab-runner on the scanning server according to the authentication tokens on each gitlab server, and the project configuration can be modified by the gitlab administrator to adapt to all projects on gitlab, and each project configures a scanning configuration file, and triggers the scanning step of the remote scanning server when submitting the code to obtain the code audit result of the code to be audited.

[0102] It can be seen that implementation Figure 2The configuration method of the described code audit tool can determine audit requirement information based on the code audit tool and the code to be audited, and determine the target deployment parameters based on the audit requirement information, and perform audit operations on the code to be audited according to the target deployment parameters and the code audit tool to obtain the code audit results of the code to be audited. By integrating code audit in the CI / CD process, it can ensure that the code meets the security and quality standards before deployment, thereby improving the quality of the final product, which is conducive to improving the accuracy and reliability of the code audit results, and is conducive to improving the security of code operation. In addition, the automated code audit and deployment process can reduce the time for manual testing and repair, which is conducive to improving the efficiency of code auditing. It can also perform intelligent audits on the code to be audited through the target deployment parameters in the deployment process, which is conducive to improving the intelligence and efficiency of auditing the code to be audited, and is conducive to improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is conducive to improving the accuracy and reliability of code auditing, and further conducive to improving the security of code auditing and code operation.

[0103] In an optional embodiment, the method further comprises:

[0104] Determine whether the code audit results meet the preset code audit conditions;

[0105] When it is determined that the code audit result does not meet the preset code audit conditions, the target reason why the code audit result does not meet the preset code audit conditions is analyzed, and the target reason is fed back to the problem tracking system that matches the code to be audited, so as to generate audit processing parameters that match the target reason through the problem tracking system.

[0106] In this optional embodiment, optionally, the above-mentioned determination of whether the code audit result meets the preset code audit condition may include:

[0107] Determine the result matching degree between the code audit result and the target audit result corresponding to the preset code audit condition, and judge whether the result matching degree is greater than or equal to the preset matching degree threshold;

[0108] When it is determined that the result matching degree is greater than or equal to the preset matching degree threshold, it is determined that the code audit result meets the preset code audit condition; when it is determined that the result matching degree is less than the preset matching degree threshold, it is determined that the code audit result does not meet the preset code audit condition.

[0109] In this optional embodiment, further optionally, when it is determined that the code audit condition meets the preset code audit condition, the process can be terminated.

[0110] In this optional embodiment, the target cause may optionally include the cause corresponding to the problem existing in the code to be audited; for example, the target cause may include one or more of the audit rule error cause, report format error cause, and configuration integration error cause of the code to be audited.

[0111] In this optional embodiment, the audit processing parameters may optionally include processing parameters for the code audit results; further, the audit processing parameters may include an operation to change the results of the audit code execution.

[0112] In this optional embodiment, further optionally, the problem tracking system can also be used to track the code audit results and the problems existing in the code to be audited.

[0113] It can be seen that the implementation of this optional embodiment can determine whether the code audit result meets the preset code audit conditions. If not, the target reason why the code audit result does not meet the code audit conditions is analyzed and fed back to the problem tracking system that matches the code to be audited so as to generate audit processing parameters that match the target reason through the problem tracking system. By analyzing the audit results that do not meet the conditions, security vulnerabilities and risk points in the code can be identified, so that corresponding repair measures can be taken, which can be beneficial to improving the security of the code. The audit results and target reasons are fed back to the problem tracking system, which can ensure that the problems are recorded and tracked, which is convenient for subsequent repair and audit work. The audit processing parameters generated by the problem tracking system can optimize the development process and improve development efficiency. By analyzing the reasons why the code audit results do not meet the preset conditions, false positives and false negatives can be reduced, and the accuracy and reliability of the audit results can be improved. The problem tracking system can help the team to continuously monitor the code quality, discover and solve problems in a timely manner, and promote the continuous improvement of code quality, which is beneficial to improving the intelligence and efficiency of auditing the code to be audited, and is beneficial to improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is beneficial to improving the accuracy and reliability of the code audit, and thus it is also beneficial to improving the security of the code audit and code operation.

[0114] In another optional embodiment, the method further comprises:

[0115] Determine whether the code audit results meet the preset audit optimization conditions;

[0116] When it is determined that the code audit result meets the preset audit optimization conditions, the configuration parameters to be optimized in the code audit tool are determined according to the code audit result and the code audit tool, and the optimization factors corresponding to the configuration parameters to be optimized are determined, and based on all the configuration parameters to be optimized and all the optimization factors, the audit tool update parameters are generated;

[0117] Update the code audit tool according to the audit tool update parameters.

[0118] In this optional embodiment, further optionally, when it is determined that the code audit result does not meet the preset audit optimization conditions, the process can be terminated.

[0119] In this optional embodiment, optionally, the above-mentioned determining the configuration parameters to be optimized in the code audit tool according to the code audit results and the code audit tool, and determining the optimization factors corresponding to the configuration parameters to be optimized may include:

[0120] According to the code audit results and the code audit tool, and in combination with the preset audit optimization conditions, the configuration parameters to be optimized are determined from all the code audit configuration parameters included in the code audit tool;

[0121] For each configuration parameter to be optimized, the optimization factor corresponding to the configuration parameter to be optimized is determined based on the preset audit optimization conditions and the code audit results.

[0122] In this optional embodiment, the configuration parameters to be optimized may optionally include audit rules to be adjusted.

[0123] In this optional embodiment, optionally, the above-mentioned generation of audit tool update parameters based on all configuration parameters to be optimized and all optimization factors may include:

[0124] For each configuration parameter to be optimized, generating a configuration update parameter corresponding to the configuration parameter to be optimized according to the optimization factor corresponding to the configuration parameter to be optimized;

[0125] Generate audit tool update parameters based on the configuration update parameters corresponding to all configuration parameters to be optimized.

[0126] It can be seen that the implementation of this optional embodiment can determine whether the code audit results meet the preset audit optimization conditions. If they do, the configuration parameters to be optimized of the code audit tool and the corresponding optimization factors are determined based on the code audit results and the code audit tool. The audit tool update parameters are generated based on all the configuration parameters to be optimized and the optimization factors, and then the code audit tool is updated. By optimizing the configuration parameters and optimization factors, the execution efficiency and accuracy of the audit tool can be improved, so that it can better adapt to the ever-changing code base and security requirements, which is conducive to improving the accuracy and reliability of the audit operations performed on the audit code, as well as the security of the audit operations performed on the audit code. In addition, by optimizing the configuration parameters of the audit tool, false positives and negatives can be reduced, thereby improving the reliability of the audit results. Reliability, thereby saving the development team time spent on false alarms, which is conducive to improving the efficiency of intelligent auditing of codes. By reducing false alarms and optimizing the audit process, the development team can obtain accurate audit feedback more quickly and speed up the development and deployment process. The audit tool can automatically adapt to changes in the code base and new security threats, which improves the adaptability and flexibility of the audit tool. By continuously optimizing the audit tool, security vulnerabilities in the code can be discovered and fixed earlier, and the overall quality of the code can be improved, which is conducive to improving the intelligence and efficiency of auditing the audit code, and is conducive to improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is conducive to improving the accuracy and reliability of the code audit, and thus is also conducive to improving the security of the code audit and code operation.

[0127] In another optional embodiment, according to the code audit requirements, code audit configuration parameters matching the code to be audited are generated, including:

[0128] According to the code audit requirements, determine the code data parameters corresponding to the code to be audited, wherein the code data parameters include one or more of the code data type parameters and code data format parameters of the code to be audited;

[0129] Based on the code data parameters, determine the code audit rules corresponding to the code to be audited, and based on the code audit rules and code audit requirements, determine the code audit configuration requirements;

[0130] According to the code audit configuration requirement, a code audit configuration parameter matching the code audit configuration requirement is determined from a predetermined set of code configuration parameters.

[0131] In this optional embodiment, optionally, the code data type parameter may include a programming language type parameter corresponding to the code to be audited, and the code data format parameter may include a security specification parameter and a format specification parameter corresponding to the code to be audited; for example, the code data type parameter may include php and vue programming languages, where php follows the OWASPTop 10 security specification and psr2 format specification, and vue follows the officially defined format specification; the integrated system is the version control system Git, and the continuous integration / continuous deployment (CI / CD) tool GitLab CI.

[0132] In this optional embodiment, further optionally, the audit rules include audit rules based on official specifications, security audit rules based on OWASP Top 10 security specifications, custom audit rules, and whitelist rules; the report format is a graphic display page based on JSON and front-end rendering, and the content includes the name of the submitted project, the code submitter, the rules triggered by the submitted code and the specific number of code lines, the specific time of submission, etc.; the configuration integration options include trigger conditions (when pushing code), notification method of audit results (message push)

[0133] In this optional embodiment, optionally, the above-mentioned determining the code audit configuration requirement based on the code audit rule and the code audit requirement may include:

[0134] Based on the code audit rules and code audit requirements, generate audit rule requirement information, and determine at least one target audit rule that matches the audit rule requirement information from all pre-determined code audit rules;

[0135] Determine code audit configuration requirements based on target audit rules.

[0136] It can be seen that the implementation of this optional embodiment can determine the corresponding code data parameters according to the code audit requirements, determine the code audit rules corresponding to the code to be audited based on the code data parameters, and determine the code audit configuration requirements based on the code audit rules and the code audit requirements, and determine the code audit configuration parameters that match the code audit configuration requirements in the code configuration parameter set according to the code audit configuration requirements. By customizing the audit configuration parameters for the code to be audited, it can ensure that the audit tool focuses on the most relevant code data type and format, thereby improving the accuracy of the audit results. By accurately matching the code data parameters and the audit rules, it is possible to achieve targeted audits of the code to be audited, which is conducive to improving the configuration accuracy and reliability of the code audit tool. In addition, a detailed record of the audit process is provided through customized audit configuration parameters, which enhances the transparency and traceability of the audit, so that security vulnerabilities in the code can be discovered and repaired earlier, and the overall quality of the code can be improved. It is conducive to improving the intelligence and efficiency of auditing the code to be audited, and it is conducive to improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is conducive to improving the accuracy and reliability of the code audit, and further conducive to improving the security of the code audit and code operation.

[0137] In yet another optional embodiment, based on all code audit configuration parameters, a code audit tool matching the code to be audited is generated, including:

[0138] Determine the code inspection tool for the code to be audited, and generate an automatic audit program based on the code inspection tool and all code audit configuration parameters;

[0139] Based on the automatic operation of the audit program, perform parameter verification operations on all code audit configuration parameters, obtain parameter verification results, and determine whether the parameter verification results meet the preset parameter verification conditions;

[0140] When it is determined that the parameter verification result does not meet the preset parameter verification condition, a data processing operation is performed on all code audit configuration parameters to obtain a data processing result, and an update operation is performed on all code audit configuration parameters based on the data processing result, and an operation of determining whether the parameter verification result meets the preset parameter verification condition is re-executed;

[0141] When it is determined that the parameter verification result meets the preset parameter verification conditions, a code audit tool matching the code to be audited is generated based on all code audit configuration parameters.

[0142] In this optional embodiment, optionally, the code checking tool for the code to be audited can be obtained by determining various rules with the demand personnel, and determining the type and format of the reported data and other requirements, and installing corresponding checking tools on the scanning server, such as semgrep, CodeSniffer, eslin, etc., and configuring relevant rules.

[0143] In this optional embodiment, optionally, the above-mentioned performing parameter verification operations on all code audit configuration parameters based on automatically running the audit program to obtain parameter verification results may include: inputting all code audit configuration parameters into the automatically running audit program to perform verification operations on the code audit configuration parameters through the automatically running audit program to obtain parameter verification results.

[0144] In this optional embodiment, the data processing operation may optionally include one or more of a data parsing operation, a data cleaning operation, a data format unification operation, and an operation of submitting data to a server for storage.

[0145] In this optional embodiment, optionally, the above-mentioned update operation on all code audit configuration parameters based on the data processing results may include: based on the data processing results, determining the parameters to be processed in the code audit configuration parameters, and determining the update processing parameters corresponding to each parameter to be processed, and performing an update operation on all code audit configuration parameters based on all the update processing parameters.

[0146] In this optional embodiment, optionally, the specific process of generating a code audit tool that matches the code to be audited can be by determining various rules with the demand personnel, and determining the type and format of the reported data, and installing corresponding inspection tools on the scanning server, such as semgrep, CodeSniffer, eslint, etc., and configuring relevant rules. Install corresponding inspection tools on the scanning server, such as semgrep, CodeSniffer, eslint, etc., and configure relevant rules. When the code is submitted, the audit program will be automatically run, data parsing and cleaning, format unification, submission to the server for warehousing and other operations, and gitlab-runner will be installed to facilitate the integration of subsequent scanning tasks into the development and deployment process, thereby obtaining the code audit tool.

[0147] It can be seen that the implementation of this optional embodiment can determine the code inspection tool for the code to be audited, generate an automatic audit program based on the code inspection tool and all code audit configuration parameters, and perform parameter verification operations on all code audit configuration parameters based on the automatic audit program to obtain parameter verification results, and determine whether the parameter verification results meet the preset parameter verification conditions. If not, perform data processing operations on all code audit configuration parameters to obtain data processing results, thereby performing update operations on all code audit configuration parameters and re-execute the operation of determining whether the parameter verification results meet the preset parameter verification conditions. If so, generate a matching code audit tool based on all code audit configuration parameters. By customizing the audit tool for the code to be audited, it can be ensured that the audit tool can accurately target specific code inspection requirements, thereby improving the applicability and effectiveness of the audit. And by performing parameter verification operations, the validity of all code audit configuration parameters can be ensured to avoid inaccurate audit results due to configuration errors. When parameter verification does not meet the conditions, the configuration parameters can be corrected through data processing and update operations to ensure the reliability of the audit tool, which is conducive to improving the accuracy and reliability of code audits. By repeatedly verifying and updating configuration parameters until the preset conditions are met, the accuracy of audit results can be improved. Accurate configuration parameters and automated verification processes help reduce false positives and false negatives, improve audit quality, and help improve the intelligence and efficiency of auditing codes, which is conducive to improving the overall security of code audit tools. Code audit tools can be intelligently configured, which is conducive to improving the accuracy and reliability of code audits, and thus is also conducive to improving the security of code audits and code operations.

[0148] In yet another optional embodiment, performing an update operation on the code audit tool according to the audit tool update parameter includes:

[0149] Obtain code feedback information corresponding to the code audit results, update parameters based on the audit tool, and determine the audit tool optimization plan;

[0150] Based on the code feedback information, determine the feasibility of the audit tool optimization solution and judge whether the feasibility of the solution meets the preset tool optimization conditions;

[0151] When it is determined that the feasibility of the solution meets the preset tool optimization conditions, the code audit tool is updated based on the audit tool optimization solution;

[0152] When it is determined that the feasibility of the solution does not meet the preset tool optimization conditions, a data processing operation is performed on the audit tool update parameters, and an update operation is performed on the code audit tool based on the processed audit tool update parameters;

[0153] The data processing operation includes one or more of a false alarm rule processing operation and a special file processing operation.

[0154] In this optional embodiment, the code feedback information package optionally includes data feedback information corresponding to the code to be audited and user feedback information.

[0155] In this optional embodiment, optionally, for example, the update operation performed on the code audit tool can be through analyzing data and user feedback to confirm whether it is a lack of audit rules, audit rule false positives, or other situations, and when it is determined that the optimization plan is feasible, combined with the feedback information, the audit results can be optimized by implementing custom rules, whitening false positive rules, special processing of special files, etc., and the code audit tool can be optimized.

[0156] In this optional embodiment, the audit tool optimization scheme may optionally include all audit tool update parameters.

[0157] In this optional embodiment, optionally, the above-mentioned determination of the feasibility of the audit tool optimization solution based on the code feedback information may include: calculating the optimization matching degree between the code feedback information and the audit tool optimization solution, and determining the feasibility of the audit tool optimization solution based on the optimization matching degree.

[0158] In this optional embodiment, optionally, the above-mentioned determination of whether the feasibility of the solution meets the preset tool optimization conditions may include:

[0159] Determine whether the optimization matching degree corresponding to the feasibility of the solution is greater than or equal to the optimization degree threshold corresponding to the preset tool optimization condition;

[0160] When it is determined that the optimization matching degree corresponding to the feasibility of the solution is greater than or equal to the optimization degree threshold corresponding to the preset tool optimization condition, the feasibility of the solution is determined to meet the preset tool optimization condition; when it is determined that the optimization matching degree corresponding to the feasibility of the solution is less than the optimization degree threshold corresponding to the preset tool optimization condition, the feasibility of the solution is determined to not meet the preset tool optimization condition.

[0161] In this optional embodiment, optionally, the false alarm rule processing operation may include one or more of a custom rule processing operation and a false alarm rule whitelisting operation, and the special file processing operation may include one or more of a special file deletion operation and a special file modification operation; wherein, the false alarm rule whitelisting operation generally refers to when a security tool mistakenly identifies legitimate code or behavior as a security threat (i.e., a false alarm) during code auditing, security scanning, or intrusion detection, these mistakenly identified rules or behaviors are added to the whitelist to avoid the same false alarm from occurring again in the future; the custom rule processing operation refers to users writing specific rules to enhance or modify the functionality of code auditing tools based on their own specific needs.

[0162] It can be seen that the implementation of this optional embodiment can obtain the code feedback information corresponding to the code audit result and determine the audit tool optimization plan according to the audit tool update parameters, determine the feasibility of the audit tool optimization plan based on the code feedback information, and judge whether the feasibility of the plan meets the preset tool optimization conditions. If it meets the conditions, the code audit tool is updated based on the audit tool optimization plan. If it does not meet the conditions, the audit tool update parameters are updated based on the data processing operations and the code audit tool is updated based on the processed audit tool update parameters. By obtaining code feedback information and determining the optimization plan, it can be ensured that the audit tool is better adapted to specific code bases and audit requirements, and the accuracy and efficiency of code auditing can be improved. The audit tool is subjected to parameter verification and data processing operations, such as false alarm rules. The processing and special file processing can reduce false positives and missed negatives and improve the reliability of audit results. Through update operations and data processing, the performance of audit tools can be optimized, the audit speed can be improved and resource consumption can be reduced. Through automated parameter verification and data processing operations, the audit tools can be made more intelligent and can automatically adjust the configuration to adapt to different audit scenarios. Based on accurate audit results and efficient audit tools, it helps to discover potential problems in the code earlier, thereby improving code quality at an early stage, which is conducive to improving the intelligence and efficiency of auditing the audit code, and improving the overall security of code audit tools. Code audit tools can be intelligently configured, which is conducive to improving the accuracy and reliability of code audits, and thus helping to improve the security of code audits and code operations.

[0163] Embodiment 3

[0164] See also Figure 3 , Figure 3 Schematic diagram of a configuration device of a code audit tool disclosed in an embodiment of the present invention. Figure 3 As shown, the configuration device of the code audit tool may include:

[0165] The acquisition module 301 is used to acquire the code information of the code to be audited;

[0166] A determination module 302 is used to determine the code audit requirements of the code to be audited according to the code information;

[0167] The generation module 303 is used to generate code audit configuration parameters that match the code to be audited according to the code audit requirements, and to generate a code audit tool that matches the code to be audited based on all the code audit configuration parameters.

[0168] It can be seen that implementation Figure 3 The described device can obtain code information of the code to be audited, and determine the code audit requirements of the code to be audited based on the code information, and generate matching code audit configuration parameters based on the code audit requirements, and generate matching code audit tools based on the code audit configuration parameters, and can obtain detailed information of the code to be audited, such as programming language, framework, dependent library, etc., and can more accurately determine the focus and scope of the audit, thereby improving audit efficiency and audit intelligence, and a comprehensive understanding of code information can help identify potential high-risk areas, such as common security vulnerabilities, sensitive data processing, etc., so as to pay more attention in the audit process, reduce audit risks, and help improve the security and reliability of code audits, and also It can generate matching code audit configuration parameters according to the characteristics and requirements of the code to be audited, such as audit rules, vulnerability library, scanning depth, etc., to implement customized audit strategies, thereby realizing targeted configuration of code audit tools, which is conducive to improving the accuracy and reliability of the configuration of code audit tools. Code audit tools generated based on code audit configuration parameters can realize automated scanning and detection, reduce manual intervention, improve audit efficiency, and timely discover and repair security vulnerabilities in the code through code auditing, thereby improving the overall security of code audit tools. Code audit tools can be intelligently configured, which is conducive to improving the accuracy and reliability of code audits, and thus also conducive to improving the security of code audits and code operation.

[0169] In an optional embodiment, if Figure 4 As shown, the determination module 302 is further used to determine audit requirement information based on the code audit tool and the code to be audited, and determine target deployment parameters based on the audit requirement information, wherein the target deployment parameters include a code development and deployment process, and the code development and deployment process includes a CI / CD pipeline;

[0170] The device also includes:

[0171] The audit module 304 is used to perform an audit operation on the code to be audited according to the target deployment parameters and the code audit tool to obtain the code audit result of the code to be audited.

[0172] It can be seen that implementation Figure 4The described device can determine audit requirement information based on the code audit tool and the code to be audited, and determine the target deployment parameters based on the audit requirement information, and perform audit operations on the code to be audited according to the target deployment parameters and the code audit tool to obtain the code audit results of the code to be audited. By integrating code audit in the CI / CD process, it can ensure that the code meets the safety and quality standards before deployment, thereby improving the quality of the final product, which is conducive to improving the accuracy and reliability of the code audit results, and is conducive to improving the security of code operation. In addition, through the automated code audit and deployment process, the time for manual testing and repair can be reduced, which is conducive to improving the efficiency of code auditing. It can also perform intelligent audits on the code to be audited through the target deployment parameters in the deployment process, which is conducive to improving the intelligence and efficiency of the audit of the code to be audited, and is conducive to improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is conducive to improving the accuracy and reliability of the code audit, and further conducive to improving the security of the code audit and code operation.

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

[0174] The first judgment module 305 is used to judge whether the code audit result meets the preset code audit condition;

[0175] An analysis module 306 is used to analyze the target reason why the code audit result does not meet the preset code audit condition when the first judgment module 305 judges that the code audit result does not meet the preset code audit condition;

[0176] The feedback module 307 is used to feed back the target cause to the issue tracking system that matches the code to be audited, so as to generate an audit processing parameter that matches the target cause through the issue tracking system.

[0177] It can be seen that implementation Figure 4The described device can determine whether the code audit result meets the preset code audit condition. If not, the target reason why the code audit result does not meet the code audit condition is analyzed and fed back to the problem tracking system matching the code to be audited so as to generate the audit processing parameter matching the target reason through the problem tracking system. By analyzing the audit result that does not meet the condition, the security loopholes and risk points in the code can be identified, so as to take corresponding repair measures, which can be beneficial to improving the security of the code. The audit result and the target reason are fed back to the problem tracking system, which can ensure that the problem is recorded and tracked, and facilitate the subsequent repair and audit work. The audit processing parameters generated by the problem tracking system can optimize the development process and improve the development efficiency. By analyzing the reason why the code audit result does not meet the preset condition, false positives and false negatives can be reduced, and the accuracy and reliability of the audit result can be improved. The problem tracking system can help the team to continuously monitor the code quality, timely discover and solve problems, and promote the continuous improvement of code quality, which is beneficial to improving the intelligence and efficiency of auditing the code to be audited, and is beneficial to improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is beneficial to improving the accuracy and reliability of the code audit, and further beneficial to improving the security of the code audit and code operation.

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

[0179] The second judgment module 308 is used to judge whether the code audit result meets the preset audit optimization condition;

[0180] The determination module 302 is further configured to determine the configuration parameters to be optimized in the code audit tool according to the code audit result and the code audit tool, and determine the optimization factor corresponding to the configuration parameters to be optimized when the second determination module 308 determines that the code audit result meets the preset audit optimization condition;

[0181] The generation module 303 is further used to generate audit tool update parameters based on all configuration parameters to be optimized and all optimization factors;

[0182] The update module 309 is used to perform an update operation on the code audit tool according to the update parameters of the audit tool.

[0183] It can be seen that implementation Figure 4The described device can determine whether the code audit result meets the preset audit optimization conditions. If so, the device determines the configuration parameters to be optimized of the code audit tool and the corresponding optimization factors based on the code audit result and the code audit tool, generates audit tool update parameters based on all configuration parameters to be optimized and the optimization factors, and then performs an update operation on the code audit tool. By optimizing the configuration parameters and the optimization factors, the execution efficiency and accuracy of the audit tool can be improved, so that it can better adapt to the ever-changing code base and security requirements, which is conducive to improving the accuracy and reliability of the audit operation performed on the audit code, and is conducive to improving the security of the audit operation performed on the audit code. By optimizing the configuration parameters of the audit tool, false positives and negatives can be reduced, and the reliability of the audit results can be improved. This saves the development team time spent on false alarms, which is conducive to improving the efficiency of intelligent auditing of codes. By reducing false alarms and optimizing the audit process, the development team can obtain accurate audit feedback more quickly and speed up the development and deployment process. The audit tool can automatically adapt to changes in the code base and new security threats, which improves the adaptability and flexibility of the audit tool. By continuously optimizing the audit tool, security vulnerabilities in the code can be discovered and fixed earlier, improving the overall quality of the code, which is conducive to improving the intelligence and efficiency of auditing the audit code, and improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is conducive to improving the accuracy and reliability of code audits, and thus also helps to improve the security of code audits and code operations.

[0184] In yet another optional embodiment, Figure 4 As shown, the specific method of generating module 303 to generate code audit configuration parameters matching the code to be audited according to the code audit requirements includes:

[0185] According to the code audit requirements, determine the code data parameters corresponding to the code to be audited, wherein the code data parameters include one or more of the code data type parameters and code data format parameters of the code to be audited;

[0186] Based on the code data parameters, determine the code audit rules corresponding to the code to be audited, and based on the code audit rules and code audit requirements, determine the code audit configuration requirements;

[0187] According to the code audit configuration requirement, a code audit configuration parameter matching the code audit configuration requirement is determined from a predetermined set of code configuration parameters.

[0188] It can be seen that implementation Figure 4The described device can determine the corresponding code data parameters according to the code audit requirements, determine the code audit rules corresponding to the code to be audited based on the code data parameters, and determine the code audit configuration requirements based on the code audit rules and the code audit requirements, and determine the code audit configuration parameters that match the code audit configuration requirements in the code configuration parameter set according to the code audit configuration requirements. By customizing the audit configuration parameters for the code to be audited, it can ensure that the audit tool focuses on the most relevant code data type and format, thereby improving the accuracy of the audit results. By accurately matching the code data parameters and the audit rules, it is possible to achieve targeted audits of the code to be audited, which is conducive to improving the configuration accuracy and reliability of the code audit tool. In addition, a detailed record of the audit process is provided through customized audit configuration parameters, which enhances the transparency and traceability of the audit, so that security vulnerabilities in the code can be discovered and repaired earlier, and the overall quality of the code can be improved, which is conducive to improving the intelligence and efficiency of auditing the code to be audited, and is conducive to improving the overall security of the code audit tool. The code audit tool can be intelligently configured, which is conducive to improving the accuracy and reliability of the code audit, and further conducive to improving the security of the code audit and code operation.

[0189] In yet another optional embodiment, Figure 4 As shown, the specific method of generating module 303 to generate a code audit tool matching the code to be audited based on all code audit configuration parameters includes:

[0190] Determine the code inspection tool for the code to be audited, and generate an automatic audit program based on the code inspection tool and all code audit configuration parameters;

[0191] Based on the automatic operation of the audit program, perform parameter verification operations on all code audit configuration parameters, obtain parameter verification results, and determine whether the parameter verification results meet the preset parameter verification conditions;

[0192] When it is determined that the parameter verification result does not meet the preset parameter verification condition, a data processing operation is performed on all code audit configuration parameters to obtain a data processing result, and an update operation is performed on all code audit configuration parameters based on the data processing result, and an operation of determining whether the parameter verification result meets the preset parameter verification condition is re-executed;

[0193] When it is determined that the parameter verification result meets the preset parameter verification conditions, a code audit tool matching the code to be audited is generated based on all code audit configuration parameters.

[0194] It can be seen that implementation Figure 4The described device can determine the code inspection tool for the code to be audited, generate an automatic audit program based on the code inspection tool and all code audit configuration parameters, and perform parameter verification operations on all code audit configuration parameters based on the automatic audit program to obtain parameter verification results, and judge whether the parameter verification results meet the preset parameter verification conditions. If not, perform data processing operations on all code audit configuration parameters to obtain data processing results, thereby performing update operations on all code audit configuration parameters and re-execute the operation of judging whether the parameter verification results meet the preset parameter verification conditions. If so, generate a matching code audit tool based on all code audit configuration parameters. By customizing the audit tool for the code to be audited, it can be ensured that the audit tool can accurately target specific code inspection requirements, thereby improving the applicability and effectiveness of the audit, and And by performing parameter verification operations, the validity of all code audit configuration parameters can be ensured to avoid inaccurate audit results due to configuration errors. When parameter verification does not meet the conditions, the configuration parameters can be corrected through data processing and update operations to ensure the reliability of the audit tool, which is conducive to improving the accuracy and reliability of code audits. By repeatedly verifying and updating configuration parameters until the preset conditions are met, the accuracy of audit results can be improved. Accurate configuration parameters and automated verification processes help reduce false positives and negatives, improve audit quality, and help improve the intelligence and efficiency of auditing codes, which is conducive to improving the overall security of code audit tools. Code audit tools can be intelligently configured, which is conducive to improving the accuracy and reliability of code audits, and thus is also conducive to improving the security of code audits and code operations.

[0195] In yet another optional embodiment, Figure 4 As shown, the specific manner in which the updating module 309 performs the updating operation on the code audit tool according to the audit tool update parameters includes:

[0196] Obtain code feedback information corresponding to the code audit results, update parameters based on the audit tool, and determine the audit tool optimization plan;

[0197] Based on the code feedback information, determine the feasibility of the audit tool optimization solution and judge whether the feasibility of the solution meets the preset tool optimization conditions;

[0198] When it is determined that the feasibility of the solution meets the preset tool optimization conditions, the code audit tool is updated based on the audit tool optimization solution;

[0199] When it is determined that the feasibility of the solution does not meet the preset tool optimization conditions, a data processing operation is performed on the audit tool update parameters, and an update operation is performed on the code audit tool based on the processed audit tool update parameters;

[0200] The data processing operation includes one or more of a false alarm rule processing operation and a special file processing operation.

[0201] It can be seen that implementation Figure 4 The described device can obtain code feedback information corresponding to the code audit results and determine the audit tool optimization plan according to the audit tool update parameters, determine the feasibility of the audit tool optimization plan based on the code feedback information, and judge whether the feasibility of the plan meets the preset tool optimization conditions. If it meets the conditions, the code audit tool is updated based on the audit tool optimization plan. If it does not meet the conditions, the audit tool is updated based on the data processing operation and the code audit tool is updated based on the processed audit tool update parameters. By obtaining code feedback information and determining the optimization plan, it can ensure that the audit tool is better adapted to specific code bases and audit requirements, improve the accuracy and efficiency of code auditing, and perform parameter verification and data processing operations on the audit tool, such as false alarm rule processing. and special file processing can reduce false positives and missed negatives, and improve the reliability of audit results. Through update operations and data processing, the performance of audit tools can be optimized, the audit speed can be improved, and resource consumption can be reduced. Through automated parameter verification and data processing operations, audit tools can be made more intelligent, and can automatically adjust configurations to adapt to different audit scenarios. Based on accurate audit results and efficient audit tools, it helps to discover potential problems in the code earlier, thereby improving code quality at an early stage, which is conducive to improving the intelligence and efficiency of auditing the audit code, and is conducive to improving the overall security of code audit tools. Code audit tools can be intelligently configured, which is conducive to improving the accuracy and reliability of code audits, and thus is also conducive to improving the security of code audits and code operations.

[0202] Embodiment 4

[0203] See also Figure 5 , Figure 5 FIG. 1 is a schematic diagram of a configuration device of another code audit tool disclosed in an embodiment of the present invention. Figure 5 As shown, the configuration device of the code audit tool may include:

[0204] A memory 401 storing executable program codes;

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

[0206] The processor 402 calls the executable program code stored in the memory 401 to execute the steps in the configuration method of the code audit tool described in the first embodiment of the present invention or the second embodiment of the present invention.

[0207] Embodiment 5

[0208] 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 in the configuration method of the code audit tool described in Embodiment 1 or Embodiment 2 of the present invention.

[0209] Embodiment 6

[0210] 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 configuration method of the code audit tool described in Example 1 or Example 2.

[0211] The device embodiments described above are 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, i.e., 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 creative work.

[0212] 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.

[0213] Finally, it should be noted that the configuration method and device of a code audit tool disclosed in the embodiment 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 therein 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. A configuration method for a code audit tool, characterized in that: The method comprises: Obtaining code information of the code to be audited, and determining code audit requirements of the code to be audited based on the code information; According to the code audit requirements, code audit configuration parameters matching the code to be audited are generated, and based on all the code audit configuration parameters, a code audit tool matching the code to be audited is generated.

2. The configuration method of the code audit tool according to claim 1, characterized in that: The method further comprises: Based on the code audit tool and the code to be audited, audit requirement information is determined, and target deployment parameters are determined based on the audit requirement information, wherein the target deployment parameters include a code development and deployment process, and the code development and deployment process includes a CI / CD pipeline; An audit operation is performed on the code to be audited according to the target deployment parameters and the code audit tool to obtain a code audit result of the code to be audited.

3. The configuration method of the code audit tool according to claim 2, characterized in that: The method further comprises: Determine whether the code audit result meets the preset code audit conditions; When it is determined that the code audit result does not meet the preset code audit conditions, the target reason why the code audit result does not meet the preset code audit conditions is analyzed, and the target reason is fed back to the problem tracking system that matches the code to be audited, so as to generate audit processing parameters that match the target reason through the problem tracking system.

4. The configuration method of the code audit tool according to claim 2, characterized in that: The method further comprises: Determine whether the code audit result meets the preset audit optimization conditions; When it is determined that the code audit result meets the preset audit optimization condition, the configuration parameters to be optimized in the code audit tool are determined according to the code audit result and the code audit tool, and the optimization factors corresponding to the configuration parameters to be optimized are determined, and based on all the configuration parameters to be optimized and all the optimization factors, audit tool update parameters are generated; According to the audit tool update parameters, an update operation is performed on the code audit tool.

5. The configuration method of the code audit tool according to claim 1, characterized in that: The step of generating code audit configuration parameters matching the code to be audited according to the code audit requirements includes: According to the code audit requirement, determine the code data parameters corresponding to the code to be audited, wherein the code data parameters include one or more of the code data type parameters and code data format parameters of the code to be audited; Based on the code data parameters, determine the code audit rules corresponding to the code to be audited, and based on the code audit rules and code audit requirements, determine the code audit configuration requirements; According to the code audit configuration requirement, a code audit configuration parameter matching the code audit configuration requirement is determined from a predetermined set of code configuration parameters.

6. The configuration method of the code audit tool according to claim 1, characterized in that: The step of generating a code audit tool that matches the code to be audited based on all the code audit configuration parameters includes: Determine a code inspection tool for the code to be audited, and generate an automatic audit program based on the code inspection tool and all the code audit configuration parameters; Based on the automatic operation audit program, perform parameter verification operation on all the code audit configuration parameters, obtain parameter verification results, and determine whether the parameter verification results meet the preset parameter verification conditions; When it is determined that the parameter verification result does not meet the preset parameter verification condition, a data processing operation is performed on all the code audit configuration parameters to obtain a data processing result, and an update operation is performed on all the code audit configuration parameters based on the data processing result, and the operation of determining whether the parameter verification result meets the preset parameter verification condition is re-executed; When it is determined that the parameter verification result meets the preset parameter verification condition, a code audit tool matching the code to be audited is generated based on all the code audit configuration parameters.

7. The configuration method of the code audit tool according to claim 4, characterized in that: The updating operation of the code audit tool according to the audit tool update parameter includes: Obtaining code feedback information corresponding to the code audit result, and determining an audit tool optimization plan based on the audit tool update parameters; Based on the code feedback information, determine the feasibility of the audit tool optimization solution, and judge whether the feasibility of the solution meets the preset tool optimization conditions; When it is determined that the feasibility of the solution meets the preset tool optimization condition, an update operation is performed on the code audit tool based on the audit tool optimization solution; When it is determined that the feasibility of the solution does not meet the preset optimization conditions of the tool, a data processing operation is performed on the audit tool update parameters, and an update operation is performed on the code audit tool based on the processed audit tool update parameters; The data processing operation includes one or more of a false alarm rule processing operation and a special file processing operation.

8. A configuration device for a code audit tool, characterized in that: The device comprises: The acquisition module is used to obtain the code information of the code to be audited; A determination module, used to determine the code audit requirements of the code to be audited according to the code information; A generation module is used to generate code audit configuration parameters that match the code to be audited according to the code audit requirements, and to generate a code audit tool that matches the code to be audited based on all the code audit configuration parameters.

9. A configuration device for a code audit tool, characterized in that: The device 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 configuration method of the code audit tool 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 configuration method of the code audit tool as described in any one of claims 1-7.