Agile threat modeling method and system based on ChatGLM and threat tree

By adopting agile threat modeling method based on ChatGLM and threat tree in agile development, the clunky and cumbersome problems of traditional threat modeling in agile development are solved, and the security and efficiency of threat modeling are achieved is achieved.

CN119918057APending Publication Date: 2025-05-02FUJIAN NEWLAND SOFTWARE ENGINEERING CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411805083.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2025-05-02

AI Technical Summary

Technical Problem

Traditional threat modeling methods are too bulky and cumbersome in agile development, and cannot take into account security assurance and rapid delivery, and are difficult to apply to the needs of safe left-moving.

Method used

Agile threat modeling method based on ChatGLM and threat tree is adopted, and the user story is abstracted into metasceived through the metasceived recognition model, and threat tree building module is used for threat analysis to form a threat list, and automated agile threat modeling is realized.

Benefits of technology

It improves the security and efficiency of threat modeling, achieves the balance between security and rapid delivery, reduces personnel and time costs, and provides reliable guarantees for implementing safety left-handed movement in the demand stage.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119918057A_ABST
    Figure CN119918057A_ABST
Patent Text Reader

Abstract

The invention provides an agile threat modeling method and system based on ChatGLM and a threat tree in the technical field of information security. The method comprises the following steps: S1, abstracting a concrete service into a meta-scene; s2, performing threat analysis on the element scene to generate a threat tree; s3, using a historical user story as a fine tuning data set to form a fine tuning model used for identifying the element scene; s4, identifying a user story through a fine tuning model to obtain a meta scene; s5, associating the threat tree with the meta-scene to obtain a threat list, and completing agile threat modeling; s6, in the modeling process, risk focusing is carried out through a risk elimination list, safety and efficiency are considered through a public safety API, and threat modeling is assisted through configuration of a project sensitivity-related library table and a sensitivity-related field; and S7, associating an acceptance check result registered by a tester based on the threat list, and forming a report form from two dimensions of current situation and convergence speed. The method has the advantages that the safety and efficiency of threat modeling are greatly improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of information security technology, and in particular to an agile threat modeling method and system based on ChatGLM and threat tree. Background Art

[0002] Based on the three synchronization principles of information security (synchronous planning, synchronous construction, and synchronous use), security must be placed in the front of the application development life cycle, that is, security is shifted left, and security elements are integrated into the demand design stage to get rid of the plug-in security model, so that security becomes an inherent attribute embedded in the entire life cycle of the application. Agile development pursues rapid delivery, while traditional threat modeling (risk identification) is based on entity and data flow diagrams and uses the STRIDE method to perform threat modeling. It is too cumbersome and has certain professional barriers. It cannot achieve a balance between security assurance and rapid delivery, and is not suitable for the current agile development system.

[0003] Therefore, in the practice of implementing security left shift, how to provide an agile threat modeling method and system based on ChatGLM and threat tree in the demand stage based on the current agile development model to resolve the conflict between security requirements and rapid delivery has become a technical problem that needs to be solved urgently. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide an agile threat modeling method and system based on ChatGLM and threat tree to improve the security and efficiency of threat modeling.

[0005] In a first aspect, the present invention provides an agile threat modeling method based on ChatGLM and threat tree, comprising the following steps:

[0006] Step S1: Based on the basic model and data life cycle of the application, and in combination with the business scenarios that cause logical vulnerabilities, the concrete business is abstractly decomposed into several meta-scenarios to form a meta-scenario library;

[0007] Step S2: Based on the main line of user access to assets, use five core elements to perform threat analysis on each meta-scenario, form a threat list for each meta-scenario, and aggregate to form a threat tree with the meta-scenario as the parent node and the threat item as the child node;

[0008] Step S3: Based on the ChatGLM pre-trained model, use historical user stories as a fine-tuning dataset, annotate the meta-scenario covered by each of the historical user stories and perform fine-tuning to form a fine-tuning model for identifying the meta-scenario;

[0009] Step S4: Apply the fine-tuning model to agile development practice, identify user stories described in natural language to obtain corresponding meta-scenario, and complete the convergence of business scenario to meta-scenario;

[0010] Step S5: Associating a threat tree with the identified meta-scenario as a medium to form a threat list of the user story, thereby completing automated agile threat modeling;

[0011] Step S6: In the agile threat modeling process, risk focus is performed through a pre-configured risk elimination list, security and efficiency are balanced through intelligent push of public security APIs, and threat modeling is assisted by configuration of sensitive database tables and sensitive fields of the project;

[0012] Step S7: Based on the threat list summarized by the pipeline, associated acceptance results registered by testers are generated to form corresponding reports from two dimensions: current status and convergence speed.

[0013] Furthermore, in step S1, the basic model refers to input, processing and output; the data life cycle includes collection, storage, transmission, processing, exchange and destruction.

[0014] Furthermore, the step S2 is specifically as follows:

[0015] Based on the main line of user access to assets, the five core elements of identity authentication, access control, input control, data protection, and log audit are used to perform threat analysis modeling on the meta-scenario. The threat modeling of each meta-scenario forms a number of threat items. Each threat item contains four elements: risk description, risk level, threat reduction measures, and acceptance criteria. They are used to guide secure development and security test acceptance. The threat modeling results based on each meta-scenario are aggregated into a threat tree with the meta-scenario as the parent node and the threat item as the child node.

[0016] Furthermore, the step S3 is specifically as follows:

[0017] Based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning datasets, and the meta-scenarios covered by each historical user story are annotated for fine-tuning until the preset convergence conditions are met, and then verified through the fine-tuning dataset. If the verification passes, the training is terminated to form a fine-tuning model for identifying the meta-scenarios; if the verification fails, the fine-tuning dataset is expanded to continue training.

[0018] Furthermore, the step S6 is specifically as follows:

[0019] Risks that have been uniformly resolved on the framework and verified by security personnel are configured into the risk elimination list. In the process from user stories to generating the initial threat list, if there is a risk item that hits the risk elimination list, the risk item is directly eliminated from the initial threat list to generate the final threat list to achieve risk focus.

[0020] For some threat items, a public security API is developed for modularization and standardization of risk resolution to form a public security API library. During the threat modeling process, if the risk item in the initial threat list matches the public security API library, it is pushed for download for direct reference by developers.

[0021] Perform unified sensitive library tables and sensitive fields configuration for each pipeline to assist in threat modeling.

[0022] In a second aspect, the present invention provides an agile threat modeling system based on ChatGLM and threat tree, comprising the following modules:

[0023] The meta-scenario decomposition module is used to decompose the concrete business abstraction into several meta-scenarios based on the basic model and data life cycle of the application and the business scenarios that cause logical vulnerabilities to form a meta-scenario library;

[0024] A threat tree construction module is used to perform threat analysis on each meta-scenario based on the main line of user access to assets using five core elements, form a threat list for each meta-scenario, and aggregate to form a threat tree with the meta-scenario as the parent node and the threat item as the child node;

[0025] A fine-tuning model training module is used to use historical user stories as a fine-tuning dataset based on the ChatGLM pre-training model, annotate the meta-scenario covered by each of the historical user stories and perform fine-tuning to form a fine-tuning model for identifying the meta-scenario;

[0026] A meta-scenario recognition module is used to apply the fine-tuning model to agile development practices, identify user stories described in natural language to obtain corresponding meta-scenario, and complete the convergence of business scenarios to meta-scenario;

[0027] A threat modeling module, used to associate a threat tree with the identified meta-scenario as a medium, form a threat list of the user story, and complete automated agile threat modeling;

[0028] A security configuration module is used to focus on risks through a pre-configured risk elimination list in the agile threat modeling process, to balance security and efficiency through intelligent push of public security APIs, and to assist threat modeling through the configuration of sensitive database tables and sensitive fields of the project;

[0029] The threat management module is used to form corresponding reports from two dimensions, namely, the current status and the convergence speed, based on the threat list summarized by the pipeline and the acceptance results registered by the associated testers.

[0030] Furthermore, in the meta-scenario decomposition module, the basic model refers to input, processing and output; the data life cycle includes collection, storage, transmission, processing, exchange and destruction.

[0031] Furthermore, the threat tree construction module is specifically used to:

[0032] Based on the main line of user access to assets, the five core elements of identity authentication, access control, input control, data protection, and log audit are used to perform threat analysis modeling on the meta-scenario. The threat modeling of each meta-scenario forms a number of threat items. Each threat item contains four elements: risk description, risk level, threat reduction measures, and acceptance criteria. They are used to guide secure development and security test acceptance. The threat modeling results based on each meta-scenario are aggregated into a threat tree with the meta-scenario as the parent node and the threat item as the child node.

[0033] Furthermore, the fine-tuning model training module is specifically used for:

[0034] Based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning datasets, and the meta-scenarios covered by each historical user story are annotated for fine-tuning until the preset convergence conditions are met, and then verified through the fine-tuning dataset. If the verification passes, the training is terminated to form a fine-tuning model for identifying the meta-scenarios; if the verification fails, the fine-tuning dataset is expanded to continue training.

[0035] Furthermore, the security configuration module is specifically used to:

[0036] Risks that have been uniformly resolved on the framework and verified by security personnel are configured into the risk elimination list. In the process from user stories to generating the initial threat list, if there is a risk item that hits the risk elimination list, the risk item is directly eliminated from the initial threat list to generate the final threat list to achieve risk focus.

[0037] For some threat items, a public security API is developed for modularization and standardization of risk resolution to form a public security API library. During the threat modeling process, if the risk item in the initial threat list matches the public security API library, it is pushed for download for direct reference by developers.

[0038] Perform unified sensitive library tables and sensitive fields configuration for each pipeline to assist in threat modeling.

[0039] The advantages of the present invention are:

[0040] Based on the basic model and data life cycle of the application, and integrating common business scenarios that may cause special logical vulnerabilities, the infinite concrete business scenarios are abstractly decomposed into a limited number of meta-scenarios; based on the main line of user access to assets, five core elements are used to conduct threat analysis on each meta-scenarios to form a threat list for each meta-scenarios, and finally converge to form a threat tree with meta-scenarios as parent nodes and threat items as child nodes; then based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning data sets to annotate the meta-scenarios covered by each user story, and fine-tune them to form a fine-tuning model for identifying meta-scenarios; then the fine-tuning model is applied to agile development practices to identify several meta-scenarios covered by user stories, and then the threat tree is associated with meta-scenarios to form a threat list for the user story, completing automated threat modeling; supplemented by security configuration and threat The threat management mechanism can achieve risk focus, improve the accuracy of data threat modeling, use standardized security codes out of the box, and visualize threat management. The entire agile threat modeling process abandons the traditional entity and data flow diagram-based method, uses STRIDE to model threat models for functional requirements, and uses the meta-scenario recognition model to perform meta-scenario recognition on user stories. Then, using meta-scenario as a medium, it associates the pre-established meta-scenario threat library to achieve automated agile threat modeling. Among them, the meta-scenario recognition model realizes the convergence from infinite business scenarios to finite meta-scenarios. The ChatGLM pre-trained model and fine-tuning data set training on which it is based ensure the accuracy of meta-scenario recognition, and then ensures the accuracy of threat modeling, providing reliable protection for implementing security left shift through threat modeling in the demand stage, and ultimately greatly improving the security and efficiency of threat modeling. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The present invention will be further described below in conjunction with embodiments with reference to the accompanying drawings.

[0042] Figure 1 It is a flow chart of an agile threat modeling method based on ChatGLM and threat tree of the present invention.

[0043] Figure 2 It is a structural schematic diagram of an agile threat modeling system based on ChatGLM and threat tree of the present invention. DETAILED DESCRIPTION

[0044] The technical solution in the embodiment of the present application has the following overall idea: based on the basic model of the application and the data life cycle, a meta-scenario library is created, and meta-scenario recognition is performed on user stories based on a pre-trained fine-tuning model. Then, using the meta-scenario as a medium, the threat tree established by threat modeling of the meta-scenario based on the five core elements is associated to form a threat list for the user story, thereby completing automated threat modeling. The method is simple and convenient, and the meta-scenario recognition model created based on ChatGLM can effectively improve the accuracy of meta-scenario recognition, thereby improving the security and efficiency of threat modeling.

[0045] Please refer to Figure 1 to Figure 2 As shown, a preferred embodiment of an agile threat modeling method based on ChatGLM and threat tree of the present invention comprises the following steps:

[0046] Step S1, based on the basic model and data life cycle of the application, and integrating common business scenarios that may cause special logic vulnerabilities (such as forgetting passwords, accepting authentication, accepting checkout, product ordering, order payment, etc.), the concrete business is abstractly decomposed into several meta-scenarios to form a meta-scenario library;

[0047] Step S2: Based on the main line of user access to assets, use five core elements to perform threat analysis on each meta-scenario, form a threat list for each meta-scenario, and aggregate to form a threat tree with the meta-scenario as the parent node and the threat item as the child node; the construction of the meta-scenario library and the threat tree provides a basis for automated threat modeling, avoiding the dependence of traditional threat modeling on entities and data flow diagrams.

[0048] Step S3: Based on the ChatGLM pre-trained model, use historical user stories as a fine-tuning dataset, annotate the meta-scenario covered by each of the historical user stories and perform fine-tuning to form a fine-tuning model for identifying the meta-scenario;

[0049] Step S4: Apply the fine-tuning model to agile development practice, identify user stories described in natural language to obtain corresponding meta-scenario, and complete the convergence of business scenario to meta-scenario;

[0050] Step S5: Associating a threat tree with the identified meta-scenario as a medium to form a threat list of the user story, thereby completing automated agile threat modeling;

[0051] Step S6: In the agile threat modeling process, risk focus is performed through a pre-configured risk elimination list, security and efficiency are balanced through intelligent push of public security APIs, and threat modeling is assisted by configuration of sensitive database tables and sensitive fields of the project;

[0052] Step S7: Based on the threat list summarized by the pipeline, the acceptance results registered by the associated testers are associated to form corresponding reports from the two dimensions of current status and convergence speed, and timely intervention is carried out according to the situation to achieve visual management of secure development.

[0053] The present invention uses a meta-scenario recognition model to identify the meta-scenario covered by user stories, and then uses the meta-scenario as a medium to associate the threat tree, generate a corresponding threat list, and complete automated threat modeling. Compared with traditional threat modeling based on entities and data flow diagrams, the present invention is a lightweight threat modeling with the characteristics of simplicity, accuracy, and intelligence. It achieves a balance between security and fast delivery, and minimizes the cost of personnel and time.

[0054] In step S1, the basic model refers to input, processing and output; the data life cycle includes collection, storage, transmission, processing, exchange and destruction.

[0055] That is, based on the basic model of the application "input-processing-output" and the full life cycle of data "collection, storage, transmission, processing, exchange, and destruction", and integrating business scenarios that can cause special logical vulnerabilities, the infinite concrete business abstractions are decomposed into a limited number of meta-scenarios to form a meta-scenario library, including but not limited to database interaction, page display, XML reading and writing, sensitive transmission, sensitive storage, sensitive data flow, sensitive data display, page jump, code execution, command execution, file upload, file download, batch export, user authentication, acceptance authentication, forgotten password, password change, password reset, SMS verification code, graphic verification code, user management, user authorization, asset management, asset connection, product ordering, order payment, etc., and timely update and maintenance depending on the organization's project situation.

[0056] The step S2 is specifically as follows:

[0057] The threat modeling of meta-scenario is based on the main line of user access to assets, and adopts five core elements: identity authentication, access control, input control, data protection, and log audit to perform threat analysis modeling on the meta-scenario. The threat modeling of each meta-scenario forms a number of threat items. Each threat item contains four elements: risk description, risk level, threat reduction measures, and acceptance criteria. It is used to guide security development and security test acceptance. The threat modeling results based on each meta-scenario are aggregated into a threat tree with the meta-scenario as the parent node and the threat item as the child node.

[0058] The step S3 is specifically as follows:

[0059] Based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning datasets, and the meta-scenarios covered by each historical user story are annotated for fine-tuning until the preset convergence conditions are met, and then verified through the fine-tuning dataset. If the verification passes, the training is terminated to form a fine-tuning model for identifying the meta-scenarios; if the verification fails, the fine-tuning dataset is expanded to continue training.

[0060] Based on the fine-tuning model, accurate identification from user stories described in natural language to meta-scenarios is achieved, providing a foundation for subsequent fast and automated threat modeling.

[0061] The step S6 is specifically as follows:

[0062] Risks that have been uniformly resolved on the framework and verified by security personnel are configured into the risk elimination list. In the process from user stories to generating the initial threat list, if there is a risk item that hits the risk elimination list, the risk item is directly eliminated from the initial threat list to generate the final threat list to achieve risk focus.

[0063] For example, in the "add, delete, and modify" meta-scenario of "database interaction", the original CSRF risk will disappear due to the use of JWT Token or X-CSRF-Token on the framework; in the "database interaction" meta-scenario, the database error mode will also be avoided due to the unified exception error handling at the DAO layer;

[0064] For some threat items, we develop public security APIs, such as file upload, graphic verification code, password complexity verification, password transmission and storage encryption suite, etc., to modularize and standardize risk resolution and form a public security API library. During the threat modeling process, if the risk items in the initial threat list match the public security API library, it will be pushed for download for direct reference by developers. On the one hand, the development efficiency is improved through the ready-to-use API, and on the other hand, it avoids the uneven security quality caused by reinventing the wheel.

[0065] A unified configuration of sensitive libraries and fields is performed for each pipeline to assist in threat modeling. This allows POs to check items based on the circumstances when writing user stories, to help improve the accuracy of threat modeling in data security.

[0066] A preferred embodiment of an agile threat modeling system based on ChatGLM and threat tree of the present invention includes the following modules:

[0067] The meta-scenario decomposition module is used to abstract concrete business into several meta-scenarios based on the basic model and data life cycle of the application, and integrate common business scenarios that may cause special logic vulnerabilities (such as forgotten password, acceptance authentication, acceptance checkout, product ordering, order payment, etc.), forming a meta-scenario library;

[0068] The threat tree construction module is used to perform threat analysis on each meta-scenario based on the main line of user access to assets, using five core elements to form a threat list for each meta-scenario, and aggregate to form a threat tree with the meta-scenario as the parent node and the threat item as the child node; the construction of the meta-scenario library and the threat tree provides a basis for automated threat modeling, avoiding the reliance of traditional threat modeling on entities and data flow diagrams.

[0069] A fine-tuning model training module is used to use historical user stories as a fine-tuning dataset based on the ChatGLM pre-training model, annotate the meta-scenario covered by each of the historical user stories and perform fine-tuning to form a fine-tuning model for identifying the meta-scenario;

[0070] A meta-scenario recognition module is used to apply the fine-tuning model to agile development practices, identify user stories described in natural language to obtain corresponding meta-scenario, and complete the convergence of business scenarios to meta-scenario;

[0071] A threat modeling module, used to associate a threat tree with the identified meta-scenario as a medium, form a threat list of the user story, and complete automated agile threat modeling;

[0072] A security configuration module is used to focus on risks through a pre-configured risk elimination list in the agile threat modeling process, to balance security and efficiency through intelligent push of public security APIs, and to assist threat modeling through the configuration of sensitive database tables and sensitive fields of the project;

[0073] The threat management module is used to form corresponding reports from the two dimensions of current status and convergence speed based on the threat list summarized by the pipeline, and to intervene in time according to the situation to realize visual management of secure development.

[0074] The present invention uses a meta-scenario recognition model to identify the meta-scenario covered by user stories, and then uses the meta-scenario as a medium to associate the threat tree, generate a corresponding threat list, and complete automated threat modeling. Compared with traditional threat modeling based on entities and data flow diagrams, the present invention is a lightweight threat modeling with the characteristics of simplicity, accuracy, and intelligence. It achieves a balance between security and fast delivery, and minimizes the cost of personnel and time.

[0075] In the meta-scenario decomposition module, the basic model refers to input, processing and output; the data life cycle includes collection, storage, transmission, processing, exchange and destruction.

[0076] That is, based on the basic model of the application "input-processing-output" and the full life cycle of data "collection, storage, transmission, processing, exchange, and destruction", and integrating business scenarios that can cause special logical vulnerabilities, the infinite concrete business abstractions are decomposed into a limited number of meta-scenarios to form a meta-scenario library, including but not limited to database interaction, page display, XML reading and writing, sensitive transmission, sensitive storage, sensitive data flow, sensitive data display, page jump, code execution, command execution, file upload, file download, batch export, user authentication, acceptance authentication, forgotten password, password change, password reset, SMS verification code, graphic verification code, user management, user authorization, asset management, asset connection, product ordering, order payment, etc., and timely update and maintenance depending on the organization's project situation.

[0077] The threat tree construction module is specifically used for:

[0078] The threat modeling of meta-scenario is based on the main line of user access to assets, and adopts five core elements: identity authentication, access control, input control, data protection, and log audit to perform threat analysis modeling on the meta-scenario. The threat modeling of each meta-scenario forms a number of threat items. Each threat item contains four elements: risk description, risk level, threat reduction measures, and acceptance criteria. It is used to guide security development and security test acceptance. The threat modeling results based on each meta-scenario are aggregated into a threat tree with the meta-scenario as the parent node and the threat item as the child node.

[0079] The fine-tuning model training module is specifically used for:

[0080] Based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning datasets, and the meta-scenarios covered by each historical user story are annotated for fine-tuning until the preset convergence conditions are met, and then verified through the fine-tuning dataset. If the verification passes, the training is terminated to form a fine-tuning model for identifying the meta-scenarios; if the verification fails, the fine-tuning dataset is expanded to continue training.

[0081] Based on the fine-tuning model, accurate identification from user stories described in natural language to meta-scenarios is achieved, providing a foundation for subsequent fast and automated threat modeling.

[0082] The security configuration module is specifically used for:

[0083] Risks that have been uniformly resolved on the framework and verified by security personnel are configured into the risk elimination list. In the process from user stories to generating the initial threat list, if there is a risk item that hits the risk elimination list, the risk item is directly eliminated from the initial threat list to generate the final threat list to achieve risk focus.

[0084] For example, in the "add, delete, and modify" meta-scenario of "database interaction", the original CSRF risk will disappear due to the use of JWT Token or X-CSRF-Token on the framework; in the "database interaction" meta-scenario, the database error mode will also be avoided due to the unified exception error handling at the DAO layer;

[0085] For some threat items, we develop public security APIs, such as file upload, graphic verification code, password complexity verification, password transmission and storage encryption suite, etc., to modularize and standardize risk resolution and form a public security API library. During the threat modeling process, if the risk items in the initial threat list match the public security API library, it will be pushed for download for direct reference by developers. On the one hand, the development efficiency is improved through the ready-to-use API, and on the other hand, it avoids the uneven security quality caused by reinventing the wheel.

[0086] A unified configuration of sensitive libraries and fields is performed for each pipeline to assist in threat modeling. This allows POs to check items based on the circumstances when writing user stories, to help improve the accuracy of threat modeling in data security.

[0087] In summary, the advantages of the present invention are:

[0088] Based on the basic model and data life cycle of the application, and integrating common business scenarios that may cause special logical vulnerabilities, the infinite concrete business scenarios are abstractly decomposed into a limited number of meta-scenarios; based on the main line of user access to assets, five core elements are used to conduct threat analysis on each meta-scenarios to form a threat list for each meta-scenarios, and finally converge to form a threat tree with meta-scenarios as parent nodes and threat items as child nodes; then based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning data sets to annotate the meta-scenarios covered by each user story, and fine-tune them to form a fine-tuning model for identifying meta-scenarios; then the fine-tuning model is applied to agile development practices to identify several meta-scenarios covered by user stories, and then the threat tree is associated with meta-scenarios to form a threat list for the user story, completing automated threat modeling; supplemented by security configuration and threat The threat management mechanism can achieve risk focus, improve the accuracy of data threat modeling, use standardized security codes out of the box, and visualize threat management. The entire agile threat modeling process abandons the traditional entity and data flow diagram-based method, uses STRIDE to model threat models for functional requirements, and uses the meta-scenario recognition model to perform meta-scenario recognition on user stories. Then, using meta-scenario as a medium, it associates the pre-established meta-scenario threat library to achieve automated agile threat modeling. Among them, the meta-scenario recognition model realizes the convergence from infinite business scenarios to finite meta-scenarios. The ChatGLM pre-trained model and fine-tuning data set training on which it is based ensure the accuracy of meta-scenario recognition, and then ensures the accuracy of threat modeling, providing reliable protection for implementing security left shift through threat modeling in the demand stage, and ultimately greatly improving the security and efficiency of threat modeling.

[0089] Although the specific implementation modes of the present invention are described above, those skilled in the art should understand that the specific implementation modes described are only illustrative and are not intended to limit the scope of the present invention. Equivalent modifications and changes made by those skilled in the art in accordance with the spirit of the present invention should be included in the scope of protection of the claims of the present invention.

Claims

1. An agile threat modeling method based on ChatGLM and threat tree, characterized by: The steps include: Step S1: Based on the basic model and data life cycle of the application, and in combination with the business scenarios that cause logical vulnerabilities, the concrete business is abstractly decomposed into several meta-scenarios to form a meta-scenario library; Step S2: Based on the main line of user access to assets, use five core elements to perform threat analysis on each meta-scenario, form a threat list for each meta-scenario, and aggregate to form a threat tree with the meta-scenario as the parent node and the threat item as the child node; Step S3: Based on the ChatGLM pre-trained model, use historical user stories as a fine-tuning dataset, annotate the meta-scenario covered by each of the historical user stories and perform fine-tuning to form a fine-tuning model for identifying the meta-scenario; Step S4: Apply the fine-tuning model to agile development practice, identify user stories described in natural language to obtain corresponding meta-scenario, and complete the convergence of business scenario to meta-scenario; Step S5: Associating a threat tree with the identified meta-scenario as a medium to form a threat list of the user story, thereby completing automated agile threat modeling; Step S6: In the agile threat modeling process, risk focus is performed through a pre-configured risk elimination list, security and efficiency are balanced through intelligent push of public security APIs, and threat modeling is assisted by configuration of sensitive database tables and sensitive fields of the project; Step S7: Based on the threat list summarized by the pipeline, associated acceptance results registered by testers are generated to form corresponding reports from two dimensions: current status and convergence speed.

2. The agile threat modeling method based on ChatGLM and threat tree according to claim 1, characterized in that: In step S1, the basic model refers to input, processing and output; the data life cycle includes collection, storage, transmission, processing, exchange and destruction.

3. The agile threat modeling method based on ChatGLM and threat tree according to claim 1, characterized in that: The step S2 is specifically as follows: Based on the main line of user access to assets, the five core elements of identity authentication, access control, input control, data protection, and log audit are used to perform threat analysis modeling on the meta-scenario. The threat modeling of each meta-scenario forms a number of threat items. Each threat item contains four elements: risk description, risk level, threat reduction measures, and acceptance criteria. They are used to guide secure development and security test acceptance. The threat modeling results based on each meta-scenario are aggregated into a threat tree with the meta-scenario as the parent node and the threat item as the child node.

4. The agile threat modeling method based on ChatGLM and threat tree according to claim 1, characterized in that: The step S3 is specifically as follows: Based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning datasets, and the meta-scenarios covered by each historical user story are annotated for fine-tuning until the preset convergence conditions are met, and then verified through the fine-tuning dataset. If the verification passes, the training is terminated to form a fine-tuning model for identifying the meta-scenarios; if the verification fails, the fine-tuning dataset is expanded to continue training.

5. The agile threat modeling method based on ChatGLM and threat tree according to claim 1, characterized in that: The step S6 is specifically as follows: Risks that have been uniformly resolved in the project framework and verified by security personnel are configured into the risk elimination list; In the process from user stories to generating the initial threat list, if there is a risk item that hits the risk elimination list, the risk item is directly eliminated from the initial threat list to generate the final threat list to achieve risk focus; For some threat items, a public security API is developed for modularization and standardization of risk resolution to form a public security API library. During the threat modeling process, if the risk item in the initial threat list matches the public security API library, it is pushed for download for direct reference by developers. Perform unified sensitive library tables and sensitive fields configuration for each pipeline to assist in threat modeling.

6. An agile threat modeling system based on ChatGLM and threat tree, characterized by: Includes the following modules: The meta-scenario decomposition module is used to decompose the concrete business abstraction into several meta-scenarios based on the basic model and data life cycle of the application and the business scenarios that cause logical vulnerabilities to form a meta-scenario library; A threat tree construction module is used to perform threat analysis on each meta-scenario based on the main line of user access to assets using five core elements, form a threat list for each meta-scenario, and aggregate to form a threat tree with the meta-scenario as the parent node and the threat item as the child node; A fine-tuning model training module is used to use historical user stories as a fine-tuning dataset based on the ChatGLM pre-training model, annotate the meta-scenario covered by each of the historical user stories and perform fine-tuning to form a fine-tuning model for identifying the meta-scenario; A meta-scenario recognition module is used to apply the fine-tuning model to agile development practices, identify user stories described in natural language to obtain corresponding meta-scenario, and complete the convergence of business scenarios to meta-scenario; A threat modeling module, used to associate a threat tree with the identified meta-scenario as a medium, form a threat list of the user story, and complete automated agile threat modeling; A security configuration module is used to focus on risks through a pre-configured risk elimination list in the agile threat modeling process, to balance security and efficiency through intelligent push of public security APIs, and to assist threat modeling through the configuration of sensitive database tables and sensitive fields of the project; The threat management module is used to form corresponding reports from two dimensions, namely, the current status and the convergence speed, based on the threat list summarized by the pipeline and the acceptance results registered by the associated testers.

7. The agile threat modeling system based on ChatGLM and threat tree as claimed in claim 6, characterized in that: In the meta-scenario decomposition module, the basic model refers to input, processing and output; the data life cycle includes collection, storage, transmission, processing, exchange and destruction.

8. The agile threat modeling system based on ChatGLM and threat tree as claimed in claim 6, characterized in that: The threat tree construction module is specifically used for: Based on the main line of user access to assets, the five core elements of identity authentication, access control, input control, data protection, and log audit are used to perform threat analysis modeling on the meta-scenario. The threat modeling of each meta-scenario forms a number of threat items. Each threat item contains four elements: risk description, risk level, threat reduction measures, and acceptance criteria. They are used to guide secure development and security test acceptance. The threat modeling results based on each meta-scenario are aggregated into a threat tree with the meta-scenario as the parent node and the threat item as the child node.

9. The agile threat modeling system based on ChatGLM and threat tree as claimed in claim 6, characterized in that: The fine-tuning model training module is specifically used for: Based on the ChatGLM pre-trained model, historical user stories are used as fine-tuning datasets, and the meta-scenarios covered by each historical user story are annotated for fine-tuning until the preset convergence conditions are met, and then verified through the fine-tuning dataset. If the verification passes, the training is terminated to form a fine-tuning model for identifying the meta-scenarios; if the verification fails, the fine-tuning dataset is expanded to continue training.

10. The agile threat modeling system based on ChatGLM and threat tree according to claim 6, characterized in that: The security configuration module is specifically used for: Risks that have been uniformly resolved in the project framework and verified by security personnel are configured into the risk elimination list; In the process from user stories to generating the initial threat list, if there is a risk item that hits the risk elimination list, the risk item is directly eliminated from the initial threat list to generate the final threat list to achieve risk focus; For some threat items, a public security API is developed for modularization and standardization of risk resolution to form a public security API library. During the threat modeling process, if the risk item in the initial threat list matches the public security API library, it is pushed for download for direct reference by developers. Perform unified sensitive library tables and sensitive fields configuration for each pipeline to assist in threat modeling.