Branch detection method, security detection service device, and storage medium

By using the security detection service equipment to build a test branch locally and perform security testing, the problem of security testing occupying server resources is solved, the detection efficiency is improved and the impact on other project development is reduced.

CN119312349BActive Publication Date: 2025-10-17QIAN JIN NETWORK INFORMATION TECH SHANGHAI LTD
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

In the existing technology, the security detection process occupies a large amount of server resources, affecting server performance and slowing down the development speed of other projects, resulting in low security detection efficiency.

Method used

Through the communication connection between the security detection service device and the development service device, branch construction instructions and parameters are received, a local test branch is built, and security detection is performed locally to generate detection results, thereby reducing the occupation of development service device resources.

Benefits of technology

It improves the efficiency of safety testing, reduces the impact on other project development, and ensures the operational performance of development service equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119312349B_ABST
    Figure CN119312349B_ABST
Patent Text Reader

Abstract

The application discloses a branch detection method, a security detection service device and a storage medium. The branch detection method is applied to the 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, wherein the message notification comprises a branch construction instruction and a branch parameter received by the development service device, and the branch construction instruction is used for instructing the development service device to construct a development branch corresponding to the branch parameter; in the case that it is detected that the message notification comprises the branch construction instruction, constructing a test branch locally on the security detection service device according to the branch parameter; receiving code included in the development branch transmitted by the development service device, and incorporating 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. According to the embodiment of the application, the security detection efficiency of the branch can be improved, and the influence on other project development is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of computer, and particularly relates to a branch detection method, a security detection service device and a storage medium. BACKGROUND

[0002] Security detection can include security testing, code review and other detection methods, and is a key link to ensure software quality. They play a crucial role in the software development process. Before software is released, security testing and code review can help to discover and fix potential security problems as soon as possible, thereby reducing the cost and risk of later modification.

[0003] In the process of software development, with the application of cloud computing and rapid release of software, the rhythm of the entire software development and release is accelerated with the optimization of software development tools and development processes. Therefore, before the software is released, the amount of code that needs to be detected for security is increasing. At present, in the related technology of security detection of code, security detection is a necessary process after software development is completed. However, in the process of security detection, server resources need to be occupied, which causes a large running burden of the server, affects the performance of the server, reduces the efficiency of security detection, and slows down the development speed of other projects. Therefore, improving the speed of security detection has attracted more and more attention. SUMMARY

[0004] Therefore, 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 influence on the development of other projects.

[0005] The embodiments of the present application provide a branch detection method, which 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 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; in the case that it is detected that the message notification comprises the branch construction instruction, constructing a test branch locally in the security detection service device according to the branch parameters; receiving code included in the development branch transmitted by the development service device, and incorporating the code into the test branch to obtain a target test branch; performing security detection on the target test branch according to a preset security detection strategy to generate a detection result.

[0006] Optionally, the method according to the embodiment of the application further comprises: in the case that there is no test node corresponding to the project identifier, detecting whether there is storage space corresponding to the project identifier in the security detection service device; in the case that there is storage space corresponding to the project identifier, establishing a test node corresponding to the project identifier in the storage space, and constructing a test branch based on the test node in the security detection service device.

[0007] Optionally, the method according to the embodiment of the application further comprises: in the case that there is no test node corresponding to the project identifier, detecting whether there is storage space corresponding to the project identifier in the security detection service device; in the case that there is storage space corresponding to the project identifier, establishing a test node corresponding to the project identifier in the storage space, and constructing a test branch based on the test node in the security detection service device.

[0008] Optionally, the method according to the embodiment of the application further comprises: in the case that there is no test node corresponding to the project identifier, detecting whether there is storage space corresponding to the project identifier in the security detection service device; in the case that there is storage space corresponding to the project identifier, establishing a test node corresponding to the project identifier in the storage space, and constructing a test branch based on the test node in the security detection service device.

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

[0010] The embodiment of the application provides a security detection service device, which is in communication connection with a development service device, and comprises: a receiving module, configured to receive a message notification of the development service device, wherein the message notification comprises a branch construction instruction and a branch parameter received by the development service device, and 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 a test branch based on the branch parameter in the security detection service device in the case that the message notification comprises the branch construction instruction; the receiving module is further configured to receive code included in the development branch transmitted by the development service device, and incorporate the code into the test branch to obtain a target test branch; and the processing module is further configured to perform security detection on the target test branch according to a preset security detection strategy, and generate a detection result.

[0011] Optionally, according to the security detection service device provided in the embodiments of the present application, the branch parameter comprises a project identifier of a project to which the development branch belongs; the processing module is further configured to detect whether a test node corresponding to the project identifier already exists in the security detection service device; and the processing module is further configured to construct a test branch based on the test node in the security detection service device in the case that the test node corresponding to the project identifier already exists.

[0012] The embodiments of the present application provide an electronic device, which comprises a processor and a memory storing computer program instructions; the processor implements the steps of the method as described above when executing the computer program instructions.

[0013] The embodiments of the present application provide a computer readable storage medium, which stores computer program instructions; the computer program instructions are executed by a processor to implement the steps of the method as described above.

[0014] The embodiments of the present application provide a computer program product, which comprises computer program instructions; the computer program instructions are executed by a processor to implement the steps of the method as described above.

[0015] By using the embodiments of the present application, the security detection service device can be connected 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, thereby obtaining the branch parameter of the development branch when the development service device constructs the development branch, and further constructing a test branch based on the branch parameter, so that the test branch no longer occupies the device resources of the development service device, and the influence on the development of other projects is reduced. Then, the code included in the development branch is obtained to obtain the target test branch in the security detection service device, and then the target test branch can be detected according to the preset security detection strategy to generate a detection result, and the time required for normal security detection will not affect the progress of the development of other projects, so that the security detection efficiency of the branch can be improved, and the influence on the development of other projects is reduced. BRIEF DESCRIPTION OF DRAWINGS

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

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

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

[0019] Figure 3 is another processing process schematic diagram of the detection of the branch of the embodiments of the present application.

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

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

[0022] The principles and spirits of the present application will be described below with reference to a number of exemplary embodiments. It should be understood that the purpose of providing these embodiments is to make the principles and spirits of the present application clearer and more thorough, and to enable those skilled in the art to better understand and implement the principles and spirits of the present application. The exemplary embodiments provided herein are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments herein, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present 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 the entities (or operations).

[0023] Embodiments of the present application relate to terminal devices and / or servers. Those skilled in the art know that embodiments of the present application can be implemented as a system, apparatus, device, method, computer readable storage medium or computer program product. Therefore, the present disclosure can be embodied as at least one of the following forms: complete hardware, complete software, or hardware and software combined. According to embodiments of the present application, a branch detection method, a security detection service device and a storage medium are claimed. Figure 1 A schematic diagram of a system architecture according to an embodiment of the present application is shown. The system can include terminal devices and servers. As shown, the terminal device 102 can include at least one of the following: a smartphone, a tablet computer, a notebook computer, a desktop computer, a smart television, various wearable devices, an augmented reality (AR) device, a virtual reality (VR) device, etc. A client can be installed on the terminal device 102, for example, the client can be a client (such as an application (app)) specially designed to perform a specific function, or a client embedded with multiple applicationlets (different functions), or a client logged in through a browser. In embodiments of the present application, a user can operate on the terminal device 102, for example, the user can open the client installed on the terminal device 102 and input instructions through the client operation, or the user can open the browser installed on the terminal device 102 and input instructions through the browser operation. Exemplarily, the instructions can be branch construction instructions, code synchronization instructions, etc., and the content of the instructions is not specifically limited here. Figure 1 Exemplarily, the instructions can be branch construction instructions, code synchronization instructions, etc., and the content of the instructions is not specifically limited here.

[0024] After the terminal device 102 receives the instruction input by the user, the request information containing the instruction is sent to the server. After the server receives the request information, the corresponding processing is performed. As shown in the figure, Figure 1 The development service device 104a and the security detection service device 104b can be included in the system. After the request information is sent through the development service device 104a, the user instruction is completed through a series of data processing and information interaction by interacting with the security detection service device 104b.

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

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

[0027] Figure 2 A flowchart of the branch detection method of the embodiment of the application is shown, which includes the following steps 201 to 204.

[0028] Step 201, receiving a message notification of a development service device, the message notification including a branch construction instruction received by the development service device and a branch parameter, wherein the branch construction instruction is used to instruct the development service device to construct a development branch corresponding to the branch parameter.

[0029] Step 202, in the case where it is detected that the message notification includes the branch construction instruction, constructing a test branch locally in the security detection service device according to the branch parameter.

[0030] Step 203, receiving code included in a development branch transmitted by the development service device, and incorporating the code into the test branch to obtain a target test branch.

[0031] Step 204, performing security detection on the target test branch according to a preset security detection strategy, and generating a detection result.

[0032] The above steps will be described in detail in combination with specific embodiments, as shown below.

[0033] Firstly, step 201, each developer can undertake one or more code branch development tasks for a requirement, and each development task can correspond to a development project.

[0034] The development service device can be configured with a development service tool, such as a continuous integration (CI) tool. Based on the development service tool, a developer can integrate a code change into a shared repository at any time. This allows different developers to perform their respective development tasks and collaborate to complete the entire development project.

[0035] As a specific example, the CI tool can be a Jenkins tool. Jenkins can be configured and used to execute a build process for a specific project. The build process can include, for example, setting up source code management, defining build triggers, configuring a build environment, writing build scripts, and setting up post-build actions. For example, Jenkins can be configured to pull code and execute build commands.

[0036] In embodiments of the present application, a developer can access the CI tool in the development service device and input a branch build instruction to the CI tool. The branch build instruction can include a branch parameter. In response to the branch build instruction, the development service device can build the development branch corresponding to the branch parameter. For example, when a developer accesses the CI tool in the development service device using a development terminal, the terminal device can display the branch parameters of the development branches to be built. The developer can select the desired branch parameter to conveniently input the branch build instruction to the development service device.

[0037] After the development service device receives the branch build instruction, it can optionally send a message to the development service device. The message can include information that the development service device has received the branch build instruction and the branch parameter. In this way, the test branch can be built locally according to the branch parameter. Then, the test can be performed on the security detection service device. This allows the test process of the test branch to no longer occupy the device resources of the development service device, reducing the impact on other project development.

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

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

[0040] Next, the security detection service device can detect the received message notification to determine whether the message notification includes the branch building instruction, involving steps 202 and 203.

[0041] In the case where it is detected that the message notification includes the branch building instruction, a test branch is built locally at the security detection service device according to the branch parameter. Specifically, the security detection service device receives the code included in the development branch delivered by the development service device and incorporates the code into the test branch to obtain a target test branch. In other words, the security detection service device listens to the building instruction and the branch parameter issued by the development service device through the Jenkins tool, compiles and builds the corresponding code by pulling, and then performs the following security detection steps.

[0042] Specifically, involving step 204, after obtaining the target test branch, the target test branch is subjected to security detection according to a preset security detection strategy to generate a detection result.

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

[0044] According to the branch detection method provided in the embodiments of the present application, the process of security detection no longer occupies the resources of the original development service device, ensuring the running performance of the development service device, thereby reducing the influence on the construction progress of other projects. The time occupied by the security detection process also interferes with the progress of other project construction, thereby reducing the influence on the overall progress of 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, privilege detection strategy, SQL injection detection strategy, and endpoint access permission detection strategy.

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

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

[0048] Based on the privilege detection strategy, for example, it can be used to detect whether the user identity can be verified correctly, whether the access or operation of other user's resources can be identified as an attacker. The privilege detection strategy includes permission checking of API in the backend code, verifying user identity and permission.

[0049] Based on the SQL injection detection strategy, it can include using precompiled statements and parameter binding, etc. to identify whether an injection attack occurs.

[0050] Based on the endpoint access permission detection strategy, the access permission of API endpoints can be monitored and managed to ensure that only authorized users or systems can access sensitive system functions.

[0051] In addition, in the embodiments of the present application, the detection results can be provided to the developers in a visualized manner, so that the developers can timely repair the security vulnerabilities in the code. In the visualized detection results, the discovered security vulnerabilities and code defects can be listed, including information such as description of the vulnerabilities, repair suggestions, code location, etc.

[0052] In some embodiments, the branch parameter includes a project identifier of a project to which the development branch belongs. Specifically, according to the branch parameter, a test branch is constructed locally on the security detection service device, which can specifically include the following steps: detecting whether a test node corresponding to the project identifier already exists locally on the security detection service device. In the case where the 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.

[0053] For example, during the development of a project, multiple security detections of the branch may be required, for example, after a security detection, it is found that the branch has security vulnerabilities and needs to be repaired, and after the repair is completed, the repaired branch needs to be detected for security.

[0054] The branch parameter corresponds to the test node one by one, and the branch parameter can include information such as the name of the tag, the name of the task, the state of the release, and the number of tests. Through these information, the test node corresponding to the project identifier can be uniquely identified.

[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 software and the pointer of a specific commit. Task can be associated with work requirements and can be used to represent a development task, 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 for use, which can include some new functions, improvements or fixes. Test-2 can represent the second test, etc.

[0057] In the embodiments of the present application, the information included in the branch parameter can be used to conveniently determine whether there is a test node corresponding to the project identifier locally in the security detection service device. In the case where there is a test node corresponding to the project identifier, the security detection service device can quickly construct 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 can 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 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.

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

[0060] 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 in the security detection service device. By detecting the storage space, the neatness of the local code can be improved, and the developers can conveniently distinguish the branch code corresponding to different projects.

[0061] In some embodiments of the present application, the method can further include the following steps: 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, establishing a test node corresponding to the project identifier, and constructing a test branch based on the test node locally in the security detection service device.

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

[0063] The implementation manners of the embodiments of the present application and the advantages brought by the implementation manners are described above through multiple embodiments. The specific processing procedures of the embodiments of the present application are described in detail below in combination with specific examples.

[0064] The specific processing procedures of the embodiments of the present application are described in detail below in combination with specific examples.

[0065] Figure 3 is another branch detection flowchart provided by the embodiments of the present application, which is combined with Figure 3 As shown in the figure, the scheme can include the following steps 301 to 308.

[0066] Step 301, the development service device receives the branch construction instruction.

[0067] Step 302, the development service device constructs a development branch in response to the branch construction instruction, and sends a message notification to the security detection service device.

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

[0069] If there is a test node corresponding to the project identifier, step 304 is performed.

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

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

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

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

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

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

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

[0077] Step 308, the target test branch is detected according to a preset security detection strategy, and a detection result is generated.

[0078] The preset security detection strategy includes at least any one or more of the following strategies: a static code scanning strategy, a component security dependency scanning strategy, an unauthorized detection strategy, an SQL injection detection strategy, and an 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, which is in communication connection with a development service device, as shown in Figure 4 The security detection service device includes a receiving module 401 and a processing module 402.

[0080] The receiving module 401 is configured to receive 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, where 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 configured to, when it is detected that the message notification comprises the branch construction instruction, construct a test branch locally at the security detection service device according to the branch parameter;

[0082] The receiving module 401 is further configured to receive code included in the development branch transmitted by the development service device, and incorporate the code into the test branch to obtain a target test branch.

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

[0084] In some embodiments of the present application, the branch parameter comprises 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 at the security detection service device; and the processing module 402 is further configured to, when the test node corresponding to the project identifier already exists, construct the test branch locally at the security detection service device based on the test node.

[0085] In some embodiments of the present application, the processing module 402 is further configured to, when the test node corresponding to the project identifier does not exist, detect whether a storage space corresponding to the project identifier already exists locally at the security detection service device; the processing module 402 is further configured to, when the storage space corresponding to the project identifier already exists, establish the test node corresponding to the project identifier in the storage space corresponding to the project identifier, and construct the test branch locally at the security detection service device based on the test node.

[0086] In some embodiments of the present application, the processing module 402 is further configured to, when the storage space corresponding to the project identifier does not exist, establish the storage space corresponding to the project identifier locally at the security detection service device; and the processing module 402 is further configured to establish the test node corresponding to the project identifier in the storage space corresponding to the project identifier, and construct the test branch locally at the security detection service device based on the test node.

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

[0088] It can be understood that the security detection service device of the embodiments of the present application can correspond to the execution subject of the branch detection method provided by the embodiments of the present application, and the specific details of the operation and / or function of each module / unit of the security detection service device can be referred to the description of the corresponding part in the branch detection method provided by the embodiments of the present application. For brevity, it will not be repeated here.

[0089] The electronic device in the embodiments of the present application can be a user terminal device, can be a server, can also be other computing devices, and can also be a cloud server. Figure 5 A hardware structure schematic diagram of the electronic device of the embodiments of the present application is shown, which can include a processor 501 and a memory 502 storing computer program instructions. The processor 501 executes the computer program instructions to implement the flow or function of the method of any of the above embodiments.

[0090] Specifically, the processor 501 can include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or can be configured to implement one or more integrated circuits of the embodiments of the present application. The memory 502 can include a mass storage for data or instructions. For example, the memory 502 can be at least one of a hard disk drive (HDD), a read-only memory (ROM), a random access memory (RAM), a floppy disk drive, a flash memory, an optical disc, a magneto-optical disc, a magnetic tape, a universal serial bus (USB) drive, or other physical / tangible memory storage devices. For another example, the memory 502 can include removable or non-removable (or fixed) media. For another example, the memory 502 can be inside or outside the integrated gateway disaster recovery device. The memory 502 can be a non-volatile solid-state memory. In other words, the memory 502 generally 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 by one or more processors), can perform the operations described in the method of the embodiments of the present application. The processor 501 implements the flow or function of any of the above methods by reading and executing the computer program instructions stored in the memory 502.

[0091] In one example, Figure 5The electronic device shown can also include a communication interface 503 and a bus 510. Among them, the processor 501, the memory 502, 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 the modules, devices, units and / or equipment in the embodiments of the application. The bus 510 includes hardware, software or both, which can couple the components of the online data traffic billing device to each other. For example, the bus can include at least one of the following: an accelerated graphics port (AGP) or other graphics bus, an enhanced industry standard architecture (EISA) bus, a front side bus (FSB), a hyper transport (HT) interconnect, an industry standard architecture (ISA) bus, an infiniband 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 standards association local (VLB) bus or other suitable bus. The bus 510 can include one or more buses. Although the embodiments of the application describe or show a specific bus, any suitable bus or interconnection method can be considered by the embodiments of the application.

[0092] In combination with the method in the above embodiments, the embodiments of the application further provide a computer readable storage medium, which has stored thereon computer program instructions, and the computer program instructions are executed by a processor to implement the flow or function of any of the methods in the above embodiments.

[0093] In addition, the embodiments of the application also provide a computer program product, which has stored thereon computer program instructions, and the computer program instructions are executed by a processor to implement the flow or function of any of the methods in the above embodiments.

[0094] The flowcharts and / or block diagrams of the methods, devices, systems and computer program products of the embodiments of the application are described above as examples, and the related aspects are described. It should be understood that each block in the flowchart and / or block diagram can be implemented by computer program instructions, or by special hardware that performs specified functions or actions, or by a combination of special 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 apparatus, to form a machine, so that the instructions executed by the processor enable the implementation of the functions / actions specified in each block or combination of blocks 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 structural block diagram of the embodiments 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 tasks. The program or code segment can be stored in a memory or transmitted through a data signal carried in a carrier wave over a transmission medium or communication link. 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 drawings. The above description is merely a specific implementation of the present application, and those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the described systems, devices, modules or units can refer to the corresponding processes in the method embodiments, which need not be described again. It should be understood that the protection scope of the present application is not limited thereto, and any person skilled in the art can think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be covered within the protection scope 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 to 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 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; In a case where 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 parameter; receiving the code included in the development branch delivered 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 test 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 a storage space corresponding to the project identifier already exists, 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: If there is no 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, 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, wherein 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.

6. A safety detection service device, characterized in that: The security detection service device is in communication with the development service device, including: a receiving module, configured to receive a message notification from a 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; a processing module, configured to construct a test branch locally on the security detection service device according to the branch parameters 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 configured 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 configured to detect whether a test node corresponding to the project identifier already exists locally on the security detection service device; The processing module is further configured to construct the test branch locally on the security detection service device based on the test node when a test node corresponding to the project identifier already exists.

8. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; and 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, which implement the method according to any one of claims 1 to 5 when executed by a processor.

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

Citation Information

Patent Citations

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

    CN114564395A

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

    CN116795338A