Branch detection method, security detection service equipment and storage medium

Through the security detection service equipment, the problem of the security detection process occupying server resources is solved, the detection efficiency and speed are improved, and the impact on the development of other projects is reduced.

CN119312349AActive Publication Date: 2025-01-14QIAN JIN NETWORK INFORMATION TECH SHANGHAI LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411510460.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-10-28
Publication Date
2025-01-14
Estimated Expiration
2044-10-28

AI Technical Summary

Technical Problem

During the software development process, the security detection process occupies server resources, resulting in a decline in server performance, affecting the development speed of other projects, and increasing the security detection speed has attracted attention.

Method used

Through the communication connection between the security detection service device and the development service device, receive branch construction instructions and branch parameters, build test branches locally, and incorporate code into the test branch, perform security detection according to preset security detection strategies, generate detection results, and avoid occupying development Resources of service equipment.

Benefits of technology

It improves the security detection efficiency of branches, reduces the impact on the development of other projects, reduces the burden on server performance by the security detection process, and improves the detection speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312349A_ABST
    Figure CN119312349A_ABST
Patent Text Reader

Abstract

The invention discloses a branch detection method, security detection service equipment and a storage medium. The branch detection method is applied to a security detection service device, the security detection service device is in communication connection with a development service device, and the method comprises the following steps: receiving a message notification of the development service device, the message notification comprising a branch construction instruction and a branch parameter received by the development service device, the branch construction instruction is used for instructing the development service equipment to construct a development branch corresponding to the branch parameter; when it is detected that the message notification comprises a branch construction instruction, locally constructing a test branch in the security detection service equipment according to the branch parameters; receiving a code included in the development branch transmitted by the development service equipment, and merging the code into the test branch to obtain a target test branch; and performing security detection on the target test branch according to a preset security detection strategy to generate a detection result. By utilizing the embodiment of the invention, the safety detection efficiency of the branch can be improved, and the influence on other project development is also reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a branch detection method, a security detection service device and a storage medium. Background Art

[0002] Security testing can include security testing, code review and other testing methods. It is a key link in ensuring software quality and plays a vital role in the software development process. Before the software is released, security testing and code review can help to find and fix potential security issues early, thereby reducing the cost and risk of later modifications.

[0003] In the process of software development, with the application of cloud computing and rapid software release, software development tools and development processes have been optimized, and the pace of software development and release has also accelerated. As a result, more and more codes need to be tested for security before the software is released. At present, in the relevant technologies for code security testing, security testing is a necessary process after the completion of software development. However, in the process of security testing, server resources need to be occupied, resulting in a heavy burden on the server operation, affecting the performance of the server, reducing the efficiency of security testing, and slowing down the development speed of other projects. Improving the speed of security testing has received more and more attention. Summary of the invention

[0004] In view of this, the embodiments of the present application provide a branch detection method, a security detection service device and a storage medium, which can improve the security detection efficiency of the branch and reduce the impact on the development of other projects.

[0005] An embodiment of the present application provides a branch detection method, which is applied to a security detection service device, wherein the security detection service device is communicatively connected with a development service device, including: receiving a message notification from the development service device, the message notification including a branch construction instruction and branch parameters received by the development service device, wherein the branch construction instruction is used to instruct the development service device to construct a development branch corresponding to the branch parameters; when it is detected that the message notification includes the branch construction instruction, constructing a test branch locally on the security detection service device according to the branch parameters; receiving the code included in the development branch transmitted by the development service device, and merging the code into the test branch to obtain a target test branch; performing a security detection on the target test branch according to a preset security detection strategy to generate a detection result.

[0006] Optionally, according to the method embodiment of the present application, branch parameters include a project identifier of the project to which the development branch belongs; based on the branch parameters, a branch is constructed and tested locally on the security detection service device, including: detecting whether a test node corresponding to the project identifier already exists locally on the security detection service device; if a test node corresponding to the project identifier already exists, a test branch is constructed locally on the security detection service device based on the test node.

[0007] Optionally, the method according to the embodiment of the present application also includes: in the absence of a test node corresponding to the project identifier, detecting whether there is a storage space corresponding to the project identifier locally in the security detection service device; in the case where there is a storage space corresponding to the project identifier, establishing a test node corresponding to the project identifier in the storage space corresponding to the project identifier, and constructing a test branch based on the test node locally in the security detection service device.

[0008] Optionally, the method according to the embodiment of the present application also includes: in the absence of storage space corresponding to the project identifier, establishing a storage space corresponding to the project identifier locally on the security detection service device; in the storage space corresponding to the project identifier, establishing a test node corresponding to the project identifier, and constructing a test branch based on the test node locally on the security detection service device.

[0009] Optionally, according to the method of an embodiment of the present application, the preset security detection strategy includes at least any one or more of the following strategies: static code scanning strategy, component security dependency scanning strategy, overauthorization detection strategy, SQL injection detection strategy, and endpoint access permission detection strategy.

[0010] An embodiment of the present application provides a security detection service device, which is communicatively connected with a development service device, and includes: a receiving module, which is used to receive a message notification from the development service device, the message notification including a branch construction instruction and a branch parameter received by the development service device, wherein the branch construction instruction is used to instruct the development service device to construct a development branch corresponding to the branch parameter; a processing module, which is used to construct a test branch locally on the security detection service device according to the branch parameter when it is detected that the message notification includes the branch construction instruction; the receiving module is also used to receive the code included in the development branch transmitted by the development service device, and merge the code into the test branch to obtain a target test branch; the processing module is also used to perform a security detection on the target test branch according to a preset security detection strategy to generate a detection result.

[0011] Optionally, according to the security detection service device of the embodiment of the present application, the branch parameter includes the project identifier of the project to which the development branch belongs; the processing module is also used to detect whether there is a test node corresponding to the project identifier locally in the security detection service device; the processing module is also used to build a test branch based on the test node locally in the security detection service device when there is a test node corresponding to the project identifier.

[0012] An embodiment of the present application provides an electronic device, which includes a processor and a memory storing computer program instructions; when the processor executes the computer program instructions, the steps of the method described above are implemented.

[0013] An embodiment of the present application provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the steps of the method described above are implemented.

[0014] An embodiment of the present application provides a computer program product, wherein the computer program product includes computer program instructions, and when the computer program instructions are executed by a processor, the steps of the method described above are implemented.

[0015] By adopting the embodiment of the present application, the security detection service device can communicate with the development service device, so that the security detection service device can receive the message notification of the development service device in real time, so that when the development service device builds a development branch, the branch parameters of the development branch can be obtained, and then the test branch can be built locally according to the branch parameters. Therefore, the test branch no longer occupies the device resources of the development service device, reducing the impact on the development of other projects. After that, by obtaining the code included in the development branch, the target test branch can be obtained locally on the security detection service device. Next, the target test branch can be security-checked according to the preset security detection strategy to generate the detection result. The time required for normal security detection will not affect the progress of other project development. Therefore, the security detection efficiency of the branch can be improved, and the impact on the development of other projects can be reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following briefly introduces the drawings in the embodiments of the present application.

[0017] Figure 1 It is a schematic diagram of the system architecture of an embodiment of the present application.

[0018] Figure 2 It is a flowchart of the branch detection method of the embodiment of the present application.

[0019] Figure 3 It is a schematic diagram of the detection processing process of another branch of an embodiment of the present application.

[0020] Figure 4 It is a structural block diagram of the security detection service device of an embodiment of the present application.

[0021] Figure 5 It is a schematic diagram of an electronic device used to implement the branch detection method of an embodiment of the present application. DETAILED DESCRIPTION

[0022] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that the purpose of providing these embodiments is to make the principles and spirit of the present application clearer and more thorough, so that those skilled in the art can better understand and then implement the principles and spirit of the present application. The exemplary embodiments provided herein are only a part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments herein, all other embodiments obtained by ordinary technicians of the art without creative work are within the scope of protection of this application. In this article, terms such as first, second, third, etc. are only used to distinguish one entity (or operation) from another entity (or operation), and do not require or imply any order or association between these entities (or operations).

[0023] Embodiments of the present application relate to terminal devices and / or servers. Those skilled in the art will appreciate that the embodiments of the present application may be implemented as a system, apparatus, device, method, computer-readable storage medium, or computer program product. Therefore, the present disclosure may be specifically implemented in at least one of the following forms: complete hardware, complete software, or a combination of hardware and software. According to the embodiments of the present application, the present application requests protection for a branch detection method, a security detection service device, and a storage medium. Figure 1 A schematic diagram of a system architecture of an embodiment of the present application is shown. The system may include a terminal device and a server. Figure 1 As shown, the terminal device 102 may include at least one of the following: a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart TV, various wearable devices, an augmented reality AR device, a virtual reality VR device, and the like. A client may be installed on the terminal device 102. For example, the client may be a client that specifically performs a specific function (such as an application app), or a client that is embedded with a variety of application applets (with different functions), or a client that logs in through a browser. In an embodiment of the present application, a user may operate on the terminal device 102. For example, a user may open a client installed on the terminal device 102 and input instructions through client operations, or a user may open a browser installed on the terminal device 102 and input instructions through browser operations. Exemplarily, the instructions may be branch construction instructions, code synchronization instructions, and the like, and the content of the instructions is not specifically limited here.

[0024] After receiving the instruction input by the user, the terminal device 102 sends the request information containing the instruction to the server. After receiving the request information, the server performs corresponding processing. Figure 1 As shown, the system may include a development service device 104a and a security detection service device 104b. After the development service device 104a receives the request information, it interacts with the security detection service device 104b to complete the user instruction through a series of data processing and information interaction.

[0025] It should be noted that the acquisition, storage, use, and processing of data in the embodiments of the present application are in compliance with the relevant provisions of national laws and regulations.

[0026] The embodiment of the present application provides a branch detection method, which can be applied to a security detection service device, wherein the security detection service device is connected to a development service device for communication. Based on this, the security detection service device can receive message notifications from the development service device in real time and exchange information with the development service device.

[0027] Figure 2 A schematic flow chart of a branch detection method according to an embodiment of the present application is shown. The method includes the following steps 201 to 204 .

[0028] Step 201 : receiving a message notification from a development service device, where the message notification includes a branch construction instruction and branch parameters received by the development service device, wherein the branch construction instruction is used to instruct the development service device to construct a development branch corresponding to the branch parameters.

[0029] Step 202: When it is detected that the message notification includes a branch building instruction, a test branch is built locally in the security detection service device according to the branch parameters.

[0030] Step 203: Receive the code included in the development branch transmitted by the development service device, and merge the code into the test branch to obtain the target test branch.

[0031] Step 204: Perform a security check on the target test branch according to a preset security check strategy and generate a check result.

[0032] The above steps are described in detail below in conjunction with specific embodiments, as shown below.

[0033] First, step 201 is involved. Each developer may handle development tasks of one or more required code branches, and each development task may correspond to a development project.

[0034] Development service tools, such as continuous integration (CI) tools, can be configured on the development service device. Based on the development service tools, developers can integrate code changes into the shared warehouse at any time, so that different developers can perform their respective development tasks and collaborate to complete the entire development project.

[0035] As a specific example, the CI tool may be a Jenkins tool. For example, the build process of a specific project is configured and executed in Jenkins. The build process may include setting up source code management, defining build triggers, configuring the build environment, writing build scripts, and setting up post-build operations. For example, Jenkins may be configured to pull code, execute build commands, and so on.

[0036] In an embodiment of the present application, a developer can access a CI tool in a development service device and input a branch build instruction to the CI tool, and the branch build instruction can include branch parameters. The development service device can respond to the branch build instruction to build a development branch corresponding to the branch parameter. Exemplarily, when a developer accesses the CI tool in a development service device at a development terminal, the branch parameters of the development branch to be built can be displayed on the terminal device. The developer can easily send a branch build instruction (build) received from the development service device by selecting the desired branch parameters.

[0037] After the development service receives the branch building instruction, it can optionally send a message notification to the development service device, including the message notification including that the development service device has received the branch building instruction and branch parameters. Thus, the test branch can be built locally according to the branch parameters, and then the test can be performed on the security detection service device, so that the test process of the test branch no longer occupies the device resources of the development service device, reducing the impact on the development of other projects.

[0038] As an optional example, the development service device may send a branch parameter to the security detection service device through a curl command to notify the security detection service device to build a corresponding test branch.

[0039] Optionally, in the security detection service device, a Jenkins tool may be configured, based on which the curl command may be pre-configured. For example, a corresponding token may be configured in the Jenkins tool of the security detection service device. The branch parameter may be obtained from the development service device and passed to the security detection service device through the variable ${branch}.

[0040] Next, in step 202 and step 203, the security detection service device may detect the received message notification to confirm whether the message notification includes a branch construction instruction.

[0041] When it is detected that the message notification includes a branch building instruction, a test branch is built locally on the security detection service device according to the branch parameters. Specifically, the security detection service device receives the code included in the development branch transmitted by the development service device, and merges the code into the test branch to obtain the target test branch. In other words, the security detection service device listens to the build instructions and branch parameters issued by the development service device through the Jenkins tool through the Jenkins tool, and the security detection service device compiles and builds by pulling the corresponding code, as well as the next security detection step.

[0042] Specifically, in step 204, after obtaining the target test branch, a security check is performed on the target test branch according to a preset security check strategy to generate a check result.

[0043] In some embodiments, the preset security detection strategy includes but is not limited to detecting one or more of the following: vulnerability scanning, penetration testing, code auditing, security configuration checking, compliance testing, etc.

[0044] According to the branch detection method provided in the embodiment of the present application, the security detection process no longer occupies the resources of the original development service equipment, thereby ensuring the operating performance of the development service equipment, thereby reducing the impact on the construction progress of other projects. The time occupied by the security detection process will also interfere with the construction progress of other projects, thereby reducing the impact on the overall progress of the construction.

[0045] In some embodiments, the preset security detection strategy includes at least any one or more of the following strategies: static code scanning strategy, component security dependency scanning strategy, unauthorized access detection strategy, SQL injection detection strategy, and endpoint access permission detection strategy.

[0046] Exemplarily, based on the static code scanning strategy, code quality, programming errors, and potential security vulnerabilities can be checked without running the code. Optionally, automated tools can be used to perform scanning to identify coding errors such as buffer overflows, unsafe API usage, etc. Automated tools such as Fortify can be used to ensure that the code meets security requirements before release.

[0047] Based on the component security dependency scanning strategy, known vulnerabilities in third-party libraries that the project depends on can be identified and resolved to reduce the risk of the system being attacked.

[0048] Based on the unauthorized access detection strategy, for example, it can be used to detect whether the user identity can be correctly verified and whether the attacker can access or operate other users' resources. The unauthorized access detection strategy includes checking the API permissions in the backend code to verify the user identity and permissions.

[0049] Based on the SQL injection detection strategy, it can include the use of precompiled statements and parameter binding to identify whether an injection attack has occurred.

[0050] Based on endpoint access permission detection policies, you can monitor and manage access permissions for API endpoints to ensure that only authorized users or systems can access sensitive system functions.

[0051] In addition, in the embodiment of the present application, the detection results can be provided to the developer in a visual manner so that the developer can promptly fix the security vulnerabilities in the code. The visual detection results can include a list of the discovered security vulnerabilities and code defects, including a description of the vulnerability, repair suggestions, code location and other information.

[0052] In some embodiments, the branch parameter includes a project identifier of the project to which the development branch belongs. Specifically, based on the branch parameter, building and testing the branch locally on the security detection service device may include the following steps: detecting whether there is a test node corresponding to the project identifier locally on the security detection service device. If there is a test node corresponding to the project identifier, building a test branch locally on the security detection service device based on the test node.

[0053] For example, during the project development process, it may be necessary to perform multiple security checks on the branch. For example, after a security check, it is found that the branch has a security vulnerability and needs to be patched. After the patch is completed, it is necessary to perform a security check on the patched branch.

[0054] The branch parameters correspond to the test nodes one by one, and the branch parameters can include the name of the label, the name of the task, the status of the release, the number of tests, etc. This information can be used as a unique identifier for the test node corresponding to the project identifier.

[0055] For example, the structure of the branch parameter is “tag-task-release-test-2”.

[0056] Tag is used to mark the release point of the software and the pointer of a specific submission. Task can be associated with work requirements and can be used to represent development tasks. Each development task can correspond to a branch and mark the development project to which the development task belongs. Release can be used to indicate that the branch is a version that needs to be delivered to users. This version may include some new features, improvements or fixes. Test-2 can represent the second test, etc.

[0057] In the embodiment of the present application, the information included in the branch parameters can be used to conveniently confirm whether there is a test node corresponding to the project identifier locally on the security detection service device. In the case of a test node corresponding to the project identifier, the security detection service device can quickly build a test branch based on the test node locally to prepare for the security test of the branch.

[0058] In some embodiments of the present application, the method may further include the following steps: in the case where there is no test node corresponding to the project identifier, detecting whether there is a storage space corresponding to the project identifier locally on the security detection service device. In the case where there is a storage space corresponding to the project identifier, establishing a test node corresponding to the project identifier in the storage space corresponding to the project identifier, and constructing a test branch locally on the security detection service device based on the test node.

[0059] Exemplarily, the storage address storage space corresponding to the project identifier may be displayed in the form of a project folder, and the storage address storage space corresponding to each project identifier corresponds to a specific address.

[0060] In the absence of a test node corresponding to the project ID, the security detection service device is checked to see if there is storage space corresponding to the project ID. By checking the storage space, the cleanliness of the local code can be improved, making it easier for developers to distinguish between branch codes corresponding to different projects.

[0061] In some embodiments of the present application, the method may further include the following steps: in the absence of a storage space corresponding to the project identifier, a storage space corresponding to the project identifier is established locally in the security detection service device. In the storage space corresponding to the project identifier, a test node corresponding to the project identifier is established, and a test branch is constructed locally in the security detection service device based on the test node.

[0062] According to the embodiment of the present application, by detecting the storage space, the neatness of the local code can be improved, and developers can conveniently distinguish the branch codes corresponding to different projects.

[0063] The above describes the implementation methods and advantages of the embodiments of the present application through multiple embodiments. The following describes the specific processing process of the embodiments of the present application in detail with reference to specific examples.

[0064] In order to more clearly introduce the embodiments of the present application, the specific processing process of the embodiments of the present application is described in detail below with reference to specific examples.

[0065] Figure 3 is a schematic diagram of another branch detection process provided in an embodiment of the present application, combined with Figure 3 As shown, the solution may include the following steps 301 to 308 .

[0066] Step 301: The development service device receives a branch building instruction.

[0067] Step 302: The development service device builds a development branch in response to the branch building instruction, and sends a message notification to the security detection service device.

[0068] Step 303: When the security detection service device detects that the message notification includes a branch building instruction, it detects whether there is a test node corresponding to the project identifier locally.

[0069] In case there is a test node corresponding to the project identifier, step 304 is executed.

[0070] If there is no test node corresponding to the project identifier, step 305 is executed.

[0071] Step 304: The security detection service device constructs a test branch locally based on the test node.

[0072] Step 305: The security detection device detects whether there is storage space corresponding to the project identifier locally.

[0073] If there is no storage space corresponding to the project identifier, step 306 is executed.

[0074] If there is storage space corresponding to the project identifier, step 307 is executed.

[0075] Step 306: The security detection service device locally establishes a storage space corresponding to the project identifier.

[0076] Step 307: Create a test node corresponding to the project identifier in the storage space corresponding to the project identifier, and construct a test branch based on the test node locally in the security detection service device.

[0077] Step 308: Perform a security check on the target test branch according to a preset security check strategy and generate a check result.

[0078] The preset security detection strategy includes at least any one or more of the following strategies: static code scanning strategy, component security dependency scanning strategy, overauthorization detection strategy, SQL injection detection strategy, and endpoint access permission detection strategy.

[0079] Corresponding to the method embodiment of the present application, the present application also provides a security detection service device, the security detection service device is connected to the development service device for communication, such as Figure 4 As shown, the security detection service device includes a receiving module 401 and a processing module 402 .

[0080] The receiving module 401 is used to receive a message notification from a development service device, where the message notification includes a branch construction instruction and a branch parameter received by the development service device, wherein the branch construction instruction is used to instruct the development service device to construct a development branch corresponding to the branch parameter;

[0081] The processing module 402 is used to construct a test branch locally in the security detection service device according to the branch parameter when detecting that the message notification includes a branch construction instruction;

[0082] The receiving module 401 is further used to receive the code included in the development branch transmitted by the development service device, and merge the code into the test branch to obtain the target test branch;

[0083] The processing module 402 is further configured to perform a security check on the target test branch according to a preset security check strategy and generate a check result.

[0084] In some embodiments of the present application, the branch parameter may include a project identifier of a project to which the development branch belongs; the processing module 402 is further configured to detect whether a test node corresponding to the project identifier already exists locally on the security detection service device. The processing module 402 is further configured to construct a test branch based on the test node locally on the security detection service device if a test node corresponding to the project identifier already exists.

[0085] In some embodiments of the present application, optionally, the processing module 402 is also used to detect whether there is a storage space corresponding to the project identifier locally in the security detection service device when there is no test node corresponding to the project identifier; the processing module 402 is also used to establish a test node corresponding to the project identifier in the storage space corresponding to the project identifier when there is a storage space corresponding to the project identifier, and to construct a test branch based on the test node locally in the security detection service device.

[0086] In some embodiments of the present application, optionally, the processing module 402 is also used to establish a storage space corresponding to the project identifier locally on the security detection service device in the absence of a storage space corresponding to the project identifier; the processing module 402 is also used to establish a test node corresponding to the project identifier in the storage space corresponding to the project identifier, and to construct a test branch based on the test node locally on the security detection service device.

[0087] In some embodiments of the present application, optionally, the preset security detection strategy includes at least any one or more of the following strategies: static code scanning strategy, component security dependency scanning strategy, overauthorization detection strategy, SQL injection detection strategy, endpoint access permission detection strategy.

[0088] It can be understood that the security detection service device of the embodiment of the present application can correspond to the execution subject of the branch detection method provided in the embodiment of the present application. The specific details of the operation and / or function of each module / unit of the security detection service device can be found in the description of the corresponding parts of the branch detection method provided in the above-mentioned embodiment of the present application. For the sake of brevity, they will not be repeated here.

[0089] The electronic device in the embodiment of the present application may be a user terminal device, a server, other computing devices, or a cloud server. Figure 5 A schematic diagram of the hardware structure of an electronic device according to an embodiment of the present application is shown. The electronic device may include a processor 501 and a memory 502 storing computer program instructions. When the processor 501 executes the computer program instructions, the process or function of any of the above-mentioned embodiments of the method is implemented.

[0090] Specifically, the processor 501 may include a central processing unit (CPU), or an application-specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application. The memory 502 may include a large-capacity memory for data or instructions. For example, the memory 502 may be at least one of the following: a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a tape, a universal serial bus (USB) drive or other physical / tangible memory storage device. For another example, the memory 502 may include a removable or non-removable (or fixed) medium. For another example, the memory 502 may be inside or outside the integrated gateway disaster recovery device. The memory 502 may be a non-volatile solid-state memory. In other words, the memory 502 usually includes a tangible (non-transitory) computer-readable storage medium (such as a memory device) encoded with computer-executable instructions, and when the software is executed (such as executed by one or more processors), the operations described in the method of the embodiment of the present application can be performed. The processor 501 implements the process or function of any method in the above embodiments by reading and executing the computer program instructions stored in the memory 502 .

[0091] In one example, Figure 5The electronic device shown may also include a communication interface 503 and a bus 510. Among them, the processor 501, the memory 502, and the communication interface 503 are connected through the bus 510 and complete the communication between each other. The communication interface 503 is mainly used to realize the communication between each module, device, unit and / or device in the embodiment of the present application. The bus 510 includes hardware, software or both, and can couple the components of the online data traffic billing device to each other. For example, the bus may include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industrial standard architecture (EISA) bus, a front-end bus (FSB), a hypertransport (HT) interconnect, an industrial standard architecture (ISA) bus, an infinite bandwidth interconnect, a low pin count (LPC) bus, a memory bus, a micro channel architecture (MCA) bus, a peripheral component interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a serial advanced technology attachment (SATA) bus, a video electronics standard association local (VLB) bus or other suitable buses. The bus 510 may include one or more buses. Although the embodiments of the present application describe or illustrate a specific bus, the embodiments of the present application may consider any suitable bus or interconnection method.

[0092] In combination with the method in the above embodiments, an embodiment of the present application also provides a computer-readable storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any method in the above embodiments is implemented.

[0093] In addition, an embodiment of the present application further provides a computer program product, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the process or function of any one of the methods in the above embodiments is implemented.

[0094] The above exemplarily describes the flowcharts and / or block diagrams of the methods, devices, systems and computer program products of the embodiments of the present application, and describes the relevant various aspects. It should be understood that each box or combination thereof in the flowchart and / or block diagram can be implemented by computer program instructions, or by dedicated hardware that performs a specified function or action, or by a combination of dedicated hardware and computer instructions. For example, these computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to form a machine that enables these instructions executed by such a processor to enable the implementation of the functions / actions specified in each box or combination thereof in the flowchart and / or block diagram. Such a processor can be a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.

[0095] The functional blocks shown in the structured block diagram of the embodiment of the present application can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc.; when implemented in software, it is a program or code segment used to perform the required task. The program or code segment can be stored in a memory, or transmitted on a transmission medium or a communication link via a data signal carried in a carrier. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0096] It should be noted that the present application is not limited to the specific configurations and processes described above or shown in the figures. The above is only a specific implementation mode of the present application. Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the described system, device, module or unit can refer to the corresponding process in the method embodiment without further description. It should be understood that the scope of protection of the present application is not limited to this. Any technician familiar with the technical field can think of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and these modifications or substitutions should be included in the scope of protection of the present application.

Claims

1. A branch detection method, characterized in that: Applied to a security detection service device, the security detection service device is communicatively connected with a development service device, and the method includes: Receiving a message notification from a development service device, the message notification including a branch construction instruction and the branch parameter received by the development service device, wherein the branch construction instruction is used to instruct the development service device to construct a development branch corresponding to the branch parameter; In the case where it is detected that the message notification includes the branch construction instruction, constructing the test branch locally in the security detection service device according to the branch parameter; Receiving the code included in the development branch transmitted by the development service device, and merging the code into the test branch to obtain a target test branch; Perform security testing on the target test branch according to a preset security testing strategy to generate a testing result.

2. The method according to claim 1, characterized in that: The branch parameter includes a project identifier of the project to which the development branch belongs; The step of constructing the test branch locally on the security detection service device according to the branch parameter includes: Detecting whether the security detection service device already has a test node corresponding to the project identifier locally; In the case where a test node corresponding to the project identifier already exists, the test branch is constructed locally on the security detection service device based on the test node.

3. The method according to claim 2, characterized in that The method further comprises: In the case where there is no test node corresponding to the project identifier, detecting whether the security detection service device has a storage space corresponding to the project identifier locally; In the case where there is storage space corresponding to the project identifier, a test node corresponding to the project identifier is established in the storage space corresponding to the project identifier, and the test branch is constructed locally on the security detection service device based on the test node.

4. The method according to claim 3, characterized in that The method further comprises: In the case where there is no storage space corresponding to the project identifier, establishing a storage space corresponding to the project identifier locally in the security detection service device; In the storage space corresponding to the project identifier, a test node corresponding to the project identifier is established, and the test branch is constructed locally on the security detection service device based on the test node.

5. The method according to claim 1, characterized in that The preset security detection strategy includes at least any one or more of the following strategies: static code scanning strategy, component security dependency scanning strategy, unauthorized detection strategy, SQL injection detection strategy, and endpoint access permission detection strategy.

6. A safety detection service device, characterized in that: The security detection service device is communicatively connected with the development service device, including: A receiving module, configured to receive a message notification from a development service device, wherein the message notification includes a branch construction instruction and the branch parameter received by the development service device, wherein the branch construction instruction is used to instruct the development service device to construct a development branch corresponding to the branch parameter; A processing module, configured to construct the test branch locally in the security detection service device according to the branch parameter when detecting that the message notification includes the branch construction instruction; The receiving module is further configured to receive the code included in the development branch transmitted by the development service device, and merge the code into the test branch to obtain a target test branch; The processing module is further used to perform a security check on the target test branch according to a preset security check strategy and generate a check result.

7. The safety detection service equipment according to claim 6, characterized in that: The branch parameter includes a project identifier of the project to which the development branch belongs; The processing module is further used to detect whether the security detection service device has a test node corresponding to the project identifier locally; The processing module is further configured to construct the test branch based on the test node locally in the security detection service device when there is already a test node corresponding to the project identifier.

8. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; when the electronic device executes the computer program instructions, the method according to any one of claims 1 to 5 is implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the method according to any one of claims 1 to 5 is implemented.

10. A computer program product, characterized in that It comprises computer program instructions, which, when executed by a processor, implement the method according to any one of claims 1 to 5.

Citation Information

Patent Citations

  • Software security test method and device, equipment and storage medium

    CN114564395A

  • Software assembly line automatic detection method and device thereof, equipment, medium and product

    CN115203051A

  • Task processing method and device based on code development and electronic equipment

    CN116795338A

  • Code testing method, device and equipment and computer storage medium

    CN117493193A

  • System and method for implementing a monitoring tool switch

    US20210373876A1