Software development method and device
By identifying potential risk points in software development and generating corresponding security test cases, the problems of large resource investment and low security assessment efficiency in the existing technology are solved, efficient security assessment and code optimization are achieved, and the security and reliability of the software are improved.
Patent Information
- Application Number
- CN202411940609.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-26
- Publication Date
- 2025-04-01
AI Technical Summary
Existing software development frameworks such as SDL and CLASP have challenges in terms of large resource investment, insufficient agile development adaptability, high cultural and organizational structure requirements, and low security assessment efficiency, which limit their effective application and cost-effectiveness in a wide range of scenarios.
By identifying potential risk points of the software to be developed, generating security test cases covering these risk points, executing these use cases in a test environment to verify the security of the design code, and optimizing the design code based on the verification results.
This method can identify and mitigate potential security threats at an early stage, reduce the risk of software vulnerabilities, improve product security and reliability, while achieving low-cost and high-efficiency security assessments.
Smart Images

Figure CN119740238A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a software development method and device. Background Art
[0002] In the current software development field, in order to improve the security of software, the Security Development Lifecycle (SDL) and the Comprehensive Lightweight Application Security Process (CLASP) are widely used as two mainstream development frameworks. SDL emphasizes the integration of security practices into every stage of software development, from requirements analysis to release and maintenance. CLASP focuses more on lightweight application security processes and ensures software security through a series of activities.
[0003] Although the SDL and CLASP frameworks are designed to improve software security, their implementation faces challenges such as large resource investment, insufficient adaptability to agile development, high cultural and organizational structure requirements, and low security assessment efficiency, which limit their effective application and cost-effectiveness in a wide range of scenarios. Summary of the invention
[0004] The present invention provides a software development method and device to solve the defects in the prior art.
[0005] The present invention provides a software development method, comprising the following steps: Based on the security requirements of the software to be developed, identify potential risk points of the software to be developed; Generate security test cases covering the potential risk points; Executing the security test case in a test environment to verify the security of the design code corresponding to the software to be developed, the test environment being constructed based on the design code; Based on the verification result, the design code is optimized.
[0006] According to a software development method provided by the present invention, the design code is written based on the design file of the software to be developed and the security requirements; Before writing the design code, the method further includes: Based on the potential risk points, security vulnerabilities in the design documents are identified and repaired.
[0007] According to a software development method provided by the present invention, generating a security test case covering the potential risk point includes: identifying sensitive information in said design documents; Under the data rules, based on the sensitive information, a security test case covering the potential risk points is generated, and the data rules are used to define at least one of the data format, verification logic and constraint conditions of the security test case.
[0008] According to a software development method provided by the present invention, after writing the design code, the method further includes: Check whether the design code meets the coding specification requirements; Based on the potential risk points, identify whether the design code has security vulnerabilities.
[0009] According to a software development method provided by the present invention, the method further includes: Based on the potential risk points, simulating attack scenarios in the test environment; In a test environment simulating the attack scenario, the design code is run, and based on the running situation, it is determined whether the design code has a security vulnerability.
[0010] According to a software development method provided by the present invention, the step of optimizing the design code based on the verification result includes: When the verification result indicates that the design code has a security vulnerability, the design code is optimized based on a security vulnerability analysis report.
[0011] According to a software development method provided by the present invention, the design code is optimized based on the verification result, and then the method further includes: Run the optimized design code; The operation status is monitored, and based on the operation status, it is determined whether the optimized design code has a security vulnerability.
[0012] According to a software development method provided by the present invention, the method further includes: In the case where security vulnerabilities exist in the optimized design code, the security vulnerabilities are repaired based on historical security events.
[0013] The present invention also provides a software development device, comprising the following modules: An identification unit, used to identify potential risk points of the software to be developed based on the security requirements of the software to be developed; A generating unit, used to generate security test cases covering the potential risk points; A verification unit, configured to execute the security test case in a test environment to verify the security of the design code corresponding to the software to be developed, wherein the test environment is constructed based on the design code; The optimization unit is used to optimize the design code based on the verification result.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the software development methods described above is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the software development method described in any one of the above is implemented.
[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the computer program implements any of the software development methods described above.
[0017] The software development method and device provided by the present invention can comprehensively identify potential risk points in the subsequent stages of software development through the security requirements of the software to be developed. Based on the identified potential risk points, security test cases directly targeting the security issues of the software to be developed are generated, avoiding a large amount of repetitive work and invalid testing in the testing phase, thereby reducing resource investment. In addition, the present invention executes test cases in a test environment, so that potential security issues can be discovered as early as possible in the test environment, avoiding larger security vulnerabilities in the later development and deployment stages, and reducing repair costs and risks. Finally, based on the verification results, the present invention can directly repair potential security issues, avoiding unnecessary code modifications and testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0019] Figure 1 It is a flowchart of the software development method provided by the present invention.
[0020] Figure 2 It is a flowchart of another software development method provided by the present invention.
[0021] Figure 3 It is a structural schematic diagram of the software development device provided by the present invention.
[0022] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0023] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0024] SDL aims to integrate security and privacy issues into every stage of software development, including security training, requirements analysis, system design, implementation, verification, release and response. The main goal of SDL is to help developers build more secure software and address security compliance requirements.
[0025] However, SDL requires a lot of resources, including training, tools, processes, and personnel. SDL is a heavyweight framework and is not suitable for teams that adopt agile development, such as teams that are not suitable for rapid iteration and continuous delivery. SDL requires a strong security culture and cross-departmental cooperation within the organization, which is costly.
[0026] CLASP provides a lightweight, activity-driven process that emphasizes role-based security practices, but CLASP focuses more on white-box testing and lacks coverage of black-box testing or offensive assessment activities, such as penetration testing. CLASP does not provide an importance classification for activities. Users need to assess the importance and urgency of each activity themselves, which increases the cognitive burden of users or adds the role of security consultants or security auditors, resulting in additional labor costs. In addition, CLASP requires certain security experience to effectively execute activities. Lack of security experience may cause organizations to ignore certain key details when executing activities, thereby increasing security risks.
[0027] Testing Before Coding (TBC) emphasizes testing before coding. The core idea is to define test cases and test plans before writing code to identify and fix potential defects in advance.
[0028] Compared with SDL, TBC performs testing before coding, which can reduce the cost of repairing defects discovered later, thereby alleviating the burden on resources. For agile development teams, TBC identifies potential problems in the early stages of development, making SDL activities more focused and efficient.
[0029] Compared with CLASP, TBC can ensure the comprehensiveness of testing activities by defining test cases before coding, and detect problems at an early stage, reducing the cost of later repairs, thereby alleviating the cost pressure caused by adding security roles. In addition, TBC can guide development activities through the priority of test cases and help the team determine the priority of testing activities.
[0030] However, compared with CLASP and SDL, TBC tests software defects in the coder and cannot identify potential security risks. Therefore, it performs poorly in improving software security.
[0031] The present invention provides a software development method, which integrates the advantages of TBC, CLASP and SDL, identifies potential risk points in the requirement analysis stage, generates security test cases covering the risk points, executes the security test cases in a test environment to verify the security of the design code, and optimizes the design code according to the verification results, thereby being able to identify and mitigate potential security threats at an early stage, reduce software vulnerability risks, improve product security and reliability, and achieve low-cost and high-efficiency security assessment.
[0032] Figure 1 It is a flowchart of the software development method provided by the present invention, such as Figure 1 As shown, the method includes step 110 , step 120 , step 130 and step 140 .
[0033] Step 110: Based on the security requirements of the software to be developed, identify potential risk points of the software to be developed.
[0034] Here, the software to be developed refers to the software currently under development, and the security requirements refer to the requirements for ensuring the security and reliability of the software. Security requirements may include requirements for authentication and authorization, data confidentiality, integrity and reliability, as well as requirements for preventing and responding to threats and attacks. Considering that user feedback and historical data may include security-related content, security requirements can be determined based on user feedback and historical data. For example, user feedback and historical data can be input into a large model, and the large model can extract security-related content based on the semantic information of the two, and generate security requirements based on the security-related content. Among them, historical data can be understood as project-related information collected, recorded and saved in a certain period of time in the past.
[0035] In addition, potential risk points can be understood as weak links or defects in the software development process that may cause security vulnerabilities. Potential risk points can include code implementation, data processing, network communication, etc.
[0036] By analyzing security requirements, potential risk points related to security can be identified. For example, if a strong password policy is required in the security requirements, data encryption may be a potential risk point. For example, the security requirements can be input into a large model, which analyzes the security requirements and identifies potential risk points and mitigation measures corresponding to each potential risk point. Mitigation measures may include data encryption, user authentication, authorization, auditing, etc.
[0037] It should be noted that, before generating security test cases, the embodiment of the present invention identifies potential risk points based on the security requirements of the software to be developed. That is, the embodiment of the present invention identifies potential risk points in advance during the requirements analysis phase, so that effective prevention and control can be carried out on potential risk points to avoid security vulnerabilities in the later stages of software development, which leads to increased repair costs and increased security risks.
[0038] Step 120: Generate security test cases covering potential risk points.
[0039] Specifically, security test cases are test cases designed for potential risk points. The security test cases are used to ensure that each potential risk point is fully tested and verified, thereby ensuring the security and stability of the software in the face of potential risk points. The test cases may include information such as input data, expected output, and execution steps.
[0040] For example, potential risk points can be input into the big model, and the big model automatically generates security test cases covering the potential risk points. Security requirements can also be input into the big model, and the big model identifies potential risk points based on the security requirements, and automatically generates security test cases covering the potential risk points based on the potential risk points.
[0041] Step 130: Execute security test cases in a test environment to verify the security of the design code corresponding to the software to be developed. The test environment is constructed based on the design code.
[0042] Specifically, the test environment is used to simulate the actual operating environment of the software to be developed, which can accurately reflect the performance of the software to be developed in the actual application process. The test environment can be constructed based on the design code of the software to be developed, and the design code can be written by the developers based on the project requirements, design documents, etc. of the software to be developed.
[0043] By executing test cases in a test environment, we can verify whether the design code of the software to be developed meets security requirements, discover potential security vulnerabilities in a timely manner, and then repair existing security vulnerabilities in advance.
[0044] For example, a large model can be used to drive a testing tool to automatically execute security test cases in a test environment, thereby ensuring the efficiency and test coverage of the testing process and promptly discovering potential security issues.
[0045] Step 140: Optimize the design code based on the verification result.
[0046] Specifically, the verification result refers to the conclusion or data obtained after executing the security test case. The verification result may include successfully passed test cases, failed test cases, and any abnormal or warning information.
[0047] Based on the verification results, security vulnerabilities in the design code can be further identified, such as logical errors in the code, improper security configuration, unhandled exceptions, potential data leakage, injection attack points, etc.
[0048] After identifying security vulnerabilities, optimize the design code to address the security vulnerabilities, such as modifying code logic, enhancing security configuration, adding necessary error handling mechanisms, implementing data encryption or access control, etc.
[0049] The software development method provided by the embodiment of the present invention can comprehensively identify the potential risk points in the subsequent stages of software development through the security requirements of the software to be developed. Based on the identified potential risk points, security test cases that directly target the security issues of the software to be developed are generated, thereby avoiding a large amount of repetitive work and invalid testing in the testing phase, thereby reducing resource investment. In addition, the embodiment of the present invention executes test cases in a test environment, so that potential security issues can be discovered as early as possible in the test environment, avoiding larger security vulnerabilities in the later development and deployment stages, and reducing repair costs and risks. Finally, based on the verification results, the embodiment of the present invention can directly repair potential security issues, avoiding unnecessary code modifications and testing.
[0050] In summary, the embodiments of the present invention can identify and mitigate potential security threats at an early stage by identifying potential risk points in the demand analysis stage, generating security test cases covering the potential risk points, executing the security test cases in a test environment to verify the security of the design code, and optimizing the design code based on the verification results, thereby reducing software vulnerability risks, improving product security and reliability, and achieving low-cost and high-efficiency security assessments.
[0051] In addition, the embodiments of the present invention can quickly adapt to changes in security requirements by comprehensively identifying potential risk points and generating test cases in a targeted manner. That is, when security requirements change, security test cases can be quickly adjusted to ensure that the security test cases cover new potential risk points, thereby maintaining the effectiveness and accuracy of the test. Therefore, the embodiments of the present invention are suitable for agile development environments and can provide effective security assessments for agile development.
[0052] Based on the above embodiment, the design code is written based on the design files and security requirements of the software to be developed; Before writing design code, the method also includes: Based on potential risk points, identify and repair security vulnerabilities in design documents.
[0053] Specifically, the design file is used to describe the key information of the software to be developed, such as the structure, function, interface, data flow, etc. According to the description in the design file, the design code that meets the design requirements can be written. Security requirements are used to describe the specific requirements of the software to be developed in terms of security performance. According to the security requirements in the security requirements, a more secure and reliable design code can be written. Exemplarily, a code prompt text (such as Prompt text) can be written based on the design file and security requirements. The code prompt text is used to indicate the code writing requirements (such as the functions to be implemented, the safety specifications to be followed, etc.), and the code prompt text is input into the large model, which generates the design code that meets the requirements based on the code prompt text.
[0054] In addition, considering that before writing the design code, if there are security vulnerabilities in the design file, it may cause more serious security problems in the subsequent stages. In this regard, the embodiment of the present invention identifies and repairs security vulnerabilities in the design file based on potential risk points before writing the design code, thereby significantly reducing the security risks of the software in the subsequent stages. In addition, identifying and repairing security vulnerabilities before writing the design code can avoid a large amount of code modification and testing work in the subsequent stages, which helps to reduce repair costs and improve development efficiency. Furthermore, by identifying and repairing security vulnerabilities, the development team can have a deeper understanding of the security requirements and potential risks of the software to be developed, which helps to enhance the team's security awareness and promote the team to pay more attention to security issues in the subsequent stages.
[0055] For example, the design file can be input into the big model, and the big model checks whether the design file follows the minimum attack surface principle and the default security principle. The minimum attack surface principle emphasizes reducing potential security risks by minimizing the exposure of the system, that is, requiring that only necessary services and ports be opened in the design file, and restricting unnecessary access rights to reduce the possibility of being attacked. The default security principle requires that the default configuration of the system or product should be secure, that is, without any additional configuration, the system has a certain security protection capability, which helps prevent security vulnerabilities caused by improper configuration.
[0056] Exemplarily, the design file may also be input into the big model, which will automatically identify security vulnerabilities in the design file based on potential risk points and provide repair suggestions, so that the security vulnerabilities can be repaired according to the repair suggestions.
[0057] The embodiments of the present invention can identify and repair security vulnerabilities in design files based on potential risk points before writing design codes, which can significantly improve the security of software, reduce repair costs, and enhance the security awareness of the team.
[0058] In addition, after writing the design code, the design code can be input into the big model, which verifies whether the design code has security vulnerabilities indicated in the security standards according to the security standards, and gives repair suggestions if there are security vulnerabilities. In addition, the design code and potential risk points can be input into the big model, which identifies whether there are security vulnerabilities (such as injection vulnerabilities, cross-site scripting, etc.) corresponding to the potential risk points in the design code, and gives repair suggestions if there are security vulnerabilities, so as to identify security vulnerabilities in the design code in the early stage of code writing.
[0059] Among them, security vulnerabilities refer to security issues caused by the exploitation or triggering of potential risk points. There is a direct correlation between security vulnerabilities and potential risk points. Potential risk points are the premise or condition for the emergence of security vulnerabilities, while security vulnerabilities are the result of the exploitation or triggering of potential risk points. In other words, if potential risk points are not discovered and repaired in time, they may be transformed into security vulnerabilities, which can then be exploited by attackers to carry out attacks.
[0060] For example, during the software development process, if the system allows users to log in with simple or weak passwords, it constitutes a potential risk point. When an attacker exploits this potential risk point and successfully obtains the user's login credentials by guessing or brute force, a security vulnerability is formed. Among them, weak passwords are potential risk points, and the unauthorized access caused by them is a security vulnerability.
[0061] Based on any of the above embodiments, a security test case covering potential risk points is generated, including: Identify sensitive information in design documents; Under the data rules, security test cases covering potential risk points are generated based on sensitive information. The data rules are used to define at least one of the data format, verification logic and constraint conditions of the security test cases.
[0062] Specifically, sensitive information can be understood as information that requires special protection. Once sensitive information is leaked or used improperly, it may cause losses. Sensitive information may include personal information, financial information, health information, corporate secrets, etc.
[0063] In addition, data rules are used to define the data format, verification logic, and constraints of security test cases. Data format refers to the format of input and output data in test cases, such as data type, data length, data encoding, etc. Verification logic refers to the logical rules used to check whether the test case execution results meet expectations, such as data comparison, logical judgment, etc. Constraints refer to specific conditions that need to be followed during the execution of test cases, such as time limits, resource limits, etc.
[0064] Exemplarily, the safety standards and regulatory requirements involved in the software to be developed can be input into the big model, and the big model can generate data rules that meet the safety standards and regulatory requirements.
[0065] For example, the data set involved in the design document can be input into the big model, which automatically identifies sensitive information in the data set and automatically applies encryption, desensitization and other protection measures to protect the security and privacy of the data.
[0066] After identifying sensitive information, it can be determined which data requires special protection, so that when generating security test cases based on sensitive information, effective test scenarios and verification methods can be designed for sensitive information. In addition, if sensitive information is identified and protected after the security test cases are generated, there is a risk of leakage because the generated security test cases may already contain sensitive information. In this regard, the embodiments of the present invention generate security test cases based on sensitive information under data rules, which can not only ensure that the security test cases follow the data rules, but also avoid the subsequent repeated modification of security test cases due to problems with data rules, resulting in increased testing costs. It can also prevent sensitive information leakage in advance.
[0067] Based on any of the above embodiments, after writing the design code, the method further includes: Check whether the design code meets the coding specification requirements; Based on potential risk points, identify whether the design code has security vulnerabilities.
[0068] Specifically, coding standards are used to guide the writing of clear, maintainable and secure code. Coding standard requirements can include requirements on coding style, naming rules, code structure, comments, etc. If the design code meets the coding standard requirements, it means that the design code meets the security standards, thereby reducing the risk of security vulnerabilities caused by non-standard design codes.
[0069] Exemplarily, a large model-assisted code writing tool may be used, the code writing tool having a built-in coding specification checking function, and the code writing tool detects whether the design code complies with the coding specification requirements.
[0070] In addition, potential risk points are used to identify whether there are security vulnerabilities in the design code, such as injection vulnerabilities, cross-site scripting, etc., so that security vulnerabilities can be identified and repaired in the early stages of research and development, avoiding more serious problems caused by the security vulnerabilities in subsequent stages. This not only improves the security of the design code, but also reduces the cost and time of repairing vulnerabilities.
[0071] For example, the design code can be input into a large model-assisted static code analysis tool, which combines potential risk points to identify whether there are security vulnerabilities in the design code and provides repair suggestions if there are security vulnerabilities so that developers can repair them.
[0072] Based on any of the above embodiments, the method further includes: Simulate attack scenarios in a test environment based on potential risk points; Run the design code in a test environment that simulates an attack scenario, and determine whether the design code has security vulnerabilities based on the running situation.
[0073] Specifically, the attack scenario is intended to simulate the attack means and methods that malicious users may take in actual applications. Among them, large model-enhanced dynamic security testing tools (such as automated penetration testing tools) can be used to simulate attack scenarios in a test environment.
[0074] In a test environment that simulates an attack scenario, run the design code. If it can run normally, it means that the design code has no security vulnerabilities in the attack scenario. If there are abnormal behaviors during the operation (such as crashes, data leakage, privilege escalation, etc.), it means that there may be security vulnerabilities in the design code that can be exploited. For these security vulnerabilities, corresponding repair suggestions can be given.
[0075] It can be seen that the embodiments of the present invention can improve the accuracy and efficiency of discovering security vulnerabilities by simulating attack scenarios in a test environment and running the designed code to discover security vulnerabilities.
[0076] Based on any of the above embodiments and based on the verification results, optimizing the design code includes: When the verification result indicates that the design code has a security vulnerability, the design code is optimized based on the security vulnerability analysis report.
[0077] Specifically, the security vulnerability analysis report is used to describe the security vulnerability details of the design code, and the security vulnerability details may include vulnerability overview, vulnerability details, risk assessment, repair suggestions, etc. Optionally, the design code may be optimized based on the repair suggestions in the security vulnerability analysis report.
[0078] For example, a large model-assisted quality assurance tool can be used to apply the verification results to evaluate whether the design code meets all security requirements, and generate a security vulnerability analysis report if there are security vulnerabilities, so that the design code can be optimized based on the security vulnerability analysis report.
[0079] Based on any of the above embodiments, based on the verification results, optimizing the design code, and then further comprising: Run the optimized design code; The running status is monitored, and based on the running status, it is determined whether the optimized design code has security vulnerabilities.
[0080] Specifically, before the software is released, the running status of the software is monitored, security vulnerabilities are discovered and repaired in time, and the security of the software is ensured when it is released. In this regard, after optimizing the design code and before the software is released, the embodiment of the present invention runs the optimized design code and monitors in real time whether there is abnormal behavior during the running process. If so, it indicates that the optimized design code has security vulnerabilities, and repair suggestions can be given at this time.
[0081] For example, the analysis tools of the big model can be used to monitor the operation status and promptly discover and repair security vulnerabilities.
[0082] Based on any of the above embodiments, the method further includes: In the case that security vulnerabilities exist in the optimized design code, the security vulnerabilities are repaired based on historical security events.
[0083] Specifically, historical security events refer to various security-related events that occurred in the past. By analyzing historical security events, we can understand the causes of security vulnerabilities, attack methods, impact scope, and repair measures, so that we can repair security vulnerabilities based on the above information.
[0084] Exemplarily, a large model-driven vulnerability repair tool can be used to repair security vulnerabilities in combination with historical security events, while learning new knowledge from each security event to continuously update the vulnerability repair tool to improve future development processes and enhance software security.
[0085] Based on any of the above embodiments, Figure 2 It is a flowchart of another software development method provided by the present invention, such as Figure 2 As shown in the figure, software development includes the requirements phase, testing phase, development phase and release phase. The requirements phase includes the requirements analysis phase and the design phase, the testing phase includes the data specification phase and the test execution phase, the development phase includes the use case generation phase and the program development phase, and the release phase includes the quality assurance phase, the product release phase and the response phase. Each phase executes the corresponding process in the following order: In the demand analysis phase, use big model-assisted demand analysis tools, such as natural language processing (NLP) technology, to automatically extract security requirements for the software to be developed from user feedback and historical data. Use big model-driven threat modeling tools to apply security requirements and identify potential risk points for the software to be developed.
[0086] During the design phase, we use large model-assisted design principle checking tools to check whether the design files follow the minimum attack surface principle and the default security principle. We use the threat model assisted by large models to automatically identify security vulnerabilities in design files and provide repair suggestions, so that security vulnerabilities can be repaired according to the repair suggestions.
[0087] In the data specification phase, the security standards and regulatory requirements involved in the software to be developed are input into the big model, and the big model generates data rules that meet the security standards and regulatory requirements. The data sets involved in the design documents are input into the big model, and the big model automatically identifies the sensitive information in the data sets and automatically applies encryption, desensitization and other protection measures to protect the security and privacy of the data. At the same time, monitoring tools are deployed to monitor the data processing activities in the software development process in real time for abnormal behavior or security vulnerabilities, and provide alerts if abnormal behavior and / or security vulnerabilities are found.
[0088] In the use case generation phase, the big model is used to generate security test cases based on potential risk points, which cover all security functions and potential security vulnerabilities. The test suite generation tool assisted by the big model is used to update the security test cases according to new security requirements.
[0089] During the program development phase, a large model-assisted code writing tool is used. The code writing tool has a built-in coding standard checking function, and the code writing tool detects whether the design code meets the coding standard requirements. The design code is input into the large model-assisted static code analysis tool. The tool combines potential risk points to identify whether there are security vulnerabilities in the design code, and gives repair suggestions if there are security vulnerabilities, so that developers can repair them.
[0090] During the test execution phase, the test tool is driven by a large model to automatically execute security test cases in the test environment to ensure the efficiency and test coverage of the test process and timely discover potential security issues. Use dynamic security testing tools enhanced by large models (such as automated penetration testing tools) to simulate attack scenarios in the test environment. In the test environment simulating attack scenarios, run the design code. If it can run normally, it means that the design code does not have security vulnerabilities in the attack scenario.
[0091] In the quality assurance stage, we use large model-assisted quality assurance tools and apply verification results to evaluate whether the design code meets all security requirements. If there are security vulnerabilities, we generate security vulnerability analysis reports, so that we can optimize the design code based on the security vulnerability analysis reports. Through the large model security expert system, we provide customers with customized security review services to ensure that the software to be developed meets the functional requirements while also meeting the customer's specific security requirements and standards.
[0092] During the product release phase, use the risk assessment tools assisted by the big model to conduct the final security and privacy risk assessment on the software to be developed. Run the software to be developed and use the analysis tools of the big model to monitor the operation status and promptly discover and fix security vulnerabilities.
[0093] During the response phase, establish an emergency response plan based on big models, automatically monitor the operation of the software to be developed, respond to security issues in a timely manner, and when security issues are discovered, use big model-driven vulnerability repair tools in combination with historical security incidents to repair security vulnerabilities. At the same time, learn new knowledge from each security incident to continuously update vulnerability repair tools to improve future development processes and improve software security.
[0094] The software development device provided by the present invention is described below. The software development device described below and the software development method described above can be referenced to each other.
[0095] Based on any of the above embodiments, Figure 3 It is a structural diagram of the software development device provided by the present invention, such as Figure 3 As shown, the device comprises: An identification unit 310 is used to identify potential risk points of the software to be developed based on the security requirements of the software to be developed; A generating unit 320, used to generate security test cases covering potential risk points; A verification unit 330 is used to execute security test cases in a test environment to verify the security of the design code corresponding to the software to be developed, and the test environment is constructed based on the design code; The optimization unit 340 is used to optimize the design code based on the verification result.
[0096] Based on any of the above embodiments, the design code is written based on the design files and security requirements of the software to be developed; Before writing design code, the method also includes: Based on potential risk points, identify and repair security vulnerabilities in design documents.
[0097] Based on any of the above embodiments, a security test case covering potential risk points is generated, including: Identify sensitive information in design documents; Under the data rules, security test cases covering potential risk points are generated based on sensitive information. The data rules are used to define at least one of the data format, verification logic and constraint conditions of the security test cases.
[0098] Based on any of the above embodiments, after writing the design code, the method further includes: Check whether the design code meets the coding specification requirements; Based on potential risk points, identify whether the design code has security vulnerabilities.
[0099] Based on any of the above embodiments, it also includes: Simulate attack scenarios in a test environment based on potential risk points; Run the design code in a test environment that simulates an attack scenario, and determine whether the design code has security vulnerabilities based on the running situation.
[0100] Based on any of the above embodiments and based on the verification results, optimizing the design code includes: When the verification result indicates that the design code has a security vulnerability, the design code is optimized based on the security vulnerability analysis report.
[0101] Based on any of the above embodiments, based on the verification results, optimizing the design code, and then further comprising: Run the optimized design code; The running status is monitored, and based on the running status, it is determined whether the optimized design code has security vulnerabilities.
[0102] Based on any of the above embodiments, it also includes: In the case that security vulnerabilities exist in the optimized design code, the security vulnerabilities are repaired based on historical security events.
[0103] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the software development method, which includes: based on the security requirements of the software to be developed, identifying the potential risk points of the software to be developed; generating security test cases covering the potential risk points; executing the security test cases in a test environment to verify the security of the design code corresponding to the software to be developed, the test environment being constructed based on the design code; and optimizing the design code based on the verification result.
[0104] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0105] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the software development method provided by the above methods, which includes: based on the security requirements of the software to be developed, identifying potential risk points of the software to be developed; generating security test cases covering the potential risk points; executing the security test cases in a test environment to verify the security of the design code corresponding to the software to be developed, and the test environment is constructed based on the design code; based on the verification results, optimizing the design code.
[0106] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the software development method provided by the above-mentioned methods, the method comprising: identifying potential risk points of the software to be developed based on the security requirements of the software to be developed; generating security test cases covering the potential risk points; executing the security test cases in a test environment to verify the security of the design code corresponding to the software to be developed, the test environment being constructed based on the design code; and optimizing the design code based on the verification results.
[0107] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0108] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0109] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A software development method, characterized in that: include: Based on the security requirements of the software to be developed, identify potential risk points of the software to be developed; Generate security test cases covering the potential risk points; Executing the security test case in a test environment to verify the security of the design code corresponding to the software to be developed, the test environment being constructed based on the design code; Based on the verification result, the design code is optimized.
2. The software development method according to claim 1, characterized in that: The design code is written based on the design file of the software to be developed and the security requirements; Before writing the design code, the method further includes: Based on the potential risk points, security vulnerabilities in the design documents are identified and repaired.
3. The software development method according to claim 2, characterized in that: The generating of security test cases covering the potential risk points includes: identifying sensitive information in said design documents; Under the data rules, based on the sensitive information, a security test case covering the potential risk points is generated, and the data rules are used to define at least one of the data format, verification logic and constraint conditions of the security test case.
4. The software development method according to claim 2, characterized in that: After writing the design code, the method further includes: Check whether the design code meets the coding specification requirements; Based on the potential risk points, identify whether the design code has security vulnerabilities.
5. The software development method according to any one of claims 1 to 4, characterized in that: The method further comprises: Based on the potential risk points, simulating attack scenarios in the test environment; In a test environment simulating the attack scenario, the design code is run, and based on the running situation, it is determined whether the design code has a security vulnerability.
6. The software development method according to any one of claims 1 to 4, characterized in that: The optimizing the design code based on the verification result includes: When the verification result indicates that the design code has a security vulnerability, the design code is optimized based on a security vulnerability analysis report.
7. The software development method according to any one of claims 1 to 4, characterized in that: The step of optimizing the design code based on the verification result further includes: Run the optimized design code; The operation status is monitored, and based on the operation status, it is determined whether the optimized design code has a security vulnerability.
8. The software development method according to claim 7, characterized in that: The method further comprises: In the case where security vulnerabilities exist in the optimized design code, the security vulnerabilities are repaired based on historical security events.
9. A software development device, characterized in that: include: An identification unit, used to identify potential risk points of the software to be developed based on the security requirements of the software to be developed; A generating unit, used to generate security test cases covering the potential risk points; A verification unit, configured to execute the security test case in a test environment to verify the security of the design code corresponding to the software to be developed, wherein the test environment is constructed based on the design code; The optimization unit is used to optimize the design code based on the verification result.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the software development method according to any one of claims 1 to 8 is implemented.
11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the software development method according to any one of claims 1 to 8 is implemented.
12. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the software development method according to any one of claims 1 to 8 is implemented.