Source code data leakage prevention method for source code auditing
By generating a detailed source code audit report and automated location link index matching and search process, the problem of leakage risk in source code audit is solved, audit efficiency and accuracy are improved, and the source code data is strictly protected.
Patent Information
- Application Number
- CN202411684124.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-22
- Publication Date
- 2025-03-11
AI Technical Summary
During the software development process, the risk of source code leakage continues to increase in code sharing and remote collaboration, resulting in serious threats to enterprise intellectual property and trade secrets.
By generating a source code audit report containing file name, line number, column number, location link index, and vulnerability number when using static code analysis tools for source code audits, auditors can quickly locate problem points. Match the location link index based on the auditor's permissions, and automatically find the corresponding source code in the local source code library to prevent data leakage.
It improves the efficiency and accuracy of audits, reduces human operation errors and omissions through automated processes, and achieves strict control over source code access, effectively preventing illegal leakage of source code data.
Smart Images

Figure CN119598518A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of source code data leakage prevention, and in particular to a source code data leakage prevention method for source code auditing. Background Art
[0002] In the software development process, source code auditing is an important part of ensuring code quality and security. However, with the popularization of code sharing and remote collaboration, the risk of source code leakage is also increasing. Once the source code is leaked, it may cause serious damage to the company's intellectual property, business secrets and market competitiveness. Therefore, how to effectively prevent the leakage of source code during the audit process has become an urgent problem for software development companies to solve.
[0003] Traditional source code auditing methods often rely on manual review, which is not only inefficient but also prone to errors. In order to improve auditing efficiency and accuracy, static code analysis tools have emerged. Static code analysis tools can conduct in-depth analysis of source code without executing the code to discover potential security vulnerabilities, programming errors, and bad coding habits. However, although static code analysis tools have improved auditing efficiency, the risk of source code leakage still exists. Summary of the invention
[0004] In view of this, the present invention proposes a source code data leakage prevention method for source code auditing, which can improve auditing efficiency and accuracy while ensuring the security of source code data.
[0005] The technical solution of the present invention is achieved in this way:
[0006] A source code data leakage prevention method for source code auditing, specifically comprising:
[0007] When using a static code analysis tool to perform source code audit, a source code audit report is generated, wherein the source code audit report includes a file name, a line number, a column number, a location link index, and a vulnerability number;
[0008] Matching the problem points with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file;
[0009] Obtain the authority of source code auditors;
[0010] Match the corresponding location link index according to the authority of the source code auditor;
[0011] The corresponding source code is searched in the local source code library according to the location link index, thereby preventing source code data leakage.
[0012] As a further optional solution of the source code data leakage prevention method for source code auditing, when using a static code analysis tool to perform source code auditing, a source code audit report is generated, wherein the source code audit report includes a file name, a line number, a column number, a location link index and a vulnerability number, specifically including:
[0013] Use static code analysis tools to perform static analysis on source code and identify potential code problems;
[0014] Execute source code audit tasks based on process-based tools, and record the task status and execution time during the task execution process;
[0015] Collect code quality reports generated by static code analysis tools;
[0016] Integrate the task execution results of process tools;
[0017] Generate a code problem list based on the collected code quality reports and task execution results, wherein the code problem list includes a detailed description of each problem, the file name, line number, column number, and vulnerability number;
[0018] Build a location link index for each code issue;
[0019] Set access permissions for location link indexes to generate source code audit reports.
[0020] As a further optional solution of the source code data leakage prevention method for source code auditing, the problem point is matched with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file, specifically including:
[0021] Parse each location link index to extract the file path, file name, line number and column number;
[0022] In the source code environment, find the corresponding source code file according to the parsed file path and file name;
[0023] Use a text editor to find the location of the problem in the source code file based on the line number and column number;
[0024] Bind the location of the problem point to the location link index.
[0025] A source code data leakage prevention system for source code auditing, comprising:
[0026] A generation module, used to generate a source code audit report when using a static code analysis tool to perform source code audit, wherein the source code audit report includes a file name, line number, column number, location link index, and vulnerability number;
[0027] A problem point correspondence module, used to correspond the problem point with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file;
[0028] Acquisition module, used to obtain the permissions of source code auditors;
[0029] The matching module is used to match the corresponding location link index according to the authority of the source code auditor;
[0030] The search module is used to search for the corresponding source code in the local source code library according to the position link index, so as to prevent the leakage of source code data.
[0031] As a further optional solution of the source code data leakage prevention system for source code auditing, the generation module includes:
[0032] Static analysis module, used to perform static analysis on source code using static code analysis tools to identify potential code problems;
[0033] The task execution record module is used to execute source code audit tasks according to the process tool and record the task status and execution time during the task execution process;
[0034] Code quality report generation module, used to collect code quality reports generated by static code analysis tools;
[0035] Integration module, used to integrate the task execution results of process tools;
[0036] A processing module, used to generate a code problem list based on the collected code quality report and task execution results, wherein the code problem list includes a specific description of each problem, the file name, line number, column number and vulnerability number;
[0037] A building module for building a location link index for each code issue;
[0038] A settings module is used to set access permissions for location link indexes to generate source code audit reports.
[0039] As a further optional solution of the source code data leakage prevention system for source code auditing, the problem point corresponding module includes:
[0040] The extraction module is used to parse each location link index and extract the file path, file name, line number and column number;
[0041] The source code file search module is used to find the corresponding source code file in the source code environment according to the parsed file path and file name;
[0042] The problem point search module is used to find the location of the problem point in the source code file based on the line number and column number using a text editor;
[0043] The binding module is used to bind the location of the problem point with the location link index.
[0044] A computing device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the source code data leakage prevention method for source code auditing are implemented.
[0045] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the source code data leakage prevention method for source code auditing.
[0046] The beneficial effects of the present invention are as follows: by generating a source code audit report containing a file name, line number, column number, location link index and vulnerability number, an auditor can quickly locate a specific problem point in the source code. This detailed location information greatly reduces the time for auditors to manually search for problems in a huge code base, and improves the accuracy of the audit. The corresponding location link index is matched according to the authority of the source code auditor, and the corresponding source code is automatically found in the local source code library. This process is automated, reduces errors and omissions in human operations, and further improves the audit efficiency. By obtaining the authority of the source code auditor and matching the corresponding location link index according to the authority, strict control of source code access is achieved. Only auditors with corresponding authority can access specific source code, thereby effectively preventing illegal leakage of source code data. During the audit process, source code data is strictly isolated in the local source code library, avoiding the risk of data leakage during transmission. At the same time, problem point correspondence is performed through the location link index, which also reduces the opportunity of directly operating the source code, further reducing the risk of leakage. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0048] Figure 1 A schematic diagram of a flow chart of a source code data leakage prevention method for source code auditing of the present invention;
[0049] Figure 2 A schematic diagram of the composition of a source code data leakage prevention system for source code auditing according to the present invention;
[0050] Figure 3 The figure is a schematic diagram of the composition of a computing device according to the present invention. DETAILED DESCRIPTION
[0051] The technical solutions in the embodiments of the present invention are described clearly and completely below. 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.
[0052] refer to Figures 1 to 3 , a source code data leakage prevention method for source code auditing, specifically comprising:
[0053] When using a static code analysis tool to perform source code audit, a source code audit report is generated, wherein the source code audit report includes a file name, a line number, a column number, a location link index, and a vulnerability number;
[0054] Matching the problem points with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file;
[0055] Obtain the authority of source code auditors;
[0056] Match the corresponding location link index according to the authority of the source code auditor;
[0057] The corresponding source code is searched in the local source code library according to the location link index, thereby preventing source code data leakage.
[0058] In this embodiment, by generating a source code audit report containing the file name, line number, column number, location link index and vulnerability number, the auditor can quickly locate the specific problem point in the source code. This detailed location information greatly reduces the time for the auditor to manually search for problems in a huge code base, and improves the accuracy of the audit. The corresponding location link index is matched according to the authority of the source code auditor, and the corresponding source code is automatically found in the local source code library. This process is automated, reducing errors and omissions in human operations, and further improving the audit efficiency. By obtaining the authority of the source code auditor and matching the corresponding location link index according to the authority, strict control of source code access is achieved. Only auditors with corresponding permissions can access specific source code, thereby effectively preventing illegal leakage of source code data. During the audit process, source code data is strictly isolated in the local source code library, avoiding the risk of data leakage during transmission. At the same time, matching problem points through location link indexes also reduces the opportunity to directly operate the source code, further reducing the risk of leakage.
[0059] Preferably, when the static code analysis tool is used to perform source code audit, a source code audit report is generated, wherein the source code audit report includes the file name, line number, column number, location link index and vulnerability number, specifically including:
[0060] Use static code analysis tools to perform static analysis on source code and identify potential code problems;
[0061] Execute source code audit tasks based on process-based tools, and record the task status and execution time during the task execution process;
[0062] Collect code quality reports generated by static code analysis tools;
[0063] Integrate the task execution results of process tools;
[0064] Generate a code problem list based on the collected code quality reports and task execution results, wherein the code problem list includes a detailed description of each problem, the file name, line number, column number, and vulnerability number;
[0065] Build a location link index for each code issue;
[0066] Set access permissions for location link indexes to generate source code audit reports.
[0067] In this embodiment, the use of static code analysis tools to automatically analyze the source code can quickly identify potential code problems, such as vulnerabilities, defects, non-standard codes, etc., which greatly reduces the time and cost of manual audits and improves audit efficiency; executing source code audit tasks through process tools and recording the task status and execution time during task execution helps to monitor and manage the audit process in real time, which ensures the transparency and traceability of the audit process; collecting code quality reports generated by static code analysis tools, and integrating the task execution results of process tools to generate a code problem list containing a specific description of each problem, the file name, line number, column number and vulnerability number. This detailed problem description helps auditors quickly locate and understand problems and improve the audit efficiency. Accuracy; building a location link index for each code problem, so that auditors can jump directly to the problem point in the source code by clicking the link, which greatly enhances the operability of source code auditing and enables auditors to analyze and solve problems more efficiently; setting access permissions for the location link index can ensure that only people with corresponding permissions can access and view the problem points in the source code, which helps to protect the confidentiality of the source code, and also helps to control the permissions of the audit process and ensure the compliance and security of the audit results; by recording the task status and execution time during the task execution process, and generating a code problem list with detailed problem descriptions, this technical solution can provide complete audit records, which helps to trace the audit process when necessary and verify the reliability of the audit results.
[0068] Preferably, the problem points are matched with the source code to be audited based on the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file, specifically including:
[0069] Parse each location link index to extract the file path, file name, line number and column number;
[0070] In the source code environment, find the corresponding source code file according to the parsed file path and file name;
[0071] Use a text editor to find the location of the problem in the source code file based on the line number and column number;
[0072] Bind the location of the problem point to the location link index.
[0073] In this embodiment, by parsing the location link index and extracting the file path, file name, line number and column number, the problem point in the source code can be accurately located, which avoids the auditor's time-consuming manual search for problems in a huge code base and improves the accuracy and efficiency of the audit; the technical solution realizes the automatic matching and search of the location link index and the source code file. The auditor only needs to provide the location link index to automatically find the corresponding source code file in the source code environment and locate the problem point according to the line number and column number, which greatly reduces the errors and omissions of human operation and further improves the audit efficiency; after using a text editor to find the location of the problem point in the source code file according to the line number and column number, it can be intuitively displayed to the auditor, This helps auditors understand the context and code logic of problem points more quickly, so as to make more accurate judgments and decisions; by binding the location of the problem point with the location link index, auditors can easily trace back and verify the audit results, which simplifies the audit process, reduces tedious operations in the audit process, and improves the convenience of the audit; by automatically matching and finding problem points, it reduces the impact of human interference and subjective judgment, which helps to ensure the objectivity and consistency of the audit results and improves the reliability of the audit; by parsing the location link index and corresponding it with the source code, the technical solution realizes the standardization of the audit process, which helps organizations establish unified audit standards and processes to ensure that each audit can achieve the same quality and effect.
[0074] A source code data leakage prevention system for source code auditing, comprising:
[0075] A generation module, used to generate a source code audit report when using a static code analysis tool to perform source code audit, wherein the source code audit report includes a file name, line number, column number, location link index, and vulnerability number;
[0076] A problem point correspondence module, used to correspond the problem point with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file;
[0077] Acquisition module, used to obtain the permissions of source code auditors;
[0078] The matching module is used to match the corresponding location link index according to the authority of the source code auditor;
[0079] The search module is used to search for the corresponding source code in the local source code library according to the position link index, so as to prevent the leakage of source code data.
[0080] Preferably, the generating module comprises:
[0081] Static analysis module, used to perform static analysis on source code using static code analysis tools to identify potential code problems;
[0082] The task execution record module is used to execute source code audit tasks according to the process tool and record the task status and execution time during the task execution process;
[0083] Code quality report generation module, used to collect code quality reports generated by static code analysis tools;
[0084] Integration module, used to integrate the task execution results of process tools;
[0085] A processing module, used to generate a code problem list based on the collected code quality report and task execution results, wherein the code problem list includes a specific description of each problem, the file name, line number, column number and vulnerability number;
[0086] A building module for building a location link index for each code issue;
[0087] A settings module is used to set access permissions for location link indexes to generate source code audit reports.
[0088] Preferably, the problem point corresponding module includes:
[0089] The extraction module is used to parse each location link index and extract the file path, file name, line number and column number;
[0090] The source code file search module is used to find the corresponding source code file in the source code environment according to the parsed file path and file name;
[0091] The problem point search module is used to find the location of the problem point in the source code file based on the line number and column number using a text editor;
[0092] The binding module is used to bind the location of the problem point with the location link index.
[0093] A computing device comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the source code data leakage prevention method for source code auditing are implemented.
[0094] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps of the source code data leakage prevention method for source code auditing.
[0095] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A source code data leakage prevention method for source code auditing, characterized in that: Specifically include: When using a static code analysis tool to perform source code audit, a source code audit report is generated, wherein the source code audit report includes a file name, a line number, a column number, a location link index, and a vulnerability number; Matching the problem points with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file; Obtain the authority of source code auditors; Match the corresponding location link index according to the authority of the source code auditor; The corresponding source code is searched in the local source code library according to the location link index, thereby preventing source code data leakage.
2. A source code data leakage prevention method for source code auditing according to claim 1, characterized in that: When the static code analysis tool is used to perform source code audit, a source code audit report is generated, wherein the source code audit report includes the file name, line number, column number, location link index and vulnerability number, specifically including: Use static code analysis tools to perform static analysis on source code and identify potential code problems; Execute source code audit tasks based on process-based tools, and record the task status and execution time during the task execution process; Collect code quality reports generated by static code analysis tools; Integrate the task execution results of process tools; Generate a code problem list based on the collected code quality reports and task execution results, wherein the code problem list includes a detailed description of each problem, the file name, line number, column number, and vulnerability number; Build a location link index for each code issue; Set access permissions for location link indexes to generate source code audit reports.
3. A source code data leakage prevention method for source code auditing according to claim 2, characterized in that: The problem point is matched with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file, specifically including: Parse each location link index to extract the file path, file name, line number and column number; In the source code environment, find the corresponding source code file according to the parsed file path and file name; Use a text editor to find the location of the problem in the source code file based on the line number and column number; Bind the location of the problem point to the location link index.
4. A source code data leakage prevention system for source code auditing, characterized in that: include: A generation module, used to generate a source code audit report when using a static code analysis tool to perform source code audit, wherein the source code audit report includes a file name, line number, column number, location link index, and vulnerability number; A problem point correspondence module, used to correspond the problem point with the source code to be audited according to the position link index, wherein the position link index includes the file path and the specific row and column number of the problem point in the file; Acquisition module, used to obtain the permissions of source code auditors; The matching module is used to match the corresponding location link index according to the authority of the source code auditor; The search module is used to search for the corresponding source code in the local source code library according to the position link index, so as to prevent the leakage of source code data.
5. A source code data leakage prevention system for source code auditing according to claim 4, characterized in that: The generation module comprises: Static analysis module, used to perform static analysis on source code using static code analysis tools to identify potential code problems; The task execution record module is used to execute source code audit tasks according to the process tool and record the task status and execution time during the task execution process; Code quality report generation module, used to collect code quality reports generated by static code analysis tools; Integration module, used to integrate the task execution results of process tools; A processing module, used to generate a code problem list based on the collected code quality report and task execution results, wherein the code problem list includes a specific description of each problem, the file name, line number, column number and vulnerability number; A building module for building a location link index for each code issue; A settings module is used to set access permissions for location link indexes to generate source code audit reports.
6. A source code data leakage prevention system for source code auditing according to claim 5, characterized in that: The problem point corresponding module includes: The extraction module is used to parse each location link index and extract the file path, file name, line number and column number; The source code file search module is used to find the corresponding source code file in the source code environment according to the parsed file path and file name; The problem point search module is used to find the location of the problem point in the source code file based on the line number and column number using a text editor; The binding module is used to bind the location of the problem point with the location link index.
7. A computing device, characterized in that The method comprises a memory, a processor and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the method implements the steps of the source code data leakage prevention method for source code auditing as described in any one of claims 1 to 3.
8. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, which, when executed by a processor, implements the steps of the source code data leakage prevention method for source code auditing as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Code auditing method and apparatus
CN105740135A
Enterprise internal auxiliary auditing method
CN112070338A
Chain network structure digital storage code management method and system
CN116955719A
Data auditing method and device based on block chain, equipment, medium and product
CN118094603A
Automatic code auditing method, device and equipment and storage medium
CN118349998A