Application security portrait generation method and device, equipment, medium and program product
By obtaining and analyzing the scene identifier and version identifier of the target application, the application security portrait is generated, which solves the problem of insufficient analysis in the existing technology, improves the accuracy and comprehensiveness of the security portrait, and enhances the ability to predict security issues.
Patent Information
- Application Number
- CN202410784671.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-18
- Publication Date
- 2024-08-27
AI Technical Summary
When the existing technology determines the test content in the early stages of project development, the analysis is not accurate enough, and items that need to be tested may be missed, resulting in low accuracy of the generated safety portrait.
By obtaining multiple scenario identifiers and current version identifiers of the target application, historical security test cases and test result data are determined, historical security change curves and scenario historical security change curves are collected based on the preset time range, security problem information is predicted, and application security portraits are generated. .
It improves the accuracy and comprehensiveness of security portraits, can consider historical and scene changes in more detail, enhances the ability to predict test results of the current version, and reduces the risk of security issues.
Smart Images

Figure CN118550833A
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of information security technology or financial technology, and more specifically to a method, device, equipment, medium and program product for generating an application security profile. Background Art
[0002] In the related technology, the data that needs to be tested in the functions that are changed in the version update process of the application are generally analyzed during the demand analysis stage of development, and the corresponding test demand identifiers are manually added, and the corresponding security profile is generated by testing the project. However, since this method determines the test content at an early stage of the project development cycle, there may be problems such as inaccurate analysis and omission of certain items that need to be tested, and the analysis granularity is coarse, which leads to low accuracy of the generated security profile. Summary of the invention
[0003] In view of the above problems, the present disclosure provides a method, apparatus, device, medium and program product for generating an application security profile.
[0004] According to the first aspect of the present disclosure, a method for generating an application security portrait is provided, comprising: obtaining multiple scenario identifiers of a target application and a current version identifier of the target application; determining, based on the multiple scenario identifiers and the current version identifier, historical security test cases corresponding to the scenario identifiers and test result data corresponding to the historical security test cases; based on a first preset time range, performing statistics on the historical security test cases and the test result data to obtain a historical security change curve of the application within the first preset time range; for each scenario identifier, performing statistics on the historical security test cases and the test result data of the target application based on a second preset time range and the scenario identifier to obtain a historical security change curve of the scenario that has a corresponding relationship with the scenario identifier within the second preset time range; predicting the test result corresponding to the current version identifier of the target application based on the multiple scenario identifiers, the historical security test cases, the test result data and the current version identifier to obtain security issue prediction information; generating an application security portrait corresponding to the target application based on the historical security change curve, the scenario historical security change curve and the security issue prediction information.
[0005] According to an embodiment of the present disclosure, the test result corresponding to the current version identifier of the target application is predicted based on the above-mentioned multiple scenario identifiers, the above-mentioned historical security test cases, the above-mentioned test result data and the current version identifier, and the security issue prediction information obtained includes: determining the scenario identifier corresponding to the security test scenario from the above-mentioned multiple scenario identifiers based on the above-mentioned current version identifier; determining the historical security test case having a mapping relationship with the scenario identifier corresponding to the security test scenario from the above-mentioned historical security test cases based on the above-mentioned scenario identifier corresponding to the security test scenario; generating the above-mentioned security issue prediction information based on the above-mentioned historical security test cases and the test result data corresponding to the above-mentioned historical security test cases.
[0006] According to an embodiment of the present disclosure, the above-mentioned generation of the above-mentioned security problem prediction information based on the above-mentioned scenario historical security test cases and the above-mentioned scenario historical security test cases includes: sorting the above-mentioned scenario historical security test cases based on the above-mentioned test result data to obtain ordered test result data; taking a preset number of ordered test result data, and determining the scenario historical security test cases that have a corresponding relationship with the above-mentioned ordered test result data as predicted security test cases; generating the above-mentioned security problem prediction information based on the above-mentioned predicted security test cases.
[0007] According to an embodiment of the present disclosure, the above method also includes: in response to a received new version request, obtaining function description information and version identifier in the above new version request; performing word segmentation processing on the above function description information to obtain multiple descriptive words with dependency relationships; and determining a scene identifier that has a mapping relationship with the version identifier based on the above multiple description words.
[0008] According to an embodiment of the present disclosure, the method further includes: obtaining a flowchart to be processed of the target application; performing image detection on the flowchart to be processed to obtain a candidate recognition image; and performing image recognition based on the candidate recognition image to obtain a scene identification.
[0009] According to an embodiment of the present disclosure, the above method also includes: determining the test content based on the above scenario identification, the above test content represents the content corresponding to the changed functional program during the version update process; determining a security test case set based on the above test content; in response to the received phase change instruction, obtaining the phase identification in the above phase change instruction, the above phase identification represents the development progress information corresponding to the above changed functional program; when it is determined that the above phase identification matches the preset phase identification, testing the above target project based on the above security test case set to obtain the test result.
[0010] The second aspect of the present disclosure provides a device for generating an application security portrait, including: an acquisition module, used to acquire multiple scenario identifiers of a target application and a current version identifier of the target application; a determination module, used to determine, based on the multiple scenario identifiers and the current version identifier, a historical security test case corresponding to the scenario identifier and test result data corresponding to the historical security test case; an application historical security change curve determination module, used to perform statistics on the historical security test case and the test result data based on a first preset time range to obtain an application historical security change curve within the first preset time range; a scenario historical security change curve determination module, used to determine, for each scenario, a historical security change curve of the application within the first preset time range. Identification, based on a second preset time range and the above-mentioned scenario identification, statistics are performed on the historical security test cases of the above-mentioned target application and the above-mentioned test result data to obtain a scenario historical security change curve that corresponds to the above-mentioned scenario identification within the second preset time range; a security issue prediction module is used to predict the test results corresponding to the current version identification of the target application based on the above-mentioned multiple scenario identifications, the above-mentioned historical security test cases, the above-mentioned test result data and the current version identification to obtain security issue prediction information; a portrait module is used to generate an application security portrait corresponding to the above-mentioned target application based on the above-mentioned historical security change curve, the above-mentioned scenario historical security change curve and the above-mentioned security issue prediction information.
[0011] According to an embodiment of the present disclosure, the above-mentioned security issue prediction module includes: a scenario identification determination submodule, which is used to determine the scenario identification corresponding to the security test scenario from the above-mentioned multiple scenario identifications based on the above-mentioned current version identification; a historical security test case determination submodule, which is used to determine the historical security test case having a mapping relationship with the above-mentioned scenario identification corresponding to the security test scenario from the above-mentioned historical security test cases based on the above-mentioned scenario identification corresponding to the security test scenario; and a security issue prediction information generation submodule, which is used to generate the above-mentioned security issue prediction information based on the above-mentioned historical security test cases and the test result data corresponding to the above-mentioned historical security test cases.
[0012] According to an embodiment of the present disclosure, the above-mentioned security issue prediction information generation submodule includes: a sorting unit, which is used to sort the above-mentioned scenario historical security test cases based on the above-mentioned test result data to obtain ordered test result data; a predicted security test case prediction unit, which is used to take a preset number of ordered test result data and determine the scenario historical security test cases that have a corresponding relationship with the above-mentioned ordered test result data as predicted security test cases; a prediction information generation unit, which is used to generate the above-mentioned security issue prediction information based on the above-mentioned predicted security test cases.
[0013] According to an embodiment of the present disclosure, the above-mentioned device also includes: a function description information acquisition module, which is used to respond to the received new version request and obtain the function description information and version identifier in the above-mentioned new version request; a word segmentation module, which is used to perform word segmentation processing on the above-mentioned function description information to obtain multiple descriptive words with dependency relationships; a scene identifier determination module, which is used to determine the scene identifier having a mapping relationship with the version identifier based on the above-mentioned multiple description words.
[0014] According to an embodiment of the present disclosure, the above-mentioned device also includes: a flowchart acquisition module, used to obtain the flowchart to be processed of the above-mentioned target application; an image detection module, used to perform image detection on the above-mentioned flowchart to be processed to obtain a candidate recognition image; and a scene identification recognition module, used to perform image recognition based on the above-mentioned candidate recognition image to obtain a scene identification.
[0015] According to an embodiment of the present disclosure, the above-mentioned device also includes a test content determination module, which is used to determine the test content based on the above-mentioned scenario identifier, and the above-mentioned test content represents the content corresponding to the changed functional program during the version update process; a security test case set determination module, which is used to determine the security test case set based on the above-mentioned test content; a stage acquisition module, which is used to respond to the received stage change instruction and obtain the stage identifier in the above-mentioned stage change instruction, and the above-mentioned stage identifier represents the development progress information corresponding to the above-mentioned changed functional program; a testing module, which is used to test the above-mentioned target project based on the above-mentioned security test case set to obtain a test result when it is determined that the above-mentioned stage identifier matches the preset stage identifier.
[0016] A third aspect of the present disclosure provides an electronic device, comprising: one or more processors; and a memory for storing one or more computer programs, wherein the one or more processors execute the one or more computer programs to implement the steps of the above method.
[0017] The fourth aspect of the present disclosure further provides a computer-readable storage medium having a computer program or instructions stored thereon, which implements the steps of the above method when the above computer program or instructions are executed by a processor.
[0018] The fifth aspect of the present disclosure further provides a computer program product, including a computer program or instructions, which implement the steps of the above method when the above computer program or instructions are executed by a processor.
[0019] According to the disclosed embodiment, historical security test cases and test result data are determined through multiple scenario identifiers and current version identifiers of the target application, and the application historical security change curve and the scenario historical security change curve are obtained based on these data. Then, the test results corresponding to the current version are predicted based on the scenario identifier, historical security test cases, test result data and current version identifier to obtain security issue prediction information. Finally, an application security portrait corresponding to the target application is generated based on the historical security change curve, the scenario historical security change curve and the security issue prediction information. The test results can be fully predicted based on the historical security test cases and test result data related to the current version to obtain security issue prediction information, and the scenario historical security change curve is obtained based on scenario statistics. The granularity is finer and the generated application security portrait is more accurate. Furthermore, the application security portrait is generated by comprehensively considering the historical security change curve, the scenario historical security change curve and the security issue prediction information, which can improve the comprehensiveness of the security portrait. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The above contents and other objects, features and advantages of the present disclosure will become more apparent through the following description of the embodiments of the present disclosure with reference to the accompanying drawings, in which:
[0021] Figure 1 The following schematically shows an application scenario diagram of a method for generating an application security profile according to an embodiment of the present disclosure;
[0022] Figure 2 A flowchart of a method for generating an application security profile according to an embodiment of the present disclosure is schematically shown;
[0023] Figure 3 Schematically shows an application history security change curve according to an embodiment of the present disclosure;
[0024] Figure 4 Schematically shows a flowchart to be processed according to an embodiment of the present disclosure;
[0025] Figure 5 A flowchart of performing a test according to a scene identification according to an embodiment of the present disclosure is schematically shown;
[0026] Figure 6 A structural block diagram schematically shows a device for generating an application security profile according to an embodiment of the present disclosure; and
[0027] Figure 7 A block diagram of an electronic device suitable for implementing a method for generating an application security portrait according to an embodiment of the present disclosure is schematically shown. DETAILED DESCRIPTION
[0028] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the present disclosure. In the following detailed description, for ease of explanation, many specific details are set forth to provide a comprehensive understanding of the embodiments of the present disclosure. However, it is apparent that one or more embodiments may also be implemented without these specific details. In addition, in the following description, descriptions of known structures and technologies are omitted to avoid unnecessary confusion of the concepts of the present disclosure.
[0029] The terms used herein are only for describing specific embodiments and are not intended to limit the present disclosure. The terms "comprise", "include", etc. used herein indicate the existence of the features, steps, operations and / or components, but do not exclude the existence or addition of one or more other features, steps, operations or components.
[0030] All terms (including technical and scientific terms) used herein have the meanings commonly understood by those skilled in the art unless otherwise defined. It should be noted that the terms used herein should be interpreted as having a meaning consistent with the context of this specification and should not be interpreted in an idealized or overly rigid manner.
[0031] When using expressions such as "at least one of A, B, and C, etc.", they should generally be interpreted according to the meaning of the expression commonly understood by those skilled in the art (for example, "a system having at least one of A, B, and C" should include but is not limited to a system having A alone, B alone, C alone, A and B, A and C, B and C, and / or A, B, C, etc.).
[0032] In the technical solution of the present disclosure, the user information (including but not limited to user personal information, user image information, user device information, such as location information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of the relevant data comply with relevant laws, regulations and standards, take necessary confidentiality measures, do not violate public order and good morals, and provide corresponding operation entrances for users to choose to authorize or refuse.
[0033] In the scenario of using personal information for automated decision-making, the methods, devices, and systems provided by the embodiments of the present disclosure provide users with corresponding operation portals for users to choose to agree or reject the automated decision-making results; if the user chooses to reject, the expert decision-making process will be entered. The expression "automated decision-making" here refers to the activity of automatically analyzing and evaluating a person's behavioral habits, interests and hobbies, or economic, health, credit status, etc. through computer programs, and making decisions. The expression "expert decision-making" here refers to the activity of making decisions by people who specialize in a certain field, have specialized experience, knowledge and skills, and have reached a certain level of professionalism.
[0034] In the related art, data analysis is usually performed on the functions of the application that have changed during the version update process during the development requirements analysis phase, and relevant personnel manually add corresponding test requirements identifiers so that the corresponding security profile can be generated through project testing. However, this method has some shortcomings: determining the test content in the early stages of project development may lead to inaccurate analysis and may miss some items that need to be tested. At the same time, the granularity of the analysis is relatively coarse, which may lead to low accuracy of the generated security profile.
[0035] In view of this, an embodiment of the present disclosure provides a method for generating an application security portrait, the method comprising: obtaining multiple scenario identifiers and a current version identifier of a target application; determining, based on the multiple scenario identifiers and the current version identifier, historical security test cases corresponding to the scenario identifier and test result data corresponding to the historical security test cases; based on a first preset time range, statistically analyzing the historical security test cases and the test result data to obtain a historical security change curve of the application within the first preset time range; for each scenario identifier, based on a second preset time range and the scenario identifier, statistically analyzing the historical security test cases and the test result data of the target application to obtain a historical security change curve of the scenario that has a corresponding relationship with the scenario identifier within the second preset time range; predicting the test results corresponding to the current version identifier of the target application based on the multiple scenario identifiers, the historical security test cases, the test result data and the current version identifier to obtain security issue prediction information; generating an application security portrait corresponding to the target application based on the historical security change curve, the scenario historical security change curve and the security issue prediction information.
[0036] Figure 1 An application scenario diagram of a method for generating an application security portrait according to an embodiment of the present disclosure is schematically shown.
[0037] like Figure 1As shown, the application scenario 100 according to this embodiment may include a first terminal device 101, a second terminal device 102, a third terminal device 103, a network 104, and a server 105. The network 104 is used to provide a medium for a communication link between the first terminal device 101, the second terminal device 102, the third terminal device 103, and the server 105. The network 104 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0038] The user can use the first terminal device 101, the second terminal device 102, and the third terminal device 103 to interact with the server 105 through the network 104 to receive or send messages, etc. Various communication client applications can be installed on the first terminal device 101, the second terminal device 102, and the third terminal device 103, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0039] The first terminal device 101, the second terminal device 102, and the third terminal device 103 may be various electronic devices having display screens and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, desktop computers, and the like.
[0040] The server 105 may be a server that provides various services, such as a background management server (only as an example) that provides support for websites browsed by users using the first terminal device 101, the second terminal device 102, the third terminal device 103. The background management server may analyze and process the received data such as user requests, and feed back the processing results (such as web pages, information, or data obtained or generated according to user requests) to the terminal device.
[0041] It should be noted that the method for generating the application security portrait provided in the embodiment of the present disclosure can generally be executed by the server 105. Accordingly, the device for generating the application security portrait provided in the embodiment of the present disclosure can generally be set in the server 105. The method for generating the application security portrait provided in the embodiment of the present disclosure can also be executed by a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105. Accordingly, the device for generating the application security portrait provided in the embodiment of the present disclosure can also be set in a server or server cluster that is different from the server 105 and can communicate with the first terminal device 101, the second terminal device 102, the third terminal device 103, and / or the server 105.
[0042] It should be understood that Figure 1The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0043] The following will be based on Figure 1 The scene described by Figure 2~Figure 5 The method for generating the application security profile of the disclosed embodiment is described in detail.
[0044] Figure 2 A flowchart of a method for generating an application security profile according to an embodiment of the present disclosure is schematically shown.
[0045] like Figure 2 As shown, the method for generating an application security portrait in this embodiment includes operations S210 to S260.
[0046] In operation S210 , a plurality of scenario identifiers of a target application and a current version identifier of the target application are acquired.
[0047] According to the embodiments of the present disclosure, the above-mentioned scene identifiers can be text scene identifiers such as registration, login, password retrieval, logout, customer information query, user information modification, etc., or they can be digital identifiers, and the present application does not impose any restrictions on this.
[0048] In operation S220, historical security test cases corresponding to the scenario identifiers and test result data corresponding to the historical security test cases are determined according to the multiple scenario identifiers and the current version identifier.
[0049] For example, for the version identification 1.10 of the current target application, the scenario identifications are registration, login and password retrieval, and historical security test cases with scenario identifications of registration, login and password retrieval and corresponding test result data can be found in historical security test cases.
[0050] In operation S230, based on a first preset time range, historical security test cases and test result data are statistically analyzed to obtain an application historical security change curve within the first preset time range.
[0051] According to an embodiment of the present disclosure, the first preset time range may be a total time range, an annual time range, a quarterly time range or a monthly time range.
[0052] Figure 3 The application history security change curve according to an embodiment of the present disclosure is schematically shown.
[0053] like Figure 3As shown, the horizontal axis represents the version, the vertical axis represents the number, the dotted line represents the historical test security cases, and the solid line represents the test result data corresponding to the historical security test cases. The statistics in the figure are based on the total number as the dimension, and the statistics can also be based on the annual, quarterly or monthly dimensions to generate the application historical security change curve.
[0054] In operation S240, for each scenario identifier, based on the second preset time range and the scenario identifier, historical security test cases and test result data of the target application are counted to obtain a scenario historical security change curve corresponding to the scenario identifier within the second preset time range.
[0055] According to an embodiment of the present disclosure, the above-mentioned second preset time range may be the same as the first preset time range, or may be different from the second preset time range. The present disclosure does not impose any restrictions on this. The second preset time range may be the entire time range, the annual time range, the quarterly time range or the monthly time range.
[0056] In operation S250, the test result corresponding to the current version identifier of the target application is predicted based on multiple scenario identifiers, historical security test cases, test result data, and the current version identifier to obtain security problem prediction information.
[0057] According to the embodiment of the present disclosure, the corresponding scenario identifier can be found based on the current version identifier, and then the corresponding historical security test cases and test result data can be found from the historical security test cases based on the scenario identifier, and security problem prediction information can be obtained based on the aforementioned historical security test cases and test result data.
[0058] In operation S260, an application security portrait corresponding to the target application is generated based on the historical security change curve, the scenario historical security change curve, and the security problem prediction information.
[0059] According to the embodiments of the present disclosure, the above security issue prediction information can be tested to obtain the test results, and then combined with the historical security change curve and the scenario historical security change curve to generate an application security portrait corresponding to the target application.
[0060] According to the disclosed embodiment, historical security test cases and test result data are determined through multiple scenario identifiers and current version identifiers of the target application, and the application historical security change curve and the scenario historical security change curve are obtained based on these data. Then, the test results corresponding to the current version are predicted based on the scenario identifier, historical security test cases, test result data and current version identifier to obtain security issue prediction information. Finally, an application security portrait corresponding to the target application is generated based on the historical security change curve, the scenario historical security change curve and the security issue prediction information. The test results can be fully predicted based on the historical security test cases and test result data related to the current version to obtain security issue prediction information, and the scenario historical security change curve is obtained based on scenario statistics. The granularity is finer and the generated application security portrait is more accurate. Furthermore, the application security portrait is generated by comprehensively considering the historical security change curve, the scenario historical security change curve and the security issue prediction information, which can improve the comprehensiveness of the security portrait.
[0061] According to an embodiment of the present disclosure, the test result corresponding to the current version identifier of the target application is predicted based on multiple scenario identifiers, historical security test cases, test result data and current version identifier to obtain security issue prediction information including: determining a scenario identifier corresponding to the security test scenario from multiple scenario identifiers based on the current version identifier; determining a historical security test case having a mapping relationship with the scenario identifier corresponding to the security test scenario from historical security test cases based on the scenario identifier corresponding to the security test scenario; and generating security issue prediction information based on the historical security test cases and the test result data corresponding to the historical security test cases.
[0062] For example, based on the current version identifier 1.10, it can be determined from the scenario identifiers registration, login, password retrieval, logout, customer information query, and user information modification that the scenario bound to the current version is the scenario identifier of registration, login, and password retrieval. Then, historical security test cases for registration, login, and password retrieval of the target application and the corresponding test result data are found from the historical security test cases, and predictions are made based on the historical test cases and the corresponding test result data to obtain security issue prediction information.
[0063] According to an embodiment of the present disclosure, the above-mentioned scenario-based historical security test cases and generation of security issue prediction information based on scenario historical security test cases include: sorting the scenario historical security test cases based on the test result data to obtain ordered test result data; taking a preset number of ordered test result data, and determining the scenario historical security test cases that have a corresponding relationship with the ordered test result data as predicted security test cases; and generating security issue prediction information based on the predicted security test cases.
[0064] According to the embodiments of the present disclosure, security issue prediction information can be generated based on scenario historical test cases of 12 versions that are closest to the current version. If the current version of the target application has not been tested, the corresponding test result data is searched from the above scenario historical test cases according to the scenario bound to the current version, and the test result data is sorted in descending order based on the number of error problems in the test result data. A preset number of scenario historical security test cases that have a corresponding relationship with the ordered test result data are determined as predicted security test cases, and relevant staff are given priority to test them.
[0065] According to the disclosed embodiment, by using the data and results of the scenario history test cases, the security issues that may exist in the current version can be quickly predicted, so as to conduct targeted testing and reduce the risk of security issues. At the same time, by sorting the test result data in descending order, the scenarios that may have more error problems can be tested first, so as to more effectively discover and solve potential security risks, improve the overall security of the application, and improve the efficiency of generating application security portraits.
[0066] According to an embodiment of the present disclosure, the above method also includes: in response to a received new version request, obtaining function description information and a version identifier in the new version request; performing word segmentation processing on the function description information to obtain multiple descriptive words with a dependency relationship; and determining a scene identifier that has a mapping relationship with the version identifier based on the multiple descriptive words.
[0067] According to the disclosed embodiment, applications can be managed in a unified manner. In the process of adding a new application version, it is necessary to upload the modification requirement description (i.e., functional description information) required by the version. The modification requirement description can be segmented by a natural language processing model to extract multiple descriptive words with dependency relationships in the modification requirement description, wherein the dependency relationship can be a subject-predicate relationship, a verb-object relationship, an attributive-adverbial relationship, etc. By analyzing the dependency relationship, it is possible to determine which words in the sentence are core words (central words) and how the dependency relationship between them constitutes the structure of the sentence. Then, the scene identifier with a mapping relationship with the version identifier can be determined based on the descriptive word.
[0068] For example, when adding a new target application version 1.11, the modification requirement description can be, for example, "When a user forgets his password, he can retrieve his password by providing the email address or mobile phone number used when registering." The descriptive words extracted by the natural language processing model can be "user, forgets, password, provides, email address, mobile phone number, retrieves, password". The scenario identifier corresponding to the application version 1.11 can be determined as password retrieval based on the descriptive words.
[0069] According to the embodiments of the present disclosure, by performing word segmentation and dependency analysis on the modification requirement description, the modification requirement description in the application version update process can be automatically processed and managed to determine the scenario identifier, which can improve work efficiency and reduce the time and cost of manual processing.
[0070] According to an embodiment of the present disclosure, the scene identification can also be determined according to the following method: obtaining a flowchart to be processed of the target application; performing image detection on the flowchart to be processed to obtain a candidate recognition image; performing image recognition based on the candidate recognition image to obtain a scene identification.
[0071] According to the embodiment of the present disclosure, the flowchart to be processed of the target application can be automatically scanned. The above-mentioned flowchart to be processed corresponds to the scene identifier. The flowchart to be processed includes a rectangular text box, and the scene identifier is identified in the box. The rectangular text box can be extracted from the flowchart to be processed as a candidate recognition image, and then image recognition is performed on the candidate recognition image to extract the scene identifier.
[0072] According to an embodiment of the present disclosure, the scene identification extracted from the flowchart to be processed can be compared with the stored scene identification. When the scene identification exists in the stored scene identification, it is determined as the target scene identification. If the scene identification does not exist in the stored scene identification, it can be sent to relevant personnel for further confirmation and supplementary scene identification. Furthermore, the scene identification can also be manually adjusted by relevant staff.
[0073] Figure 4 The figure schematically shows a flowchart to be processed according to an embodiment of the present disclosure.
[0074] like Figure 4 As shown, through image detection, the password retrieval and the corresponding rectangular box can be used as candidate recognition images, and then the scene in the candidate recognition image can be identified as "password retrieval".
[0075] Figure 5 A flowchart of performing a test based on a scenario identification according to an embodiment of the present disclosure is schematically shown.
[0076] like Figure 5 As shown, the process of testing according to the scene identification in this embodiment includes operations S510 to S540.
[0077] In operation S510 , test content is determined based on the scenario identification.
[0078] Among them, the test content represents the content corresponding to the changed functional program during the version update process.
[0079] According to the embodiments of the present disclosure, the test content for the current version of the target application can be determined during the development requirements analysis phase. The mapping relationship between the aforementioned test content and scenario identifier can be stored in a database. After the scenario identifier is obtained, the corresponding test content can be found in the database for testing.
[0080] According to the embodiments of the present disclosure, the above test content may include information such as security classification, security classification subdivision (security requirement label), test steps and test judgment results. The test content may be determined by labeling the target application with security requirement labels, or the test content may be supplemented in a subsequent stage before testing.
[0081] Exemplarily, for the login scenario identification, it can be determined that the test content includes unauthorized overreaching-horizontal unauthorized overreaching and unauthorized overreaching-vertical unauthorized overreaching, where unauthorized overreaching-horizontal unauthorized overreaching is the security requirement label mentioned above, and the security classification is unauthorized overreaching.
[0082] In operation S520 , a security test case set is determined based on the test content.
[0083] According to the disclosed embodiment, a security boundary (also referred to as a security classification) can be formulated according to the business scope under development, and then a set of security test cases can be determined according to the security boundary. Each security test case also includes a preset judgment result, that is, when preset data is input into the security test case, if the output is a preset judgment result, it can be determined that the security test case has passed the test. For each security test case, a preset error judgment result can also be included, that is, when preset data is input into the security test case, if the output is a preset error judgment result, it is considered that the security test case has failed the test. When the security test case fails the test, relevant personnel are required to analyze the cause of the error and classify it in detail into specific error types and the above-mentioned security classifications and security classification subdivisions of the error; when the security test case passes the test, the above-mentioned corresponding application, application current version information and test information are described in detail when constructing the reference relationship between the security test case and the test result.
[0084] According to the embodiments of the present disclosure, the above security boundaries can be specifically classified into unauthorized access, bypass, inscription, replay, SQL injection, XSS attack, etc.
[0085] According to the embodiments of the present disclosure, each security test case needs to be bound to a corresponding version of a corresponding application, and the application information and scenario information of the security test case needs to be regularly maintained.
[0086] In operation S530 , in response to the received phase change instruction, a phase identifier in the phase change instruction is acquired.
[0087] The stage identifier represents the development progress information corresponding to the changed functional program.
[0088] According to the embodiments of the present disclosure, the phase change can be performed when a single component is developed and undergoing unit testing, or when all components are developed and undergoing integration testing. The present application does not impose any restrictions on this.
[0089] In operation S540, when it is determined that the stage identifier matches the preset stage identifier, the target project is tested based on the security test case set to obtain a test result.
[0090] According to the embodiment of the present disclosure, a corresponding application security portrait can also be generated based on the above test results.
[0091] Optionally, the application development cycle can be managed in a unified manner, that is, the application version can be iterated on a monthly or quarterly basis. 12 monthly versions and 4 quarterly versions can be established in a year. Version binding can be performed during the development project management process. Different versions have different development cycle start and end times. The bound projects can be scheduled according to the development cycle preset in the version.
[0092] According to the embodiments of the present disclosure, by using the process design diagram in the application development process as the process diagram to be processed to identify the scenario identification, the process design diagram can be reused to improve the efficiency of generating the security profile of the target application. Furthermore, the test content is determined by the scenario identification, which is more objective and comprehensive than manually determining the test content, and the security test case set is also more targeted.
[0093] Based on the above-mentioned method for generating an application security profile, the present disclosure also provides a device for generating an application security profile. Figure 6 The device is described in detail.
[0094] Figure 6 The structural block diagram of the device for generating an application security profile according to an embodiment of the present disclosure is schematically shown.
[0095] like Figure 6 As shown, the application security portrait generation device 600 of this embodiment includes an acquisition module 610, a determination module 620, an application historical security change curve determination module 630, a scenario historical security change curve determination module 640, a security issue prediction module 650 and a portrait module 660.
[0096] The acquisition module 610 is used to acquire multiple scene identifiers of the target application and the current version identifier of the target application. In one embodiment, the acquisition module 610 can be used to perform the operation S210 described above, which will not be described in detail here.
[0097] The determination module 620 is used to determine the historical security test cases corresponding to the scenario identifiers and the test result data corresponding to the historical security test cases according to the multiple scenario identifiers and the current version identifiers. In one embodiment, the determination module 620 can be used to perform the operation S220 described above, which will not be repeated here.
[0098] The application history security change curve determination module 630 is used to obtain the application history security change curve within the first preset time range by performing statistics on the historical security test cases and test result data based on the first preset time range. In one embodiment, the application history security change curve determination module 630 can be used to perform the operation S230 described above, which will not be repeated here.
[0099] The scenario historical security change curve determination module 640 is used to, for each scenario identifier, based on the second preset time range and the scenario identifier, perform statistics on the historical security test cases and test result data of the target application to obtain a scenario historical security change curve that has a corresponding relationship with the scenario identifier within the second preset time range. In one embodiment, the scenario historical security change curve determination module 640 can be used to perform the operation S240 described above, which will not be repeated here.
[0100] The security problem prediction module 650 is used to predict the test result corresponding to the current version identifier of the target application based on multiple scenario identifiers, historical security test cases, test result data and the current version identifier to obtain security problem prediction information. In one embodiment, the security problem prediction module 650 can be used to perform the operation S250 described above, which will not be repeated here.
[0101] The portrait module 660 is used to generate an application security portrait corresponding to the target application based on the historical security change curve, the scenario historical security change curve and the security problem prediction information. In one embodiment, the portrait module 660 can be used to perform the operation S260 described above, which will not be repeated here.
[0102] According to an embodiment of the present disclosure, the above-mentioned security issue prediction module includes: a scenario identification determination submodule, which is used to determine the scenario identification corresponding to the security test scenario from the above-mentioned multiple scenario identifications based on the above-mentioned current version identification; a historical security test case determination submodule, which is used to determine the historical security test case having a mapping relationship with the above-mentioned scenario identification corresponding to the security test scenario from the above-mentioned historical security test cases based on the above-mentioned scenario identification corresponding to the security test scenario; and a security issue prediction information generation submodule, which is used to generate the above-mentioned security issue prediction information based on the above-mentioned historical security test cases and the test result data corresponding to the above-mentioned historical security test cases.
[0103] According to an embodiment of the present disclosure, the above-mentioned security issue prediction information generation submodule includes: a sorting unit, which is used to sort the above-mentioned scenario historical security test cases based on the above-mentioned test result data to obtain ordered test result data; a predicted security test case prediction unit, which is used to take a preset number of ordered test result data and determine the scenario historical security test cases that have a corresponding relationship with the above-mentioned ordered test result data as predicted security test cases; a prediction information generation unit, which is used to generate the above-mentioned security issue prediction information based on the above-mentioned predicted security test cases.
[0104] According to an embodiment of the present disclosure, the above-mentioned device also includes: a function description information acquisition module, which is used to respond to the received new version request and obtain the function description information and version identifier in the above-mentioned new version request; a word segmentation module, which is used to perform word segmentation processing on the above-mentioned function description information to obtain multiple descriptive words with dependency relationships; a scene identifier determination module, which is used to determine the scene identifier having a mapping relationship with the version identifier based on the above-mentioned multiple description words.
[0105] According to an embodiment of the present disclosure, the above-mentioned device also includes: a flowchart acquisition module, used to obtain the flowchart to be processed of the above-mentioned target application; an image detection module, used to perform image detection on the above-mentioned flowchart to be processed to obtain a candidate recognition image; and a scene identification recognition module, used to perform image recognition based on the above-mentioned candidate recognition image to obtain a scene identification.
[0106] According to an embodiment of the present disclosure, the above-mentioned device also includes a test content determination module, which is used to determine the test content based on the above-mentioned scenario identifier, and the above-mentioned test content represents the content corresponding to the changed functional program during the version update process; a security test case set determination module, which is used to determine the security test case set based on the above-mentioned test content; a stage acquisition module, which is used to respond to the received stage change instruction and obtain the stage identifier in the above-mentioned stage change instruction, and the above-mentioned stage identifier represents the development progress information corresponding to the above-mentioned changed functional program; a testing module, which is used to test the above-mentioned target project based on the above-mentioned security test case set to obtain a test result when it is determined that the above-mentioned stage identifier matches the preset stage identifier.
[0107] According to an embodiment of the present disclosure, any multiple modules among the acquisition module 610, the determination module 620, the application history security change curve determination module 630, the scene history security change curve determination module 640, the security problem prediction module 650 and the portrait module 660 can be combined in one module for implementation, or any one of the modules can be split into multiple modules. Alternatively, at least part of the functions of one or more of these modules can be combined with at least part of the functions of other modules and implemented in one module. According to an embodiment of the present disclosure, at least one of the acquisition module 610, the determination module 620, the application history security change curve determination module 630, the scene history security change curve determination module 640, the security problem prediction module 650 and the portrait module 660 can be at least partially implemented as a hardware circuit, such as a field programmable gate array (FPGA), a programmable logic array (PLA), a system on a chip, a system on a substrate, a system on a package, an application specific integrated circuit (ASIC), or can be implemented by hardware or firmware such as any other reasonable way of integrating or packaging the circuit, or implemented in any one of the three implementation methods of software, hardware and firmware or in an appropriate combination of any of them. Alternatively, at least one of the acquisition module 610, the determination module 620, the application history security change curve determination module 630, the scene history security change curve determination module 640, the security issue prediction module 650 and the portrait module 660 can be at least partially implemented as a computer program module, which can perform corresponding functions when the computer program module is executed.
[0108] Figure 7 A block diagram of an electronic device suitable for implementing a method for generating an application security portrait according to an embodiment of the present disclosure is schematically shown.
[0109] like Figure 7 As shown, the electronic device 700 according to an embodiment of the present disclosure includes a processor 701, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 702 or a program loaded from a storage part 708 to a random access memory (RAM) 703. The processor 701 may include, for example, a general-purpose microprocessor (such as a CPU), an instruction set processor and / or a related chipset and / or a special-purpose microprocessor (for example, an application-specific integrated circuit (ASIC)), etc. The processor 701 may also include an onboard memory for caching purposes. The processor 701 may include a single processing unit or multiple processing units for performing different actions of the method flow according to an embodiment of the present disclosure.
[0110] In RAM 703, various programs and data required for the operation of electronic device 700 are stored. Processor 701, ROM 702 and RAM 703 are connected to each other via bus 704. Processor 701 performs various operations of the method flow according to the embodiment of the present disclosure by executing the program in ROM 702 and / or RAM 703. It should be noted that the program can also be stored in one or more memories other than ROM 702 and RAM 703. Processor 701 can also perform various operations of the method flow according to the embodiment of the present disclosure by executing the program stored in the one or more memories.
[0111] According to an embodiment of the present disclosure, the electronic device 700 may further include an input / output (I / O) interface 705, which is also connected to the bus 704. The electronic device 700 may further include one or more of the following components connected to the I / O interface 705: an input portion 706 including a keyboard, a mouse, etc.; an output portion 707 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage portion 708 including a hard disk, etc.; and a communication portion 709 including a network interface card such as a LAN card, a modem, etc. The communication portion 709 performs communication processing via a network such as the Internet. A drive 710 is also connected to the I / O interface 705 as needed. A removable medium 711, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 710 as needed, so that a computer program read therefrom is installed into the storage portion 708 as needed.
[0112] The present disclosure also provides a computer-readable storage medium, which may be included in the device / apparatus / system described in the above embodiments; or may exist independently without being assembled into the device / apparatus / system. The above computer-readable storage medium carries one or more programs, and when the above one or more programs are executed, the method according to the embodiment of the present disclosure is implemented.
[0113] According to an embodiment of the present disclosure, the computer-readable storage medium may be a non-volatile computer-readable storage medium, for example, it may include but is not limited to: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program, which may be used by or in combination with an instruction execution system, an apparatus or a device. For example, according to an embodiment of the present disclosure, the computer-readable storage medium may include the ROM 702 and / or RAM 703 described above and / or one or more memories other than ROM 702 and RAM 703.
[0114] The embodiment of the present disclosure also includes a computer program product, which includes a computer program, and the computer program includes a program code for executing the method shown in the flowchart. When the computer program product is run in a computer system, the program code is used to enable the computer system to implement the method for generating an application security profile provided by the embodiment of the present disclosure.
[0115] The above functions defined in the system / device of the embodiment of the present disclosure are performed when the computer program is executed by the processor 701. According to the embodiment of the present disclosure, the system, device, module, unit, etc. described above can be implemented by a computer program module.
[0116] In one embodiment, the computer program may rely on tangible storage media such as optical storage devices, magnetic storage devices, etc. In another embodiment, the computer program may also be transmitted and distributed in the form of signals on a network medium, and downloaded and installed through the communication part 709, and / or installed from the removable medium 711. The program code contained in the computer program may be transmitted using any appropriate network medium, including but not limited to: wireless, wired, etc., or any suitable combination of the above.
[0117] In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 709, and / or installed from the removable medium 711. When the computer program is executed by the processor 701, the above functions defined in the system of the embodiment of the present disclosure are performed. According to the embodiment of the present disclosure, the system, device, means, module, unit, etc. described above can be implemented by a computer program module.
[0118] According to an embodiment of the present disclosure, the program code for executing the computer program provided by the embodiment of the present disclosure can be written in any combination of one or more programming languages. Specifically, these computing programs can be implemented using high-level process and / or object-oriented programming languages, and / or assembly / machine languages. Programming languages include, but are not limited to, Java, C++, python, "C" language or similar programming languages. The program code can be executed entirely on the user computing device, partially on the user device, partially on the remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device can be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computing device (for example, using an Internet service provider to connect through the Internet).
[0119] The flow charts and block diagrams in the accompanying drawings illustrate the possible architecture, functions and operations of the systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0120] It will be appreciated by those skilled in the art that the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways, even if such combinations and / or combinations are not explicitly described in the present disclosure. In particular, the features described in the various embodiments and / or claims of the present disclosure may be combined and / or combined in a variety of ways without departing from the spirit and teachings of the present disclosure. All of these combinations and / or combinations fall within the scope of the present disclosure.
[0121] The embodiments of the present disclosure are described above. However, these embodiments are only for illustrative purposes and are not intended to limit the scope of the present disclosure. Although the embodiments are described above separately, this does not mean that the measures in the various embodiments cannot be used in combination to advantage. The scope of the present disclosure is defined by the attached claims and their equivalents. Without departing from the scope of the present disclosure, those skilled in the art may make a variety of substitutions and modifications, which should all fall within the scope of the present disclosure.
Claims
1. A method for generating an application security profile, characterized in that: The method comprises: Acquire multiple scenario identifiers of a target application and a current version identifier of the target application; Determining, according to the multiple scenario identifiers and the current version identifier, historical security test cases corresponding to the scenario identifiers and test result data corresponding to the historical security test cases; Based on a first preset time range, statistics are collected on the historical security test cases and the test result data to obtain an application historical security change curve within the first preset time range; For each scenario identifier, based on a second preset time range and the scenario identifier, statistics are collected on historical security test cases and test result data of the target application to obtain a scenario historical security change curve that has a corresponding relationship with the scenario identifier within the second preset time range; Predicting the test result corresponding to the current version identifier of the target application based on the multiple scenario identifiers, the historical security test cases, the test result data and the current version identifier to obtain security issue prediction information; An application security portrait corresponding to the target application is generated based on the historical security change curve, the scenario historical security change curve and the security issue prediction information.
2. The method according to claim 1, characterized in that The predicting of the test result corresponding to the current version identifier of the target application based on the multiple scenario identifiers, the historical security test cases, the test result data and the current version identifier to obtain the security problem prediction information includes: Determining a scenario identifier corresponding to a security test scenario from the multiple scenario identifiers based on the current version identifier; Determining, from the historical security test cases based on the scenario identifier corresponding to the security test scenario, a historical security test case having a mapping relationship with the scenario identifier corresponding to the security test scenario; The security issue prediction information is generated based on the historical security test cases and test result data corresponding to the historical security test cases.
3. The method according to claim 2, wherein generating the security problem prediction information based on the scenario historical security test case and the scenario historical security test case comprises: Sort the scenario historical safety test cases based on the test result data to obtain ordered test result data; Taking a preset number of ordered test result data, and determining scenario historical safety test cases having a corresponding relationship with the ordered test result data as predicted safety test cases; The security issue prediction information is generated based on the predicted security test case.
4. The method according to claim 1, characterized in that: The method further comprises: In response to the received new version request, obtaining the function description information and version identifier in the new version request; Performing word segmentation processing on the function description information to obtain a plurality of description words with dependency relationships; A scene identifier having a mapping relationship with the version identifier is determined based on the multiple description words.
5. The method according to claim 1, Its characteristic is that the method further comprises: Obtaining a flowchart to be processed of the target application; Performing image detection on the flowchart to be processed to obtain a candidate recognition image; Image recognition is performed based on the candidate recognition image to obtain a scene identification.
6. The method according to claim 4 or 5, characterized in that: The method further comprises: Determine the test content based on the scenario identifier, the test content represents the content corresponding to the changed functional program during the version update process; Determine a set of safety test cases based on the test content; In response to the received phase change instruction, obtaining a phase identifier in the phase change instruction, wherein the phase identifier represents development progress information corresponding to the changed functional program; When it is determined that the stage identifier matches the preset stage identifier, the target project is tested based on the security test case set to obtain a test result.
7. A device for generating an application security profile, characterized in that: The device comprises: An acquisition module, used to acquire multiple scenario identifiers of a target application and a current version identifier of the target application; A determination module, configured to determine, according to the multiple scenario identifiers and the current version identifier, a historical security test case corresponding to the scenario identifier and test result data corresponding to the historical security test case; An application historical security change curve determination module is used to obtain an application historical security change curve within a first preset time range by performing statistics on the historical security test cases and the test result data based on a first preset time range; A scenario historical security change curve determination module is used to, for each scenario identifier, perform statistics on the historical security test cases of the target application and the test result data based on a second preset time range and the scenario identifier, to obtain a scenario historical security change curve that has a corresponding relationship with the scenario identifier within the second preset time range; A security problem prediction module, configured to predict the test result corresponding to the current version identifier of the target application based on the multiple scenario identifiers, the historical security test cases, the test result data and the current version identifier, to obtain security problem prediction information; A portrait module is used to generate an application security portrait corresponding to the target application based on the historical security change curve, the scenario historical security change curve and the security issue prediction information.
8. An electronic device comprising: one or more processors; a memory for storing one or more computer programs, It is characterized in that the one or more processors execute the one or more computer programs to implement the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program or instruction stored thereon, characterized in that: When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
