Application log desensitization testing method, device, storage medium and computer equipment

By automatically generating an instruction set through the test server and automatically controlling the application server to perform desensitization testing on the application logs, the problem of low testing efficiency in the existing technology is solved and efficient automated desensitization testing is achieved.

CN115186298BActive Publication Date: 2025-09-09VIPSHOP (GUANGZHOU) SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210891193.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2025-09-09
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

The desensitization test of application logs in the existing technology is inefficient and mainly relies on manual operations, resulting in low testing efficiency.

Method used

The test server automatically generates a set of instructions based on the application server domain name and log storage information, automatically controls the application server to enter the lowest-level directory of the application log, and downloads and runs the sensitive information detection script to obtain the desensitization test results.

Benefits of technology

It realizes automatic desensitization testing of application logs, reduces manual intervention, improves testing efficiency, and ensures information security and testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115186298B_ABST
    Figure CN115186298B_ABST
Patent Text Reader

Abstract

The present application provides a desensitization testing method, apparatus, storage medium and computer equipment for application logs, the method comprising: obtaining an application server domain name and application log storage information corresponding to an application to be tested; generating an instruction set according to the application server domain name and application log storage information, and sending each instruction in the instruction set to the application server of the application to be tested, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs; sending a script download instruction to the application server according to the application server domain name, so as to instruct the application server to download a sensitive information detection script; after the application server completes downloading the sensitive information detection script, sending a script running instruction to the application server according to the application server domain name, so as to instruct the application server to run the sensitive information detection script in the lowest-level directory and obtain a detection result; and receiving the detection result returned by the application server, where the detection result is a desensitization test result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of application testing technology, and in particular to a desensitization testing method, apparatus, storage medium, and computer equipment for application logs. Background Art

[0002] In the field of e-commerce, users usually need to provide a large amount of sensitive information when purchasing goods, such as user name, delivery address and contact number. After the application obtains the aforementioned sensitive information, it needs to perform desensitization processing when generating the application log to avoid the application log from containing sensitive information, thereby reducing the risk of user personal information leakage. In order to obtain the desensitization effect of the application log and to determine whether the application to be tested needs to be modified, it is necessary to perform a desensitization test on the application log of the application to be tested to determine whether it contains sensitive information. However, the inventors have found that the existing technology is to perform desensitization testing of application logs manually, which has the problem of low testing efficiency. Summary of the Invention

[0003] The purpose of this application is to solve at least one of the above technical deficiencies, especially the technical defect of low testing efficiency in the prior art.

[0004] In a first aspect, an embodiment of the present application provides a method for desensitization testing of an application log, the method comprising:

[0005] Obtain the application server domain name corresponding to the application to be tested and the application log storage information of the application to be tested;

[0006] generating an instruction set based on the application server domain name and the application log storage information, and sending each instruction in the instruction set to the application server of the application to be tested, so that the application server accesses the lowest-level directory to which the application log of the application to be tested belongs; wherein the application log is stored in the application server and is log data output by the application to be tested after obtaining the original test data containing sensitive information;

[0007] Sending a script download instruction to the application server according to the application server domain name to instruct the application server to download a sensitive information detection script;

[0008] After the application server completes downloading the sensitive information detection script, sending a script execution instruction to the application server according to the application server domain name to instruct the application server to execute the sensitive information detection script in the lowest-level directory and obtain a detection result; the detection result is used to reflect whether the application log contains sensitive information;

[0009] Receive the detection result returned by the application server, and obtain a desensitization test result based on the detection result.

[0010] In one embodiment, the application log storage information includes server login information and a storage path of the application log on the application server, and the instruction set includes a target login instruction and a directory jump instruction;

[0011] The step of generating an instruction set according to the application server domain name and the application log storage information, and sending each instruction in the instruction set to the application server of the application to be tested so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs includes:

[0012] Performing command splicing on the application server domain name, the server login information and a preset initial login instruction to obtain the target login instruction;

[0013] Sending the target login instruction to the application server to perform user login;

[0014] Performing command splicing on the application server domain name, the storage path and a preset initial jump command to obtain the directory jump command;

[0015] The directory jump instruction is sent to the application server, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs.

[0016] In one embodiment, the step of obtaining the application server domain name corresponding to the application to be tested and the application log storage information of the application to be tested includes:

[0017] Obtaining the preset server login information from the memory;

[0018] A test configuration table pre-configured by a tester is obtained, and the application server domain name and the storage path are respectively extracted from the test configuration table.

[0019] In one embodiment, the step of obtaining the test configuration table pre-configured by the tester includes: periodically scanning a database to obtain the test configuration table pre-configured by the tester from the database.

[0020] In one embodiment, the method further includes: extracting an email account from the test configuration table, and sending a reminder email to the email account when the detection result reflects that the application log includes sensitive information.

[0021] In one embodiment, the step of sending a script download instruction to the application server according to the application server domain name to instruct the application server to download the sensitive information detection script includes:

[0022] Obtain the script download address of the sensitive information detection script;

[0023] Performing command splicing on the domain name of the application server, the script download address and the preset initial download instruction to obtain the script download instruction;

[0024] The script download instruction is sent to the application server to instruct the application server to download the sensitive information detection script from the script download address.

[0025] In a second aspect, an embodiment of the present application provides a desensitization testing device for an application log, the device comprising:

[0026] An information acquisition module is used to obtain the application server domain name corresponding to the application to be tested and the application log storage information of the application to be tested;

[0027] a directory jump module, configured to generate an instruction set based on the application server domain name and the application log storage information, and send each instruction in the instruction set to the application server of the application to be tested, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs; wherein the application log is stored in the application server and is log data output by the application to be tested after obtaining original test data containing sensitive information;

[0028] A script download instruction sending module, configured to send a script download instruction to the application server according to the application server domain name, so as to instruct the application server to download a sensitive information detection script;

[0029] a script execution instruction sending module, configured to, after the application server completes downloading the sensitive information detection script, send a script execution instruction to the application server according to the application server domain name, instructing the application server to execute the sensitive information detection script in the lowest-level directory and obtain a detection result; the detection result is used to reflect whether the application log contains sensitive information;

[0030] The result acquisition module is used to receive the detection result returned by the application server and obtain the desensitization test result based on the detection result.

[0031] In one embodiment, the application log storage information includes server login information and a storage path of the application log on the application server; the instruction set includes a login instruction and a directory jump instruction; and the directory jump module includes:

[0032] a target login instruction acquisition unit, configured to perform instruction splicing on the application server domain name, the server login information and a preset initial login instruction to obtain the target login instruction;

[0033] a target login instruction sending unit, configured to send the target login instruction to the application server for user login;

[0034] a target jump instruction acquisition unit, configured to perform instruction splicing on the application server domain name, the storage path, and a preset initial jump instruction to obtain the directory jump instruction;

[0035] The target jump instruction sending unit is configured to send the directory jump instruction to the application server, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs.

[0036] In a third aspect, an embodiment of the present application provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the desensitization testing method for application logs described in any of the above embodiments.

[0037] In a fourth aspect, an embodiment of the present application provides a computer device, comprising: one or more processors, and a memory;

[0038] The memory stores computer-readable instructions, and when the computer-readable instructions are executed by the one or more processors, the steps of the desensitization testing method for application logs described in any of the above embodiments are executed.

[0039] In the desensitization test method, device, storage medium and computer equipment for application logs in the embodiments of the present application, the test server can obtain the application server domain name and the storage information of the application log corresponding to the application to be tested, and automatically generate an instruction set based on the information obtained. The test server sends each instruction in the instruction set to the application server of the application to be tested, thereby automatically controlling the application server to enter the lowest level directory to which the application log belongs. The test server can also send script download instructions and script execution instructions to the application server in sequence to instruct the application server to download the sensitive information detection script in sequence and run the sensitive information detection script in the lowest level directory after the download is completed. The test server can accept the detection result returned by the application server after running the sensitive information detection script, and the detection result is the desensitization test result of the application log. In the scheme of the present application, the test server can automatically generate multiple instructions based on the application server domain name and the storage information of the application log, and control the application server to perform corresponding operations through multiple instructions to obtain the desensitization test result, thereby reducing the degree of human intervention in the desensitization test process, realizing automatic desensitization testing of application logs, and thus improving test efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0041] Figure 1 This is a diagram of an application environment for a desensitization testing method for application logs in one embodiment;

[0042] Figure 2 Schematic diagram of a flow chart of a desensitization testing method for application logs in one embodiment;

[0043] Figure 3 Schematic diagram of a process for jumping to a directory in one embodiment;

[0044] Figure 4 A schematic diagram of a script downloading process in one embodiment;

[0045] Figure 5 1 is a schematic structural block diagram of a desensitization testing device for application logs in one embodiment;

[0046] Figure 6 FIG. 1 is a structural block diagram of a computer device in one embodiment. DETAILED DESCRIPTION

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

[0048] As mentioned in the background technology, the existing technology is to perform desensitization testing of application logs in a manual manner, which has the problem of low testing efficiency. That is, when performing the desensitization test, the tester first manually creates original test data containing sensitive information and inputs the original test data into the application to be tested. Then, the tester manually requests the log acquisition interface of the application to be tested to obtain the application log of the application to be tested from the log acquisition interface. Finally, the tester enters the application server, manually uploads the sensitive information detection script in the application server and runs the sensitive information detection script to obtain the test results. The tester then manually determines from the test results whether the application log is successfully desensitized, that is, whether the application log contains sensitive information.

[0049] To address the aforementioned issues, embodiments of the present application provide a method, apparatus, storage medium, and computer device for desensitizing application logs. The method comprises a test server that automatically generates multiple instructions based on the application server domain name and the storage information of the application log, and controls the application server through the multiple instructions to perform corresponding operations and obtain desensitization test results. This reduces the degree of human intervention in the desensitization test process, implements automatic desensitization testing of application logs, and improves testing efficiency.

[0050] The desensitization test method of the application log of this application can be applied to Figure 1 In the application environment shown. Figure 1 As shown, the application environment may include a data server 102, a test server 104 and an application server 106. Among them, the data server 102 refers to a server configured with a database, and users can add, delete and modify the data stored in the database. The test server 104 refers to a server used to perform the following desensitization test method, and its specific implementation method can be determined according to actual needs, and this application does not impose specific restrictions on this. It can be understood that in this application, the data server 102 and the test server 104 can be implemented by the same server. In this case, the test server 104 can be configured with a database. Alternatively, the data server 102 and the test server 104 can also be implemented by two different servers. The application server 106 refers to a server used to run the application to be tested, and its specific implementation method can be determined according to actual needs, and this application does not impose specific restrictions on this.

[0051] It is understandable that the desensitization testing method of the application log of the present application can be used to test the application to be tested before and / or after the application is launched. In one embodiment, the solution of the present application can be used to complete the test before the application is launched. On the one hand, the tester does not need to spend time to modify sensitive information many times, which greatly reduces the testing time and also reduces the frequency of version releases. On the other hand, it can also increase the information security of the application to be tested and avoid the problem of user information being leaked as much as possible.

[0052] In one embodiment, the present application provides a desensitization testing method for application logs, which is applied to Figure 1 The test server in the example is used to illustrate. Figure 2 As shown, the method specifically includes the following steps:

[0053] S202: Obtain an application server domain name corresponding to the application to be tested and application log storage information of the application to be tested.

[0054] The application log of the application to be tested is stored in the application server of the application to be tested. The application log storage information may include information used to enable the application server to enter the lowest-level directory to which the application log belongs. For example, the application log storage information may include the storage path of the application log in the application server. Furthermore, when the application server requires login to access the directory, the application log storage information may also include server login information.

[0055] S204: Generate an instruction set based on the application server domain name and the application log storage information, and send each instruction in the instruction set to the application server of the application to be tested, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs; wherein, the application log is stored in the application server, and the application log is log data output by the application to be tested after obtaining the original test data containing sensitive information.

[0056] The instruction set may include one or more instructions. When an instruction set includes multiple instructions, each instruction may be configured with a specific execution order. The lowest-level directory to which the application log belongs is the last directory containing the application log. For example, if the application log storage path is / app / logs / receiver / test.api.com / application.log, the lowest-level directory to which the application log belongs is / app / logs / receiver / test.api.com.

[0057] Specifically, the application under test can obtain raw test data containing sensitive information. The application under test can generate a corresponding application log based on the raw test data and store the application log in a corresponding directory on the application server. The test server can generate a set of instructions based on the application server domain name of the application under test and the application log storage information of the application under test to obtain multiple instructions, and send these multiple instructions to the application server of the application under test, so that the application server can access the lowest-level directory to which the application log belongs.

[0058] S206: Send a script download instruction to the application server according to the application server domain name to instruct the application server to download a sensitive information detection script.

[0059] After accessing the lowest-level directory of the application log, the test server can send a script download instruction to the application server, instructing the application server to automatically download a sensitive information detection script. The sensitive information detection script is a script used to automatically detect whether the application log contains sensitive information. This script can be implemented using any existing method and is not specifically limited in this application.

[0060] S208, after the application server completes downloading the sensitive information detection script, sends a script execution instruction to the application server according to the application server domain name to instruct the application server to run the sensitive information detection script in the lowest-level directory and obtain a detection result; the detection result is used to reflect whether the application log includes sensitive information.

[0061] After the application server completes downloading the sensitive information detection script, the test server may send a script execution instruction to the application server based on the application server domain name. The script execution instruction is used to instruct the application server to execute the downloaded sensitive information detection script. The sensitive information detection script is used to automatically detect whether the application log contains sensitive information and obtain a detection result. In one embodiment, the detection result may include the sensitive information involved in the application log; if the application log does not contain sensitive information, the detection result may be empty.

[0062] S210, receiving the detection result returned by the application server, and obtaining a desensitization test result based on the detection result.

[0063] The sensitive information detection script on the application server will run and return the detection result to the test server. Because this detection result can reflect whether the application log contains sensitive information, the test server can obtain the desensitization test result of the application log based on this detection result. In one embodiment, the test server can determine the desensitization test result by determining whether the detection result is empty. When the detection result is empty, it can be determined that the application log does not contain sensitive information; when the detection result is not empty, it can be determined that the application log contains sensitive information.

[0064] In the solution of the present application, the test server can automatically generate multiple instructions based on the application server domain name and the storage information of the application log, and control the application server to perform corresponding operations through multiple instructions to obtain the desensitization test results, thereby realizing the automation of the application log desensitization test, thereby reducing the degree of manual intervention in the desensitization test process, realizing automatic desensitization testing of application logs, and thus improving test efficiency.

[0065] In one embodiment, the application log storage information includes server login information and the storage path of the application log on the application server, wherein the server login information refers to user information used to log in to the application server, which may include a user name and password. The instruction set includes a target login instruction and a directory jump instruction.

[0066] like Figure 3 As shown, the step of generating an instruction set based on the application server domain name and the application log storage information, and sending each instruction in the instruction set to the application server of the application to be tested so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs includes:

[0067] S302, performing command splicing on the application server domain name, the server login information, and a preset initial login instruction to obtain the target login instruction;

[0068] S304, sending the target login instruction to the application server to perform user login;

[0069] S306, performing instruction splicing on the application server domain name, the storage path, and a preset initial jump instruction to obtain the directory jump instruction;

[0070] S308: Send the directory jump instruction to the application server, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs.

[0071] After obtaining the application server domain name and server login information, the test server can then perform command splicing to obtain a login instruction that meets the preset login instruction format and includes the application server domain name and server login information. This login instruction is the target login instruction. After obtaining the target login instruction, the test server can send the target login instruction to the application server, instructing the application server to automatically perform user login based on the server login information.

[0072] After obtaining the application server domain name and the storage path of the application log on the application server, the test server can perform instruction splicing based on this to obtain one or more directory jump instructions. In this way, the degree of manual intervention in the desensitization test process can be further reduced, and the test efficiency can be further improved. In one embodiment, the test server can generate multiple directory jump instructions in sequence according to the hierarchical relationship of the storage path, and send the multiple directory jump instructions to the application server in sequence according to the storage path hierarchy corresponding to each directory jump instruction, so that the application server can enter the lowest level directory to which the application log belongs. For example, when the application log is stored in / app / logs / receiver / test.api.com / application.log, the test server can generate a directory jump instruction for entering the app directory, a directory jump instruction for entering the logs directory, a directory jump instruction for entering the receiver directory, and a directory jump instruction for entering the test.api.com directory in sequence, and send each directory jump instruction to the application server in the order of the aforementioned instruction generation, so that the application server enters the lowest level directory to which the application log belongs. In another embodiment, the test server may generate a directory jump instruction based on the complete storage path, and send the directory jump instruction to the application server, so that the application server enters the lowest-level directory to which the application log belongs.

[0073] In one embodiment, the step of obtaining the application server domain name corresponding to the application to be tested and the application log storage information of the application to be tested includes:

[0074] Obtaining the preset server login information from the memory;

[0075] A test configuration table pre-configured by a tester is obtained, and the application server domain name and the storage path are respectively extracted from the test configuration table.

[0076] Specifically, the server login information can be pre-set and stored in the test server. When generating the target login instruction, the test server can read the pre-stored server login information from the memory and generate the target login instruction accordingly. The application server domain name and the storage path of the application log in the application server can be extracted from the test configuration table pre-configured by the tester. In this way, the tester only needs to configure the application server domain name and log path in the test configuration table to automatically perform desensitization testing through the test server. The operation is simple and there is no need for the tester to develop the corresponding script for self-testing, which can further improve the testing efficiency.

[0077] In one embodiment, the method further includes: extracting an email account from the test configuration table, and sending a reminder email to the email account when the test result reflects that the application log includes sensitive information. Specifically, the test configuration table may also be configured with an email account, and when the test result reflects that the application log includes sensitive information, the test server may extract the email account from the test configuration table and send a reminder email to the email account to automatically notify the tester to review the results or notify the developer to repair the program. In one embodiment, the reminder email may include the type of sensitive information involved in the application log or the specific sensitive information involved (such as the specific name appearing in the application log, etc.). Furthermore, the reminder email may also include information such as the total number of log scan lines, test time, log generation time, log storage path and / or log name.

[0078] In one embodiment, in addition to the above data, the test configuration table may also be configured with the number of tests, the log naming type of the application log, the deletion status, the creation time of the test configuration table, and the update time of the test configuration table. In one example, the log naming type can be represented by a numerical value. For example, if the log type in the test configuration table is configured as 1, it indicates that the application log is named "application.log". If it is configured as 2 or 3, it indicates that the application log is named according to other types of naming formats. In this way, it is compatible with situations where file naming is not standardized.

[0079] In one embodiment, the step of obtaining the test configuration table pre-configured by the tester includes: periodically scanning the database to obtain the test configuration table pre-configured by the tester from the database. Specifically, the test server can scan the database at regular intervals and obtain each test configuration table stored in the database. When the test configuration table is obtained, for each test configuration table, the test server can execute the steps of any method embodiment herein, that is, when the test configuration table is obtained, the test server can execute steps S204 to S210 to perform periodic desensitization testing on the application to be tested corresponding to the test configuration table.

[0080] For example, a test configuration table A is stored in the database, and the scanning period is ΔT. At the current time T0, the test server can scan the database to obtain test configuration table A and automatically perform a desensitization test on the application log based on the configuration data of test configuration table A. When (T0+ΔT) arrives, the test server can scan the database to obtain test configuration table A and automatically perform a second desensitization test on the application log based on the configuration data of test configuration table A. When (T0+2ΔT) arrives, the test server can scan the database to obtain test configuration table A and automatically perform a third desensitization test on the application log based on the configuration data of test configuration table A, until test configuration table A is deleted from the database.

[0081] In this way, the application to be tested can be desensitized periodically without manual intervention, thereby further improving testing efficiency.

[0082] In one embodiment, Figure 4 As shown, the step of sending a script download instruction to the application server according to the application server domain name to instruct the application server to download the sensitive information detection script includes:

[0083] S402, obtaining a script download address of the sensitive information detection script;

[0084] S404, performing command splicing on the domain name of the application server, the script download address, and the preset initial download instruction to obtain the script download instruction;

[0085] S406: Send the script download instruction to the application server to instruct the application server to download the sensitive information detection script from the script download address.

[0086] After obtaining the sensitive information detection script's download address, the test server can perform command splicing to obtain a download instruction that meets the preset download instruction format and includes the application server's domain name and the script download address. This download instruction is known as the script download instruction. After obtaining the script download instruction, the test server can send the script download instruction to the application server, instructing the application server to automatically download the sensitive information detection script from the script download address. This can further reduce the degree of manual intervention in the desensitization test process and further improve testing efficiency.

[0087] The following describes the application log desensitization testing device provided in an embodiment of the present application. The application log desensitization testing device described below and the application log desensitization testing method described above can refer to each other.

[0088] In one embodiment, the present application provides a desensitization testing device 500 for application logs. Figure 5 As shown, the device 500 specifically includes an information acquisition module 510, a directory jump module 520, a script download instruction sending module 530, a script execution instruction sending module 540 and a result acquisition module 550. Among them:

[0089] An information acquisition module 510 is configured to acquire an application server domain name corresponding to the application to be tested and application log storage information of the application to be tested;

[0090] a directory jump module 520 for generating an instruction set based on the application server domain name and the application log storage information, and sending each instruction in the instruction set to the application server of the application under test, so that the application server enters the lowest-level directory to which the application log of the application under test belongs; wherein the application log is stored in the application server and is log data output by the application under test after obtaining the original test data containing sensitive information;

[0091] A script download instruction sending module 530 is configured to send a script download instruction to the application server according to the application server domain name, so as to instruct the application server to download a sensitive information detection script;

[0092] a script execution instruction sending module 540, configured to, after the application server completes downloading the sensitive information detection script, send a script execution instruction to the application server according to the application server domain name, instructing the application server to execute the sensitive information detection script in the lowest-level directory and obtain a detection result; the detection result is used to reflect whether the application log contains sensitive information;

[0093] The result acquisition module 550 is used to receive the detection result returned by the application server and obtain the desensitization test result according to the detection result.

[0094] In one embodiment, the application log storage information includes server login information and the storage path of the application log on the application server, and the instruction set includes a login instruction and a directory jump instruction. The directory jump module 520 includes:

[0095] a target login instruction acquisition unit, configured to perform instruction splicing on the application server domain name, the server login information and a preset initial login instruction to obtain the target login instruction;

[0096] a target login instruction sending unit, configured to send the target login instruction to the application server for user login;

[0097] a target jump instruction acquisition unit, configured to perform instruction splicing on the application server domain name, the storage path, and a preset initial jump instruction to obtain the directory jump instruction;

[0098] The target jump instruction sending unit is configured to send the directory jump instruction to the application server, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs.

[0099] In one embodiment, the information acquisition module 510 includes a login information acquisition unit and a configuration information acquisition unit. The login information acquisition unit is configured to acquire the pre-set server login information from a memory. The configuration information acquisition unit is configured to acquire a test configuration table pre-configured by a tester and extract the application server domain name and storage path from the test configuration table.

[0100] In one embodiment, the configuration information acquisition unit includes a scanning unit configured to periodically scan a database to acquire the test configuration table pre-configured by the tester from the database.

[0101] In one embodiment, the application log desensitization testing device 500 further includes an email sending module configured to extract an email account from the test configuration table and send a reminder email to the email account if the test result indicates that the application log contains sensitive information.

[0102] In one embodiment, the script download instruction sending module 530 includes a download address acquisition unit, a script download instruction acquisition unit, and a script download instruction sending unit. The download address acquisition unit is configured to acquire the script download address of the sensitive information detection script. The script download instruction acquisition unit is configured to concatenate the domain name of the application server, the script download address, and a pre-set initial download instruction to obtain the script download instruction. The script download instruction sending unit is configured to send the script download instruction to the application server, instructing the application server to download the sensitive information detection script from the script download address.

[0103] In one embodiment, the present application also provides a storage medium storing computer-readable instructions. When the computer-readable instructions are executed by one or more processors, the one or more processors execute the steps of the desensitization testing method for application logs as described in any of the above embodiments.

[0104] In one embodiment, the present application further provides a computer device having computer-readable instructions stored therein, which, when executed by one or more processors, cause the one or more processors to perform the steps of the desensitization testing method for application logs as described in any of the above embodiments.

[0105] Schematically, as Figure 6 As shown, Figure 6 This is a schematic diagram of the internal structure of a computer device provided in an embodiment of the present application. In one example, the computer device may be a server, which is the aforementioned test server. Figure 6 Computer device 900 includes a processing component 902, which further includes one or more processors, and a memory resource represented by memory 901 for storing instructions executable by processing component 902, such as an application. The application stored in memory 901 may include one or more modules, each corresponding to a set of instructions. In addition, processing component 902 is configured to execute instructions to perform the steps of the application log desensitization testing method described in any of the above embodiments.

[0106] The computer device 900 may further include a power supply component 903 configured to perform power management of the computer device 900, a wired or wireless network interface 904 configured to connect the computer device 900 to a network, and an input / output (I / O) interface 905. The computer device 900 may operate based on an operating system stored in the memory 901, such as Windows Server™, Mac OS X™, Unix™, Linux™, Free BSD™, or the like.

[0107] Those skilled in the art will understand that the internal structure of the computer device shown in the present application is merely a block diagram of a partial structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0108] Finally, it should be noted that, in this article, relational terms such as first and second are merely used to distinguish one entity or operation from another, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprise," "include," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or device. Without further restriction, an element defined by the phrase "comprising a..." does not exclude the presence of other identical elements in the process, method, article, or device comprising the element. Herein, "one," "said," "the," and "its" may also include plural forms unless the context clearly indicates otherwise. A plurality refers to at least two, such as 2, 3, 5, or 8. "And / or" includes any and all combinations of the relevant listed items.

[0109] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The various embodiments can be combined as needed, and the same or similar parts can be referenced to each other.

[0110] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present application. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application is not limited to the embodiments shown herein, but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A desensitization testing method for application logs, characterized in that: Applied to a test server, the method includes: Obtaining the application server domain name corresponding to the application to be tested and the application log storage information of the application to be tested; the application log storage information includes server login information and the storage path of the application log on the application server; generating an instruction set based on the application server domain name and the application log storage information, and sending each instruction in the instruction set to the application server of the application to be tested, so as to cause the application server to enter the lowest-level directory to which the application log of the application to be tested belongs; wherein the application log is stored in the application server, and is log data output by the application to be tested after obtaining original test data containing sensitive information, and the instruction set includes a target login instruction and a directory jump instruction; Sending a script download instruction to the application server according to the application server domain name to instruct the application server to download a sensitive information detection script; After the application server completes downloading the sensitive information detection script, sending a script execution instruction to the application server according to the application server domain name to instruct the application server to execute the sensitive information detection script in the lowest-level directory and obtain a detection result; the detection result is used to reflect whether the application log contains sensitive information; Receive the detection result returned by the application server, and obtain a desensitization test result based on the detection result; The step of generating an instruction set according to the application server domain name and the application log storage information, and sending each instruction in the instruction set to the application server of the application to be tested so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs includes: Performing command splicing on the application server domain name, the server login information and a preset initial login instruction to obtain the target login instruction; Sending the target login instruction to the application server to perform user login; Performing command splicing on the application server domain name, the storage path and a preset initial jump command to obtain the directory jump command; Sending the directory jump instruction to the application server so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs; The step of sending a script download instruction to the application server according to the application server domain name to instruct the application server to download the sensitive information detection script includes: Obtain the script download address of the sensitive information detection script; Performing command splicing on the domain name of the application server, the script download address and the preset initial download instruction to obtain the script download instruction; The script download instruction is sent to the application server to instruct the application server to download the sensitive information detection script from the script download address.

2. The method according to claim 1, characterized in that The step of obtaining the application server domain name corresponding to the application to be tested and the application log storage information of the application to be tested includes: Obtaining the preset server login information from the memory; A test configuration table pre-configured by a tester is obtained, and the application server domain name and the storage path are respectively extracted from the test configuration table.

3. The method according to claim 2, characterized in that The step of obtaining the test configuration table pre-configured by the tester includes: The database is scanned periodically to obtain the test configuration table pre-configured by the tester from the database.

4. The method according to claim 2 or 3, characterized in that The method further comprises: An email account is extracted from the test configuration table, and a reminder email is sent to the email account when the detection result indicates that the application log includes sensitive information.

5. A desensitization testing device for application logs, characterized in that: Applied to a test server, the device comprises: An information acquisition module is used to obtain the application server domain name corresponding to the application to be tested and the application log storage information of the application to be tested; the application log storage information includes server login information and the storage path of the application log on the application server; a directory jump module, configured to generate an instruction set based on the application server domain name and the application log storage information, and send each instruction in the instruction set to the application server of the application to be tested, so as to cause the application server to enter the lowest-level directory to which the application log of the application to be tested belongs; wherein the application log is stored in the application server and is log data output by the application to be tested after obtaining original test data containing sensitive information, and the instruction set includes login instructions and directory jump instructions; A script download instruction sending module, configured to send a script download instruction to the application server according to the application server domain name, so as to instruct the application server to download a sensitive information detection script; a script execution instruction sending module, configured to, after the application server completes downloading the sensitive information detection script, send a script execution instruction to the application server according to the application server domain name, instructing the application server to execute the sensitive information detection script in the lowest-level directory and obtain a detection result; the detection result is used to reflect whether the application log contains sensitive information; A result acquisition module is used to receive the detection result returned by the application server and obtain a desensitization test result based on the detection result; Wherein, the directory jump module includes: a target login instruction acquisition unit, configured to perform instruction splicing on the application server domain name, the server login information, and a preset initial login instruction to obtain the target login instruction; a target login instruction sending unit, configured to send the target login instruction to the application server for user login; a target jump instruction acquisition unit, configured to perform instruction splicing on the application server domain name, the storage path, and a preset initial jump instruction to obtain the directory jump instruction; a target jump instruction sending unit, configured to send the directory jump instruction to the application server, so that the application server enters the lowest-level directory to which the application log of the application to be tested belongs; The script download instruction sending module includes: A download address acquisition unit, configured to acquire a script download address of the sensitive information detection script; A script download instruction acquisition unit, configured to perform instruction splicing on the domain name of the application server, the script download address, and a preset initial download instruction to obtain the script download instruction; The script download instruction sending unit is used to send the script download instruction to the application server to instruct the application server to download the sensitive information detection script from the script download address.

6. A storage medium, characterized in that The storage medium stores computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the desensitization testing method for application logs as described in any one of claims 1 to 4.

7. A computer device, characterized in that: include: one or more processors, and memory; The memory stores computer-readable instructions, which, when executed by the one or more processors, execute the steps of the desensitization testing method for application logs as described in any one of claims 1 to 4.

Citation Information

Patent Citations

  • Log monitoring-based sensitive log scanning method and apparatus, and computer device

    CN109614814A

  • Log scanning method, device and equipment

    CN112528330A