Problem library-based multi-source static analysis tool chain collaborative coding detection method
By building a problem database and a multi-source static analysis toolchain with custom rules, the problems of duplicate alarms and detection blind spots in multi-source static analysis tools have been solved, achieving efficient and accurate detection and prevention of coding defects, and improving detection efficiency and fault prevention capabilities.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- INNOVATION ACAD FOR MICROSATELLITES OF CAS
- Filing Date
- 2025-12-09
- Publication Date
- 2026-05-12
AI Technical Summary
Existing multi-source static analysis tools suffer from problems such as repeated alarms, detection blind spots, high resource consumption, and low return on investment, making it difficult to efficiently detect and prevent coding defects.
Build a multi-source static analysis toolchain based on a problem database. By collecting, classifying and standardizing real code defect cases, develop dedicated detection rules, formulate collaborative detection strategies, and seamlessly integrate with the CI/CD process to achieve dynamic updates.
It increases the defect detection rate by more than 60%, reduces static analysis time by 40%, and realizes the transformation from post-event zeroing to pre-event prevention, thereby reducing the failure rate.
Smart Images

Figure CN122019332A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of aerospace software testing, specifically to a collaborative coding detection method based on a multi-source static analysis toolchain with a problem database. It is applicable to the detection and prevention of coding defects in high-reliability software, and is particularly suitable for fields with extremely high code quality requirements, such as aerospace, military, and embedded systems. Background Technology
[0002] The tools are silos: the rule bases of various static analysis tools (such as LDRA Testbed, Coverity, etc.) overlap, resulting in duplicate alarms, redundant reports, and a large workload for engineers to identify.
[0003] There are blind spots in the detection: the general rule base cannot cover the unique defects of specific business scenarios and architectures.
[0004] Resource input and output mismatch: The full toolchain scanning mode is time-consuming and labor-intensive, with a low input-output ratio. Summary of the Invention
[0005] To address the problems of existing technologies, this invention provides a collaborative coding detection method based on a problem database and a multi-source static analysis toolchain. This method solves the problems of low collaborative efficiency, numerous detection blind spots, and high resource consumption associated with multi-source static analysis tools, enabling early, accurate, and efficient detection and prevention of coding defects. It improves defect detection rate and early discovery capabilities; reduces duplicate alarms and increases analysis efficiency; covers specific defects and reduces failure rates; and forms a continuous quality improvement loop.
[0006] The technical solution of this invention is: a multi-source static analysis toolchain collaborative coding detection method based on a problem database, the specific steps of which are as follows:
[0007] Step 1: Construct a database of typical software coding problems: Collect, classify, and standardize real code defect cases through a regular collection and dynamic inclusion mechanism;
[0008] Step 2: Based on the problem library described in Step 1, establish a typical problem source code library as the input database for subsequent tool capability comparison experiments.
[0009] Step 3: Tool Capability Comparison Experiment: Based on the problem source code library described in Step 2, the detection rate, false alarm rate, and efficiency of each static analysis tool are evaluated horizontally.
[0010] Step 4: Custom rule development: Develop dedicated detection rules to address the blind spots of static analysis tools, forming a proprietary rule library that is then loaded into the static analysis tools;
[0011] Step 5: Develop a collaborative detection strategy for the toolchain: Define the scanning scope, execution order, and result merging rules for each static analysis tool;
[0012] Step Six: Integration and Continuous Improvement: Integrate the custom rules described in Step Four into the CI / CD process and establish a dynamic update mechanism for the issue database.
[0013] Furthermore, the specific detection rules described in step four include state machine transition defects and protection against unsigned number subtraction.
[0014] The beneficial effects of this invention are: it provides a collaborative coding detection method based on a multi-source static analysis toolchain using a problem database.
[0015] Structural advantages:
[0016] 1. Modular design: The issue database, issue source code database, rule database, and strategy module are independent yet work together, facilitating maintenance and expansion;
[0017] 2. Dynamic update mechanism: The issue database, issue source code database, and rule database support dynamic inclusion and review to adapt to new technologies and new defect patterns;
[0018] 3. Integrated Process: Seamlessly integrates with CI / CD processes to achieve automated testing.
[0019] Functional advantages:
[0020] 1. Defect detection rate increased by more than 60%;
[0021] 2. Static analysis time is reduced by approximately 40%;
[0022] 3. Achieve a shift from "resetting to zero" to "prevention before the event". Attached Figure Description
[0023] Figure 1 This is a flowchart of a collaborative coding detection method based on a multi-source static analysis toolchain with a problem database. Detailed Implementation
[0024] The present invention will now be further described with reference to the accompanying drawings.
[0025] like Figure 1 As shown, the multi-source static analysis toolchain-based collaborative coding detection method based on a problem database has the following specific steps:
[0026] Step 1: Construct a database of typical software coding problems: Collect, classify, and standardize real code defect cases through a regular collection and dynamic inclusion mechanism;
[0027] Step 2: Based on the problem library described in Step 1, establish a typical problem source code library as the input database for subsequent tool capability comparison experiments.
[0028] Step 3: Tool Capability Comparison Experiment: Based on the problem source code library described in Step 2, the detection rate, false alarm rate, and efficiency of each static analysis tool are evaluated horizontally.
[0029] Step 4: Custom rule development: Develop dedicated detection rules (such as state machine transition defects, unsigned number subtraction protection, etc.) to address the blind spots of static analysis tools, and load them into a dedicated rule library.
[0030] Step 5: Develop a collaborative detection strategy for the toolchain: Define the scanning scope, execution order, and result merging rules for each static analysis tool;
[0031] Step Six: Integration and Continuous Improvement: Integrate the custom rules described in Step Four into the CI / CD process and establish a dynamic update mechanism for the issue database.
[0032] In this embodiment, the problem database is used as a benchmark to drive tool evaluation and rule development: The problem database provides real defect samples, based on which a problem source code library is written, and a link is established between the typical problem database and the detection tools, so that the tool comparison is objective and the blind spots of general tools are identified.
[0033] Custom rules based on defect pattern matching: By analyzing typical defects in the issue database, extracting their code features, and writing rules to implement pattern matching, unique defects that cannot be detected by general tools can be covered.
[0034] Collaborative strategies are based on tool capability data: Based on the results of comparative experiments, tool scanning tasks are allocated reasonably to avoid duplication and improve efficiency.
[0035] The continuous integration mechanism enables closed-loop feedback: new issues are continuously added to the issue database through processes, driving the dynamic updating of rules and strategies, and forming a self-evolving detection system.
[0036] Example 1
[0037] In the satellite control software project: A state machine transition defect in a certain model's bus communication protocol was addressed by successfully detecting and preventing potential faults through custom rules, resulting in a decrease of over 60% in the number of faults in the test field.
[0038] Example 2
[0039] In a continuous integration environment: Each code commit triggers a collaborative detection process, quickly outputting a merged analysis report, allowing engineers to immediately locate and fix defects, significantly shortening the debugging cycle.
[0040] Example 3
[0041] During the initial phase of a new project: Directly reference the issue and rule bases to prevent similar errors from recurring and improve the baseline of code quality.
[0042] The above description is only a preferred embodiment of the present invention. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A multi-source static analysis toolchain collaborative coding detection method based on a problem database, characterized in that, The specific steps are as follows: Step 1: Construct a database of typical software coding problems: Collect, classify, and standardize real code defect cases through a regular collection and dynamic inclusion mechanism; Step 2: Based on the problem library described in Step 1, establish a typical problem source code library as the input database for subsequent tool capability comparison experiments. Step 3: Tool Capability Comparison Experiment: Based on the problem source code library described in Step 2, the detection rate, false alarm rate, and efficiency of each static analysis tool are evaluated horizontally. Step 4: Custom rule development: Develop dedicated detection rules to address the blind spots of static analysis tools, forming a proprietary rule library that is then loaded into the static analysis tools; Step 5: Develop a collaborative detection strategy for the toolchain: Define the scanning scope, execution order, and result merging rules for each static analysis tool; Step Six: Integration and Continuous Improvement: Integrate the custom rules described in Step Four into the CI / CD process and establish a dynamic update mechanism for the issue database.
2. The multi-source static analysis toolchain cooperative coding detection method based on a problem database according to claim 1, characterized in that: The specific detection rules described in step four include state machine transition defects and protection against unsigned number subtraction.