Code or product scanning method, device, electronic device and storage medium
By automatically processing plug-in scanning tasks on the scanning platform, obtaining and generating execution process data, and scheduling to the scanning device, the difficulty of integrating scanning tools and uniformly aggregating the result data in the prior art is solved, and high-versatility and low-cost Scanning platform, supports flexible integration and evolution of different scanning tools.
Patent Information
- Application Number
- CN202111617030.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-27
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2041-12-27
AI Technical Summary
The prior art has difficulties in integrating scanning tools and uniformly summarizing result data, which makes it difficult to realize the analysis of scan detailed results and visualization of data statistical analysis reports. The tool integration process is complex and consumes a lot of manpower.
By implementing the automated processing of plug-in scanning tasks on the scanning platform, obtaining task configuration data, generating execution process data, and scheduling to a preset scanning device, scanning of code or products is realized. This method does not require too much attention to the characteristics of the specific scanning tool and the scanning process, but focuses on the provision of scanning resources.
It improves the versatility of the scanning platform, reduces labor and time costs, and realizes flexible integration and evolution of different scanning tools, allowing tool researchers to formulate standard specifications for use and maintain the scanning analysis process.
Smart Images

Figure CN116401669B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of computer technology, and in particular to a method, device, electronic device and storage medium for scanning a code or product. Background Art
[0002] As computer software and hardware vulnerabilities become increasingly prominent, vulnerabilities caused by code or products (including security vulnerabilities, performance vulnerabilities, etc.) have also received widespread attention. How to detect code or product vulnerabilities? There are commercial scanning tools (klocwork, coverity, etc.), open source scanning tools (sonar, etc.), some small language scanning tools, and scanning tools developed by companies. The scanning process of different scanning tools is completely different, and the scanning results and report presentation are even more different. For large and medium-sized companies and enterprises, it is often necessary to integrate multiple scanning tools and need to view the unified summary of the scanning result data.
[0003] There are currently two common practices for scanning tool integration. First, embedding scanning of different tools in the continuous integration (CI) pipeline to achieve the effect of gating. The pipelines of different R&D project groups are too customized, there is no standard, and it is impossible to promote universality, and it is difficult to analyze the detailed scanning results and visualize the data statistical analysis report; second, the scanning platform studies the scanning of the tool in detail and conducts in-depth integration, but often the tool researchers are not the scanning platform management R&D personnel. The process of integrating a new tool is complicated and lengthy, and it will consume a lot of manpower for design, development, online deployment and other work. The version of the scanning tool is iteratively evolved, and the platform also needs to iteratively develop and evolve. Summary of the invention
[0004] The main purpose of the embodiments of the present application is to provide a method, device, electronic device and storage medium for scanning codes or products, so as to realize that the scanning platform does not need to pay too much attention to the characteristics and scanning process of specific scanning tools, but only focuses on the provision of scanning resources, thereby improving the versatility of the scanning platform and reducing the labor and time costs of the scanning platform.
[0005] To achieve the above-mentioned purpose, an embodiment of the present application provides a method for scanning a code or an artifact, which is applied on a scanning platform, including: when a plug-in scanning task of the code or the artifact is triggered, obtaining the task configuration data of the plug-in scanning task; generating the execution process data of the plug-in scanning task according to the task configuration data through a preset plug-in service platform; and scheduling the execution process data to a preset scanning device so that the scanning device can scan the code or the artifact according to the execution process data.
[0006] To achieve the above-mentioned purpose, an embodiment of the present application also provides a code or product scanning device, which is applied on a scanning platform and includes: an acquisition module, a generation module and a scanning module; the acquisition module is used to acquire the task configuration data of the plug-in scanning task when the code or product plug-in scanning task is triggered; the generation module is used to generate the execution process data of the plug-in scanning task according to the task configuration data through a preset plug-in service platform; the scanning module is used to schedule the execution process data to a preset scanning device so that the scanning device can scan the code or the product according to the execution process data.
[0007] To achieve the above-mentioned purpose, an embodiment of the present application also provides an electronic device, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the above-mentioned method of scanning codes or products.
[0008] To achieve the above objectives, an embodiment of the present application further provides a computer-readable storage medium storing a computer program, which implements the above-mentioned code or product scanning method when executed by a processor.
[0009] The code or product scanning method proposed in the present application, during the scanning process of the code or product, when the plug-in scanning task of the code or product is triggered, the task configuration data of the plug-in scanning task is obtained; through a preset plug-in service platform, the execution process data of the plug-in scanning task is generated according to the task configuration data; the execution process data is scheduled to a preset scanning device, so that the scanning device can scan the code or the product according to the execution process data; the tool plug-in of the triggered plug-in scanning task is loaded by the scanning platform to realize the scanning execution of its plug-in task. The scanning platform does not need to pay too much attention to the characteristics and scanning process of the specific scanning tool, etc., and focuses on the provision of scanning resources, so that the scanning platform can more flexibly realize the integrated evolution of different scanning tools, and let the tool researchers formulate the standard specifications for the use of the tool and maintain the scanning and analysis process of the tool, thereby improving the versatility of the scanning platform and reducing the labor and time costs of the scanning platform. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a structural diagram of the application environment of the embodiment of the present application;
[0011] Figure 2 is a flowchart of a method for scanning a code or product provided in an embodiment of the present application;
[0012] Figure 3is a flowchart of a method for scanning a code or product provided in an embodiment of the present application;
[0013] Figure 4 is a flowchart of a method for scanning a code or product provided in an embodiment of the present application;
[0014] Figure 5 It is a schematic diagram of the structure of a device for scanning a code or product provided in an embodiment of the present application;
[0015] Figure 6 It is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0016] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the embodiments of the present application will be described in detail below in conjunction with the accompanying drawings. However, it will be appreciated by those skilled in the art that in the present application, many technical details are proposed in order to enable the reader to better understand the present application. However, even without these technical details and various changes and modifications based on the following embodiments, the technical scheme claimed in the present application can also be implemented. The division of the following embodiments is for the convenience of description, and the specific implementation of the present application should not be construed as any limitation, and the various embodiments can be combined and referenced with each other under the premise of no contradiction.
[0017] The application environment of the embodiment of the present application is as follows Figure 1 As shown, it includes a scanning platform, a plug-in service platform Plugin-Sever, a scanning plug-in Plugin and a scanning device agent; wherein, the plug-in service platform Plugin-Sever is used for plug-in management (loading and unloading); the scanning plug-in business capabilities provide: 1. obtain the actual task configuration parameters according to the scanning plug-in, 2. obtain the complete executable scanning process data, 3. report the key node status information of the plug-in scanning task execution process, 4. execute the custom scanning hook event in the scanning plug-in; the scanning plug-in Plugin is a plug-in that specifically describes the scanning process of the scanning tool, and is written based on a unified plug-in base; the plug-in base is a Java SDK Jar dependency package, and the plug-in developer develops a detailed scanning tool plug-in based on it. Based on the plug-in base, the developer can define the following contents of the scanning tool: 1. define which execution parameters the tool requires the user to provide 2. define the command set of the tool scanning process, and the stages can be divided according to the actual scanning process 3. define the environmental check items and dependencies of the scanning process; the scanning device agent executes the scanning client program and executes the specific scanning task execution process described by the scanning plug-in.
[0018] One embodiment of the present application relates to a method for scanning a code or product, which is applied on a scanning platform, such as Figure 2 As shown, including:
[0019] Step 101: when a plug-in scanning task of a code or product is triggered, task configuration data of the plug-in scanning task is obtained.
[0020] In an example implementation, after the user triggers the corresponding plug-in scanning service in the plug-in scanning task trigger interface (also known as the scanning platform API), since the scanning platform has a preset correspondence between the plug-in scanning task and the task configuration data, the scanning platform's task configuration service can obtain the task configuration data of the plug-in scanning task triggered by the user based on the correspondence.
[0021] In an example implementation, after the task configuration service of the scanning platform obtains the task configuration data of the plug-in scanning task, the task configuration service of the scanning platform can also generate and save the execution record of the plug-in scanning task, which is used to record the execution record of the plug-in scanning task and serve as a storage tag for data generated by subsequent code or product scanning processes.
[0022] Step 102: Generate execution process data of the plug-in scanning task according to the task configuration data through the preset plug-in service platform.
[0023] In an example implementation, the plug-in service platform is preset with command sets for each execution stage during the execution of the plug-in scanning task, as well as environment check data and dependency check data for the plug-in scanning task during the execution process; the execution record service of the scanning platform sends the task configuration data to the plug-in service platform, and the plug-in service platform supplements the various data in the task configuration data to the preset command sets for each execution stage to generate process data for each execution stage, and combines the process data for each execution stage, the environment check data and the dependency check data to generate the execution process data of the plug-in scanning task, and returns it to the execution record service of the scanning platform; wherein, the environment check data and the dependency check data are not necessary and may not be included.
[0024] Step 103: dispatch the execution process data to a preset scanning device, so that the scanning device can scan the code or product according to the execution process data.
[0025] In an example implementation, after obtaining the execution process data of the plug-in scanning task, the scheduling service of the scanning platform will add the execution process data to the scanning task execution queue; then schedule the execution process data according to the priority of the execution process data in the scanning task execution queue and the number of scanning devices; schedule the execution process data to the designated scanning device, and after receiving the execution process data, the scanning device will obtain the script corresponding to each execution stage according to the process data of each execution stage carried in the execution process data, and then scan the code or product.
[0026] In an example implementation, after receiving the execution process data, when the execution process data carries environment check data and dependency check data, the scanning device first needs to check whether the scanning device contains the script required to execute the acquired execution process data according to the environment check data; when the scanning device does not contain the script, it checks whether the scanning device contains the dependency item for acquiring the script according to the dependency check data; when the scanning device contains the dependency item for acquiring the script, it acquires the corresponding script according to the script acquisition method indicated by the dependency item; and after acquiring the script corresponding to each execution stage according to the process data of each execution stage carried in the execution process data, the code or product is scanned. When the scanning device does not contain the dependency item for acquiring the script, an alarm message is sent to the user to remind the user.
[0027] The code or product scanning method proposed in the present application, during the scanning process of the code or product, when the plug-in scanning task of the code or product is triggered, the task configuration data of the plug-in scanning task is obtained; through a preset plug-in service platform, the execution process data of the plug-in scanning task is generated according to the task configuration data; the execution process data is scheduled to a preset scanning device, so that the scanning device can scan the code or the product according to the execution process data; the tool plug-in of the triggered plug-in scanning task is loaded by the scanning platform to realize the scanning execution of its plug-in task. The scanning platform does not need to pay too much attention to the characteristics and scanning process of the specific scanning tool, etc., and focuses on the provision of scanning resources, so that the scanning platform can more flexibly realize the integrated evolution of different scanning tools, and let the tool researchers formulate the standard specifications for the use of the tool and maintain the scanning and analysis process of the tool, thereby improving the versatility of the scanning platform and reducing the labor and time costs of the scanning platform.
[0028] One embodiment of the present application relates to a method for scanning a code or product, which is applied on a scanning platform, such as Figure 3 As shown, including:
[0029] Step 201 : Select a plug-in name and a plug-in version through a plug-in list and a version list provided by a plug-in service platform, and form a plug-in scanning form.
[0030] In an example implementation, before the front-end service of the scanning platform selects the plug-in name and plug-in version, it first needs to obtain the list of plug-ins supported by the plug-in service platform through the plug-in service platform through the plug-in service platform. The front-end service of the scanning platform then selects the plug-in name from the plug-in list. After that, the API service of the scanning platform obtains the list of versions supported by the plug-in service platform through the plug-in service platform based on the plug-in name. The front-end service of the scanning platform then selects the plug-in version from the version list. There is a cascading relationship between the plug-in name and the plug-in version, and the plug-in name and plug-in version can constitute a plug-in task scanning form.
[0031] Step 202: configuring form rendering data of the plug-in scanning form through the user configuration data acquired by the plug-in service platform, and dynamically rendering the plug-in scanning form according to the form rendering data to form a plug-in scanning task form.
[0032] In an example implementation, the plug-in service platform configures the form rendering data of the plug-in task scanning form through preset user configuration data, and after the configuration is completed, it is necessary to dynamically render the plug-in task scanning form according to the form rendering data to generate a scanning task form.
[0033] Step 203: store the plug-in task scanning form on the scanning platform, wherein the plug-in scanning task form carries the task configuration data.
[0034] In an example implementation, after obtaining the plug-in task scanning form, the plug-in task scanning form can be directly stored in the task configuration service of the scanning platform. The plug-in scanning task form carries task configuration data, and the task configuration data in the plug-in scanning task form is the user configuration data after dynamic rendering.
[0035] In an example implementation, when the plug-in task scanning form is stored on the scanning platform, the plug-in task scanning form is first sent to the plug-in service platform through the API service of the scanning platform, so that the plug-in service platform can perform data verification on the plug-in task scanning form according to the user configuration data; the API service of the scanning platform receives the verification result of the plug-in task scanning form returned by the plug-in service platform; when the verification result is successful, the API service of the scanning platform stores the plug-in task scanning form on the task configuration service of the scanning platform and returns the storage result to the task configuration service of the scanning platform, and the task configuration service of the scanning platform returns the storage result to the front-end service of the scanning platform; when the verification result is a verification failure, the API service of the scanning platform returns the verification failure to the front-end service of the scanning platform.
[0036] Step 204: when a plug-in scanning task of a code or artifact is triggered, task configuration data is obtained from a plug-in task scanning form corresponding to the plug-in scanning task.
[0037] In an example implementation, the triggering of a plug-in scanning task for a code or artifact is triggered in the style of a plug-in name and a plug-in version. The user triggers the corresponding plug-in scanning service by selecting the plug-in name and the plug-in version in the plug-in scanning task triggering interface (also known as the scanning platform API); the scanning platform also stores a plug-in scanning task form, which carries task configuration data. The plug-in scanning task form is stored in the scanning platform using the plug-in name and the plug-in version as storage tags. Therefore, after the user triggers the corresponding plug-in scanning service by selecting the plug-in name and the plug-in version in the plug-in scanning task triggering interface, the task configuration service of the scanning platform can determine the corresponding plug-in scanning task form by the plug-in name and the plug-in version, thereby obtaining the task configuration data corresponding to the plug-in scanning task.
[0038] Step 205: Generate execution process data of the plug-in scanning task according to the task configuration data through the preset plug-in service platform.
[0039] In an example implementation, this step is substantially the same as step 102 of the embodiment of the present application and is not described in detail here.
[0040] Step 206: dispatch the execution process data to a preset scanning device, so that the scanning device can scan the code or product according to the execution process data.
[0041] In an example implementation, this step is substantially the same as step 103 of the embodiment of the present application and is not described in detail here.
[0042] In the implementation mode of the present application, based on other embodiments, relevant data of the plug-in scanning task can be pre-configured. When the plug-in scanning task needs to be executed, it only needs to trigger the corresponding plug-in scanning task to execute it, and there is no need to wait for the configuration process of the plug-in scanning task.
[0043] One embodiment of the present application relates to a method for scanning a code or product, which is applied on a scanning platform, such as Figure 4 As shown, including:
[0044] Step 301: when a plug-in scanning task of a code or product is triggered, task configuration data of the plug-in scanning task is obtained.
[0045] In an example implementation, this step is substantially the same as step 101 of the embodiment of the present application and is not described in detail here.
[0046] Step 302: Generate execution process data of the plug-in scanning task according to the task configuration data through the preset plug-in service platform.
[0047] In an example implementation, this step is substantially the same as step 102 of the embodiment of the present application and is not described in detail here.
[0048] Step 303: dispatch the execution process data to a preset scanning device, so that the scanning device can scan the code or product according to the execution process data.
[0049] In an example implementation, this step is substantially the same as step 103 of the embodiment of the present application and is not described in detail here.
[0050] Step 304: Receive and save the stage status information, scanning report and scanning log reported by the scanning device.
[0051] In an example implementation, since the plug-in scanning task is executed in stages, after each stage of the plug-in scanning task is completed, the scanning device can report the stage status information of each stage to the plug-in service platform, and the plug-in service platform will report it to the scanning platform. Various hook events can also be defined in the plug-in service platform, and the triggering conditions of the hook events are the stage status information of each stage, that is, when the plug-in service platform receives the stage status information, a pre-defined hook event can be triggered. After all stages of the plug-in scanning task are completed, the scanning device will report the scanning log generated during the execution of the plug-in scanning task to the plug-in service platform, and the plug-in service platform will report it to the scanning platform. After all stages of the plug-in scanning task are completed and the code or product is successfully scanned, the scanning device will form a scanning report of the code or product and report it to the plug-in service platform, and the plug-in service platform will report it to the scanning platform.
[0052] In an example implementation, the storage of the stage status information, the scan report, and the scan log is stored with the execution record of the plug-in scan task as a tag.
[0053] The implementation mode of the present application can also save the stage status information, scanning report and scanning log of the plug-in scanning task based on other embodiments, so that the user can analyze the code or product according to the stage status information, scanning report and scanning log.
[0054] The step division of the above methods is only for the purpose of clear description. When implemented, they can be combined into one step or some steps can be split and decomposed into multiple steps. As long as they include the same logical relationship, they are all within the scope of protection of this patent; adding insignificant modifications to the algorithm or process or introducing insignificant designs without changing the core design of the algorithm and process are all within the scope of protection of this patent.
[0055] Another embodiment of the present application relates to a scanning device for a code or product, which is applied on a scanning platform. The following is a specific description of the details of the scanning device for a code or product of this embodiment. The following content is only for the convenience of understanding the implementation details provided, and is not necessary for implementing this embodiment. Figure 5 4 is a schematic diagram of a device for scanning codes or products according to the present embodiment, which includes: an acquisition module 401 , a generation module 402 and a scanning module 403 .
[0056] The acquisition module 401 is used to acquire the task configuration data of the plug-in scanning task when the plug-in scanning task of the code or product is triggered;
[0057] A generating module 402 is used to generate execution process data of the plug-in scanning task according to the task configuration data through a preset plug-in service platform;
[0058] The scanning module 403 is used to dispatch the execution process data to a preset scanning device, so that the scanning device can scan the code or product according to the execution process data.
[0059] In an example implementation, the scanning module 403 is further configured to add the execution process data to the scanning task execution queue, and schedule the execution process data according to the priority of the execution process data in the scanning task execution queue and the number of scanning devices.
[0060] In an example implementation, the scanning platform further includes a recording module, which is used to generate and save execution records of plug-in scanning tasks.
[0061] It is not difficult to find that this embodiment is a system embodiment corresponding to the above method embodiment, and this embodiment can be implemented in conjunction with the above method embodiment. The relevant technical details and technical effects mentioned in the above embodiment are still valid in this embodiment, and in order to reduce repetition, they are not repeated here. Accordingly, the relevant technical details mentioned in this embodiment can also be applied in the above embodiment.
[0062] It should be noted that the system embodiment mainly describes the scanning method of the code or product provided in the method embodiment at the software implementation level, and its implementation also needs to rely on hardware support. For example, the functions of the relevant modules can be deployed on the processor so that the processor can run to implement the corresponding functions. In particular, the relevant data generated by the operation can be stored in the memory for subsequent inspection and use.
[0063] It is worth mentioning that all modules involved in this embodiment are logic modules. In practical applications, a logic unit can be a physical unit, a part of a physical unit, or a combination of multiple physical units. In addition, in order to highlight the innovative part of this application, this embodiment does not introduce units that are not closely related to solving the technical problems proposed by this application, but this does not mean that there are no other units in this embodiment.
[0064] Another embodiment of the present application relates to an electronic device, such as Figure 6 As shown, it includes: at least one processor 501; and a memory 502 that is communicatively connected to the at least one processor 501; wherein the memory 502 stores instructions that can be executed by the at least one processor 501, and the instructions are executed by the at least one processor 501 so that the at least one processor 501 can execute the scanning method of the code or product in the above-mentioned embodiments.
[0065] Among them, the memory and the processor are connected in a bus manner, and the bus may include any number of interconnected buses and bridges, and the bus connects various circuits of one or more processors and memories together. The bus can also connect various other circuits such as peripherals, voltage regulators, and power management circuits, which are well known in the art and are therefore not further described herein. The bus interface provides an interface between the bus and the transceiver. The transceiver can be one element or multiple elements, such as multiple receivers and transmitters, providing a unit for communicating with various other devices on a transmission medium. The data processed by the processor is transmitted on a wireless medium via an antenna, and further, the antenna also receives data and transmits the data to the processor.
[0066] The processor is responsible for managing the bus and general processing, and can also provide various functions, including timing, peripheral interfaces, voltage regulation, power management, and other control functions. Memory can be used to store data used by the processor when performing operations.
[0067] Another embodiment of the present application relates to a computer-readable storage medium storing a computer program, which implements the above method embodiment when executed by a processor.
[0068] That is, those skilled in the art can understand that all or part of the steps in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a program, and the program is stored in a storage medium, including a number of instructions to enable a device (which can be a single-chip microcomputer, chip, etc.) or a processor to execute all or part of the steps of each embodiment method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store program codes.
[0069] Those skilled in the art will appreciate that the above-mentioned embodiments are specific examples for implementing the present application, and in actual applications, various changes may be made thereto in form and detail without departing from the spirit and scope of the present application.
Claims
1. A method for scanning a code or a product, characterized in that: Applied on a scanning platform, the method comprises: When a plug-in scanning task of a code or product is triggered, obtaining task configuration data of the plug-in scanning task; Generate execution process data of the plug-in scanning task according to the task configuration data through a preset plug-in service platform; Dispatching the execution process data to a preset scanning device, so that the scanning device scans the code or the product according to the execution process data; The execution process data carries environment check data and dependency check data, and the environment check data is used for the scanning device to check whether it contains the script required to execute the execution process data; When the scanning device does not contain the script, the dependency check data is used for the scanning device to check whether it contains dependencies for obtaining the script; When the scanning device includes dependencies for obtaining scripts, the corresponding scripts are obtained according to the script acquisition method indicated by the dependencies, so that the scanning device can scan the code or product after obtaining the scripts corresponding to each execution stage according to the process data of each execution stage carried in the execution process data.
2. The method for scanning a code or product according to claim 1, characterized in that: When the plug-in scanning task of the code or product is triggered, the task configuration data of the plug-in scanning task is obtained, which includes: Select a plug-in name and plug-in version through the plug-in list and version list provided by the plug-in service platform, and form a plug-in scanning form; The plug-in service platform configures the form rendering data of the plug-in scanning form through the user configuration data obtained, and dynamically renders the plug-in scanning form according to the form rendering data to form a plug-in task scanning form; The plug-in task scanning form is stored on the scanning platform.
3. The method for scanning a code or product according to claim 2, characterized in that: The step of storing the plug-in task scanning form on the scanning platform includes: Sending the plug-in task scanning form to the plug-in service platform so that the plug-in service platform can perform data verification on the plug-in task scanning form according to the user configuration data; Receiving the verification result of the plug-in task scanning form returned by the plug-in service platform; When the verification result is successful, the plug-in task scanning form is stored on the scanning platform.
4. The method for scanning a code or product according to any one of claims 1 to 3, characterized in that: The method of generating the execution process data of the plug-in scanning task according to the task configuration data through the preset plug-in service platform also includes: generating and saving the execution record of the plug-in scanning task.
5. The method for scanning a code or product according to any one of claims 1 to 3, characterized in that: The step of dispatching the execution process data to a preset scanning device includes: Adding the execution process data to the scanning task execution queue; The execution process data is scheduled according to the priority of the execution process data in the scanning task execution queue and the number of the scanning devices.
6. The method for scanning a code or product according to any one of claims 1 to 3, characterized in that: The execution process data is dispatched to a preset scanning device so that the scanning device can scan the code or the product according to the execution process data, and then includes: receiving and saving the stage status information, scanning report and scanning log reported by the scanning device.
7. A device for scanning a code or a product, characterized in that: Applied on a scanning platform, the device comprises: an acquisition module, a generation module and a scanning module; The acquisition module is used to acquire the task configuration data of the plug-in scanning task when the plug-in scanning task of the code or product is triggered; The generating module is used to generate the execution process data of the plug-in scanning task according to the task configuration data through a preset plug-in service platform; The scanning module is used to dispatch the execution process data to a preset scanning device, so that the scanning device can scan the code or the product according to the execution process data; The execution process data carries environment check data and dependency check data, and the device is further used for: The environment check data is used for the scanning device to check whether it contains the script required to execute the execution process data; When the scanning device does not contain the script, the dependency check data is used for the scanning device to check whether it contains dependencies for obtaining the script; When the scanning device includes a dependency for obtaining a script, the corresponding script is obtained according to the script obtaining method indicated by the dependency, so that the scanning device can scan the code or product after obtaining the script corresponding to each execution stage according to the process data of each execution stage carried in the execution process data; Outputs a warning message when the scanned device does not contain the dependencies of the acquisition script.
8. An electronic device, characterized in that: include: at least one processor; as well as, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to perform the code or product scanning method according to any one of claims 1 to 6.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for scanning a code or product according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Applet scanning method and device, computer equipment and storage medium
CN111400722A
Safety scanning system and method based on atomization function
CN111737697A