Method for vulnerability analysis evaluation based on agent and deterministic verdict

By performing layered evidence exploration and deterministic verification on fixed-version code snapshots, combined with a rule engine and offline gold standard, the problems of feature fabrication and evaluation distortion in agent vulnerability analysis are solved, and the authenticity of vulnerability analysis and objective quantification of evaluation are achieved.

CN123139286APending Publication Date: 2026-11-20SHANGHAI YUYU INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611481933.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-09-22
Publication Date
2026-11-20

AI Technical Summary

Technical Problem

Existing agent-based vulnerability analysis methods are prone to feature fabrication during code analysis and lack independent and objective quantitative evaluation mechanisms, resulting in unreliable analysis results and distorted evaluation results.

Method used

By generating candidate identity identifiers, a permission-constrained agent is invoked to perform hierarchical evidence exploration on a fixed version code snapshot. A deterministic checksum and rule engine are used to generate four types of vulnerability accessibility adjudication results, which are then compared with the gold standard in an offline environment to build an independent evaluation report.

Benefits of technology

It achieves the authenticity of vulnerability analysis results and the objective quantification of evaluation, blocks the phenomenon of feature fabrication, avoids model feedback interference, and provides reproducible high-precision assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123139286A_ABST
    Figure CN123139286A_ABST
Patent Text Reader

Abstract

The application relates to the technical field of software information security, and discloses a vulnerability analysis and evaluation method based on agents and deterministic rulings, which acquires a fixed version code snapshot to be analyzed and a vulnerability candidate, generates a candidate identity bound with context information, calls an agent subject to permission constraints to perform hierarchical evidence exploration on the snapshot, extracts structured evidence without final judgment conclusions, then performs deterministic verification of the evidence, including source code reference and call edge continuity verification, inputs the verified evidence into a rule engine, calculates four types of discrete vulnerability accessibility ruling results according to priority conditions, and finally compares the ruling results with the structured evidence and an evaluation gold standard in an offline environment to generate an evaluation report. The application separates generative feature exploration from deterministic rule verification, blocks feature fabrication defects of the model, improves the accuracy of vulnerability judgment, and realizes objective and independent system performance quantification evaluation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of software information security technology, specifically to a vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making. Background Technology

[0002] As the complexity of the software supply chain increases, code composition analysis and vulnerability accessibility analysis have become crucial aspects of ensuring software information security. In recent years, intelligent agent technology based on large language models has been gradually introduced into code auditing and vulnerability feature retrieval tasks, aiming to improve the efficiency of code parsing by combining natural language processing capabilities.

[0003] Existing agent-based vulnerability analysis methods have limitations in practical applications. Large language models exhibit probabilistic characteristics during text generation, lacking deterministic rule constraints when handling complex code topological relationships. This underlying mechanism makes agents prone to fictitious code segments or physical coordinate offsets when retrieving code features. Existing technical solutions typically allow agents to directly output qualitative vulnerability reachability judgments, but the actual triggering of vulnerabilities essentially depends on the connectivity of program control flow and data flow. Directly relying on probabilistic models for logical decisions can lead to judgment biases, resulting in unreliable overall analysis results.

[0004] Furthermore, in evaluating the performance of vulnerability analysis systems, existing evaluation mechanisms struggle to avoid interference from the model's own feedback. Conventional vulnerability verification typically uses publicly available vulnerability ID datasets, which risk being absorbed by the model's pre-training corpus, turning the testing process into a mere memory retrieval and distorting the evaluation results. Simultaneously, existing automated evaluation schemes fail to establish contamination-free offline isolation environments when constructing test standards and lack targeted verification settings for the system's anti-interference capabilities. This situation prevents existing evaluation systems from objectively quantifying the feature fictitiousness rate of agents in real-world code environments, making it difficult to provide reproducible, independent, and accurate system performance evaluation reports. Summary of the Invention

[0005] To address the shortcomings of existing technologies, this invention provides a vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making. This method solves the problems that existing intelligent agents are prone to feature fabrication when performing code vulnerability analysis, leading to unreliable reachability determination results, and lack an independent and objective quantitative evaluation mechanism that can be free from model feedback interference.

[0006] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making, comprising the following steps: Obtain a fixed-version code snapshot and vulnerability candidates to be analyzed. Generate candidate identity identifiers based on the vulnerability identifier, component name, component version, and package address contained in the vulnerability candidates. Bind the pre-acquired vulnerability context information to the candidate identity identifiers. The vulnerability context information includes the affected application programming interfaces.

[0007] The authorized agent is invoked to perform hierarchical evidence exploration only on a fixed version of the code snapshot, and obtains the structured evidence output by the agent that is bound to the candidate identity. The structured evidence does not contain the final vulnerability reachability decision.

[0008] Perform deterministic verification of structured evidence independent of the agent. Deterministic verification includes at least source code reference verification and call edge continuity verification.

[0009] The structured evidence that has passed deterministic verification is input into the preset rule engine, which generates vulnerability accessibility adjudication results in four categories based on priority conditions.

[0010] The vulnerability accessibility rulings and structured evidence are compared with the gold standard for evaluation pre-set in the offline judgment environment to generate an evaluation report that includes the acceptable ruling pass rate and evidence verification status.

[0011] In a specific embodiment of the present invention, the step of generating candidate identity identifiers based on vulnerability candidates specifically includes: A unique candidate identity is generated by concatenating and hashing the vulnerability identifier, component name, component version, and package address using a preset hash algorithm.

[0012] The underlying technology is that a single vulnerability identifier or component name cannot accurately locate the affected physical node in a complex software supply chain dependency tree. By using the above four basic data dimensions as calculation parameters for multi-dimensional combination constraints, the physical correlation of a specific dependency node can be uniquely locked, eliminating early warning interference caused by the crossover of multiple data sources.

[0013] In the step of performing layered evidence exploration, the system schedules vulnerability candidates in batches according to component relationships, and creates mutually isolated agent running instances for each batch; Set a maximum computing resource threshold for agent runtime instances and read-only access permissions for fixed version code snapshots, and control agent runtime instances to perform hierarchical evidence exploration on fixed version code snapshots.

[0014] The principle behind this design is to cut off the physical path for modifying the original code of the model from the underlying file system, while avoiding memory overflow and context confusion caused by concurrent retrieval in a dense dependency graph.

[0015] In the above-mentioned tiered evidence exploration mechanism, the exploration levels include, in order: Component existence, dependencies, existence of vulnerable code, usage of affected application programming interfaces, call points, call paths, external entry points, triggering conditions, and mitigation measures.

[0016] The structured evidence output by the agent includes the relative source code path, line number range, code symbols, and call path list corresponding to each exploration level.

[0017] This design transforms unstructured natural language text into a discrete set of physical feature coordinates through a mandatory structured data paradigm encapsulation mechanism, and uses truncation operations to limit the model's scope to the level of objective feature extraction, thereby eliminating the uncertainty caused by the model's subjective inference.

[0018] To eliminate feature fabrication caused by generative mechanisms, the specific steps for performing deterministic verification of structured evidence without relying on the agent include: The source code relative paths and line number ranges contained in the structured evidence are retrieved from the fixed version code snapshot to verify the consistency between the code symbols contained in the structured evidence and the actual code content, thereby completing the source code reference verification. For any call path in the call path list contained in the structured evidence, based on the abstract syntax tree and cross-module call graph constructed from the fixed version code snapshot, it is verified whether there are real control flow edges or data flow dispatch edges between any adjacent nodes in the call path. When the entry, caller, callee and target symbols in the call path are continuous and consistent in the fixed version code snapshot, the call path is determined to be continuous and complete, thereby completing the call edge continuity verification.

[0019] This verification process does not rely on semantic similarity calculation, but rather on the principle of directed graph connectivity and matching with determined code characters to intercept fictitious links and forged features.

[0020] If any of the following issues occur in the structured evidence: missing results, invalid fields, inconsistent source code references, broken call edge continuity checks, or contradictory declaration logic, the system will retain the underlying error stack log that caused the exception and mark the corresponding vulnerability candidate's verification status as failing the deterministic verification.

[0021] In the step of generating vulnerability reachability adjudication results categorized into four types, the rule engine performs multi-level drill-down priority condition determination based on the fault tolerance principle of security system failure safety: A decision result of no reachability evidence is generated when any of the following conditions are met: the component does not exist, the vulnerable version does not exist, the mitigation measures have been confirmed to block or the affected application programming interface is not used and the search scope is complete. When the affected application programming interface is confirmed to be in use, and the complete call path, external entry point, and triggering conditions are continuously verified, a reachable adjudication result is generated; When the affected application programming interface is confirmed to be in use, and at least one of the complete call path, external entry point, or triggering condition is not fully verified, a potentially reachable adjudication result is generated. An indeterminate decision result is generated if any of the following conditions are met: the deterministic validation fails, the affected application programming interface is in an unknown state, or the affected application programming interface is not used and the search scope is incomplete.

[0022] By using state machine transitions and Boolean algebra operations, complex business logic decisions are transformed into standardized discrete conclusion outputs.

[0023] To ensure the objectivity of system performance quantification, the process of setting up a fixed version of the code snapshot to be analyzed and the gold standard for evaluation includes: Based on preset counterfactual variants, an independent set of evaluation snapshots is constructed in the offline judgment environment. The preset counterfactual variants include unused components, secure application programming interfaces only, direct calls, indirect calls via external entry points, test calls only, patch versions, and dynamic uncertainties. For any evaluation snapshot in the evaluation snapshot set, statically write the gold standard evidence ladder and main ruling generated by the evaluation set generator based on the known source code structure as candidates for the gold standard evaluation; The offline run decision maker performs build and test decisions on the evaluation snapshot, and monitors whether the expected execution flags appear or are prohibited.

[0024] If the dynamic monitoring results are consistent with the main decision in the gold standard candidate, then they are respectively confirmed as the fixed version code snapshot and the gold standard. This verification mechanism ensures that the evaluation data source is independent of the agent output, avoiding sample contamination by the model.

[0025] In addition, the above setup process also includes a decoy feature injection step to address biases in agent feature extraction: When generating evaluation snapshots, inject decoy features with the same name as the affected application programming interface into non-execution paths or comment text; In the comparison step, it checks whether the list of call paths contained in the structured evidence contains decoy features. If it does, the decoy evidence hit is recorded in the evaluation report.

[0026] Finally, by comparing the vulnerability accessibility ruling with the main ruling recorded in the evaluation gold standard, and verifying the consistency between the source code relative path, line number range, code symbols, and content summary in the structured evidence and the evidence citations in the evaluation gold standard, the system calculates the acceptable ruling pass rate and the evidence layer accuracy corresponding to each exploration level, and writes them into the evaluation report, thereby achieving a reproducible and highly accurate quantitative evaluation of the vulnerability analysis method.

[0027] This invention provides a vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making. It has the following beneficial effects: 1. This invention calls an authorized agent to output only non-conclusive structured evidence, and uses an independent verification engine to perform source code reference verification and call edge continuity verification on the evidence, thereby blocking the feature fabrication phenomenon caused by the lack of logical constraints in generative language models and ensuring the authenticity of the underlying data links in the vulnerability analysis process.

[0028] 2. Because the present invention adopts a judgment mechanism that inputs the structured verification results into the preset rule engine and performs multi-priority logical operations according to the system fault tolerance principle, it can objectively map the complex program call topology into four types of standard discrete adjudication results, thus avoiding the subjective judgment bias and omission risk caused by directly relying on the model to generate fuzzy conclusions.

[0029] 3. This invention constructs an evaluation snapshot with injected decoy features based on counterfactual variants in an independent environment, and uses an offline decision-maker to independently generate an evaluation gold standard that is not contaminated by the agent's output. This allows the comparison and verification of the analysis results to be free from the interference of the model's own feedback, thereby constructing a reproducible evaluation mechanism that can objectively quantify the anti-counterfeiting capability and accuracy of the system. Attached Figure Description

[0030] Figure 1 This is the main flowchart of the method of the present invention; Figure 2 This is a logical block diagram of the overall architecture of the vulnerability analysis and evaluation system of the present invention; Figure 3 This is a flowchart illustrating the candidate identity generation and vulnerability context binding process of the present invention. Figure 4 This is a schematic diagram illustrating the principle of the agent-based hierarchical evidence exploration and structured data encapsulation of the present invention. Figure 5 This is the logic diagram for the deterministic verification and call edge continuity verification of the present invention; Figure 6 This is the multi-priority state transition diagram of the rule engine of the present invention; Figure 7 This is a flowchart illustrating the offline evaluation environment data flow and gold standard comparison of the present invention. Detailed Implementation

[0031] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0032] See attached document Figure 1 When intelligent agents based on large language models directly process code analysis tasks, they are prone to output biases such as fabricated code fragments due to the lack of deterministic logical constraints.

[0033] To address the aforementioned issues, this embodiment presents a hardware and software system architecture that isolates generative feature exploration from deterministic rule verification.

[0034] See attached document Figure 2 The system architecture is logically divided into a task scheduling module, an agent isolation operating environment, a deterministic verification and adjudication engine, and an offline evaluation environment.

[0035] The task scheduling module is configured to receive external input data and perform identifier conversion.

[0036] The agent-isolated runtime environment is built on a containerized operating system and is used to perform code feature retrieval and extraction under restricted conditions.

[0037] The deterministic verification and adjudication engine integrates a code static analysis tool stack and rule logic gates to independently perform verification and status output without model intervention. The offline evaluation environment has an independently deployed code building framework to host benchmark comparison tasks.

[0038] Based on the physical and logical boundary division of the above system architecture, the vulnerability analysis and evaluation method based on intelligent agents and deterministic adjudication in this embodiment consists of the following steps S101-S105, which constitute the macroscopic workflow.

[0039] S101: Obtain a fixed version code snapshot and vulnerability candidates to be analyzed. Generate candidate identity identifiers based on the vulnerability identifier, component name, component version, and package address contained in the vulnerability candidates. Bind the pre-obtained vulnerability context information to the candidate identity identifiers. The vulnerability context information includes the affected application programming interfaces.

[0040] As a preferred approach, the system needs to align the working conditions of multi-source data before performing analysis. Fixed-version code snapshots are represented as read-only code repository states pointing to specific commit nodes and summaries, thereby ensuring the structural determinism of the analysis object throughout the system's lifecycle.

[0041] The selection of vulnerability identifier, component name, component version, and package address as calculation parameters is based on the fact that these four dimensions can uniquely anchor the relevance of specific dependent nodes in the software supply chain.

[0042] The task scheduling module performs transformation calculations on the acquired multi-dimensional input features to generate globally unique candidate identity identifiers.

[0043] This identifier serves as the unique index for data flow within the system. The system establishes a mapping relationship between the pre-acquired vulnerability context information and this identifier through an in-memory database, thereby ensuring that subsequent analysis processes are all based on the aligned time slices and context environment.

[0044] S102, invoke the authorized agent to perform hierarchical evidence exploration only on a fixed version code snapshot, and obtain the structured evidence output by the agent that is bound to the candidate identity identifier. The structured evidence does not contain the final vulnerability reachability decision.

[0045] Based on the established context mapping, the system launches the model instance within the agent-isolated runtime environment according to the set constraint policies. To cut off external sources of contamination and control computational load, the system strips the instance of read and write permissions to external data sources, allowing it to parse fixed-version code snapshots only in read-only mode.

[0046] The agent extracts code fragments and associated features step by step according to the system's preset exploration levels, and assembles the extracted results into a machine-readable structured evidence set.

[0047] It should be noted that the system program performs text verification on the structured evidence, truncating any statements with reachability qualitative judgments that the agent attempts to output beyond its authority, thus limiting the agent's function to the scope of feature extraction.

[0048] S103, Perform deterministic verification of structured evidence without the agent. The deterministic verification includes at least source code reference verification and call edge continuity verification.

[0049] After feature extraction is completed, in order to identify and eliminate erroneous references caused by the generative mechanism, the deterministic verification and adjudication engine takes over the data stream.

[0050] In a static code analysis environment where AI models are completely excluded, the system reads the field content of structured evidence.

[0051] The system utilizes deterministic code parsing components to perform precise character traversal and graph node tracing in fixed-version code snapshots to verify whether the declaration features in the structured evidence exist continuously in the current code entity.

[0052] S104 inputs the structured evidence that has passed deterministic verification into the preset rule engine, and generates vulnerability accessibility adjudication results divided into four categories based on priority conditions.

[0053] After passing the code-level verification described above, the structured evidence is converted into a series of defined logical state parameters.

[0054] Because vulnerability reachability involves complex component call topologies, the system's judgment process does not rely on the hit status of a single code node, but is based on a combination of multi-dimensional logical state parameters.

[0055] In this embodiment, the rule engine loads logical state parameters according to the fault tolerance mechanism set by the system security settings, and triggers the built-in condition judgment logic gate to perform state transition.

[0056] The system finally outputs the encoded conclusion, which is limited to the output set consisting of four discrete decision types.

[0057] S105 generates counterfactual consumption items and code snapshots according to preset variants based on the vulnerability announcement. The evaluation set generator writes the gold standard evidence ladder and main ruling. After running the executable decision-maker to verify the gold standard in the offline environment, the vulnerability reachability ruling results and structured evidence are compared with the evaluation gold standard to generate an evaluation report containing the acceptable ruling pass rate and evidence verification status.

[0058] In order to objectively measure the analytical performance without being disturbed by the model's own feedback, the system introduces the data feature set of the measured output into the offline evaluation environment.

[0059] The comparison program reads the gold standard for evaluation mounted in the offline judgment environment, performs comparative verification on the adjudication results and structured evidence, verifies the file path, line number, symbols and content summary of the actual evidence, identifies the hit status of fictitious evidence and decoy evidence, and derives an evaluation report for assessing the effectiveness of the analysis and the accuracy of feature extraction.

[0060] In this embodiment, in a further specific implementation, for the aforementioned step S101, the system establishes a unique analysis object anchor point to eliminate the warning cross-interference caused by upstream multi-source scanning tools.

[0061] See attached document Figure 3 The above step S101 specifically includes the following sub-steps S1011-S1013.

[0062] S1011, the task scheduling module obtains a snapshot of the fixed version code corresponding to the project to be analyzed through the business interface, and parses out the vulnerability candidates.

[0063] To ensure the validity of subsequent feature concatenation and the spatiotemporal consistency of the data, the task scheduling module performs null value verification and working condition alignment operations after acquiring the data, eliminating invalid inputs with missing information.

[0064] After verification, the data structure payload of the vulnerability candidate contains four independent basic data dimensions: vulnerability identifier, component name, component version, and package address.

[0065] S1012, the task scheduling module extracts the above four basic data dimensions, concatenates the features, and calls the preset hash algorithm to perform hash calculation to generate a unique candidate identity identifier.

[0066] As a preferred approach, since a single vulnerability identifier or component name cannot accurately locate the affected physical node in the software supply chain dependency tree, the system selects the above four dimensions as calculation parameters, aiming to lock the relevance of specific dependency nodes based on multi-dimensional combined constraints.

[0067] Specifically, the task scheduling module uses a preset character delimiter to concatenate the string values ​​of vulnerability identifier, component name, component version, and package address in a fixed order to form a basic feature string.

[0068] After obtaining the basic feature string, based on the general technical principle of eliminating data length differences and constructing anti-collision index by hash mapping, the system calls the hash algorithm to perform digest mapping on the basic feature string and outputs a hash value with a fixed number of bits as a candidate identity identifier.

[0069] The process of generating a unique candidate identity is achieved through the following formula: ; in, Represents the generated candidate identity identifier; Represents the default hash algorithm; Represents a vulnerability identifier; Represents the component name; Represents the component version; Represents the packet address; This represents the string concatenation operator.

[0070] Furthermore, to balance system storage overhead with the requirement for collision resistance of identifiers, the data length threshold for hash values ​​is usually set to 256 bits.

[0071] S1013, Based on the unique index generated above, the system establishes a mapping index in the storage layer to bind the pre-acquired vulnerability context information to the generated candidate identity identifier.

[0072] The vulnerability context information is a set of attributes that are structured and synchronized from an external security vulnerability database, and this set of structured attributes specifically includes the affected application programming interface.

[0073] The system uses key-value pair mapping to attach the affected application programming interface as a context feature to the candidate identity.

[0074] The aforementioned data binding mechanism establishes a unified data benchmark for the subsequent feature extraction process, enabling isolated agents to retrieve the associated affected application programming interfaces based on the candidate identity identifier and use them as the endpoint for code graph traversal or call chain backtracking.

[0075] In this embodiment, based on the aforementioned bound candidate identity identifiers, the system completes data initialization and enters the specific feature acquisition stage. To control the uncontrollable risks inherent in pre-trained language models based on the Transformer architecture while extracting code features, the aforementioned step S102 constructs a restricted exploration mechanism, as shown in the appendix. Figure 4 This step specifically includes the following sub-steps S1021-S1023.

[0076] S1021, the system schedules vulnerability candidates in batches according to component relationships, and creates mutually isolated intelligent agent running instances for each batch.

[0077] Specifically, since large software projects typically contain dense dependency graphs, in order to prevent memory overflow and context confusion caused by concurrent retrieval, the task scheduling module groups and schedules vulnerability candidates according to the topological depth of the component tree.

[0078] Considering that cross-references between components are common in software engineering, in order to avoid the scheduling process from getting stuck in an infinite deadlock, the task scheduling module performs loop detection on the component relationships using a directed acyclic graph traversal algorithm before executing grouping, and forcibly blocks the detected circular dependency edges.

[0079] After completing the above scheduling instruction verification, the system allocates independent computing isolation spaces through containerization technology to create mutually isolated intelligent agent running instances.

[0080] Within this isolated space, the system sets a maximum computing resource threshold for the running instances of the intelligent agent and read-only access permissions for fixed version code snapshots.

[0081] The purpose of setting a maximum computing resource threshold is to limit the context length and execution cycle of model inference, so as to prevent it from getting stuck in infinite traversal in complex abstract syntax trees. Setting read-only access permissions for fixed version code snapshots cuts off the path to modifying the model or polluting the original code from the underlying file system.

[0082] S1022, In the configured isolated operating environment, the system control agent running instance performs hierarchical evidence exploration on a fixed version code snapshot.

[0083] The underlying inference core of the agent's running instance is driven by a pre-deployed large-scale natural language processing model.

[0084] To achieve accurate retrieval based on code features, the system, based on the current analysis context, concatenates the retrieval instructions at a specific level, text fragments of fixed-version code snapshots, and the bound affected application programming interfaces into an input word sequence after tokenization preprocessing, and feeds it into the input layer of the agent running instance.

[0085] As a preferred approach, in order to simulate the logical progression of human security auditors and reduce the probability of illusion in single reasoning, the exploration levels of the agent performing hierarchical evidence exploration are predefined in the system.

[0086] This exploration hierarchy includes, in order: Component existence, dependencies, existence of vulnerable code, usage of affected application programming interfaces, call points, call paths, external entry points, triggering conditions, and mitigation measures.

[0087] The agent running instance drills down layer by layer to perform feature retrieval according to the determined hierarchical order, and the retrieval result of the current level will be used as the pre-prompt word variable for the next model inference, dynamically updating the input word sequence.

[0088] Based on this hierarchical design, if the agent fails to find the corresponding code entity in the previous level, the system will directly terminate the subsequent exploration tasks of that batch and encapsulate the currently acquired incomplete features before transferring them to the deterministic verification stage.

[0089] S1023, After the intelligent agent runs the instance and completes the feature traversal, the system obtains the structured evidence output by the intelligent agent that is bound to the candidate identity identifier.

[0090] To meet the data parsing requirements of the subsequent deterministic verification module, the extracted code features need to be encapsulated into a discrete set of physical coordinates.

[0091] Specifically, the system constrains the intelligent agent's running instance to output retrieval results according to a preset data paradigm, so that the structured evidence specifically includes the source code relative path, line number range, code symbols, and call path list corresponding to each exploration level.

[0092] Based on the principle of data structure mapping, the system deserializes the text output by the intelligent agent's running instance through a preset structured parser. The generation process of the above-mentioned structured evidence and the relationships between its internal elements are expressed by the following set formula: ; in, A set of structured evidence generated by instances of intelligent agents in operation; This represents the total number of levels in the stratified evidence exploration. Combined with the nine predefined exploration levels in this embodiment, this detection depth constant... The value of is 9; Represents the current exploration level index; Representing the Explore the relative source code paths corresponding to the exploration levels in a fixed version code snapshot; Representing the Explore the row number range corresponding to the level; Representing the Explore the code symbols extracted at different levels; Representing the Explore the list of call paths extracted at each level; The union operator represents sets.

[0093] Through this set-based encapsulation operation, the system transforms unstructured code text into a set of discrete feature coordinates that can be verified.

[0094] Furthermore, given that generative models generally tend to directly output qualitative conclusions when dealing with logical problems, the system deploys an output interception mechanism during the process of acquiring structured evidence.

[0095] The system performs regular expression matching and semantic rule checks on structured evidence to ensure that the structured evidence does not contain the final vulnerability accessibility ruling.

[0096] The aforementioned truncation operation restricts the scope of the agent's running instance to the level of physical feature extraction of objective feature information, thereby eliminating the uncertainty brought about by the model's subjective inference, and thus establishing the necessary preconditions for subsequent execution of independent and deterministic rule decisions.

[0097] In this embodiment, although the system has obtained the structured evidence output by the aforementioned agent running instance, due to the inherent probabilistic characteristics of the autoregressive language model in the decoding stage, the structured evidence is often accompanied by problems such as fictitious code features or physical coordinate offset.

[0098] Based on the aforementioned technical challenges, in order to identify and eliminate erroneous features caused by generative mechanisms, the aforementioned step S103 constructs a verification environment that completely cuts off model inference intervention.

[0099] See attached document Figure 5 The above step S103 specifically includes the following sub-steps S1031-S1033.

[0100] S1031, the deterministic verification and adjudication engine takes over the structured evidence generated above and independently performs source code reference verification on the data at each level within the structured evidence.

[0101] Specifically, for any exploration-level feature item contained in the structured evidence, the system analyzes and extracts its associated source code relative path and line number range.

[0102] Based on the extracted physical coordinate parameters, the system reads the code text slices at the corresponding locations in the original file system of the fixed version code snapshot through the underlying file input / output interface.

[0103] In actual operation, if a path resolution error or file system read failure occurs, the system is set to directly return an empty slice and trigger an error flag.

[0104] For the successfully read original text slices, the system performs lexical analysis to verify the consistency between the code symbols contained in the structured evidence and the actual code content.

[0105] This consistency verification does not rely on probabilistic semantic similarity calculations, but instead employs exact string matching logic.

[0106] Through this precise matching mechanism, the system can detect and intercept feature forgery issues where agents fabricate undefined code variables or methods.

[0107] S1032, after confirming that the code symbols actually exist at the file level, the deterministic verification and adjudication engine further performs call edge continuity verification on the structured evidence.

[0108] Since the core of the vulnerability lies in the topological reachability of the execution flow, the system needs to verify whether the call chain output by the agent is truly connected within the program execution space.

[0109] To achieve this goal, as a preferred approach, the system utilizes a static code analysis component to pre-build a complete abstract syntax tree and cross-module call graph based on a fixed version of the code snapshot.

[0110] Based on the cross-module call graph constructed above, the system extracts a list of call paths contained in the structured evidence.

[0111] For any call path in the list consisting of consecutive code nodes, the system converts it into a directed graph traversal sequence and uses a graph node tracing algorithm to verify whether there are real control flow edges or data flow dispatch edges between any adjacent nodes in the call path.

[0112] The aforementioned edge continuity verification process is based on the principle of directed graph connectivity, that is, it confirms the overall connectivity of the link by verifying the reachability of each pair of adjacent nodes in the path set within the graph theory model. This verification process is specifically implemented through the following logical judgment formula: ; in, The parameter represents the continuity verification result of the current call path. Its value is a boolean, that is, it can be true or false. This represents the total number of code nodes contained in the call path, and its value is a positive integer greater than or equal to 2. and These represent the index values ​​in the call path, respectively. and Two adjacent code nodes; This represents the set of control flow edges in the cross-module call graph, which reflects the explicit direct function call relationships in the program source code. This represents the set of data flow dispatch edges in the cross-module call graph, which reflects the polymorphic inheritance dispatch or callback function mapping relationship in object-oriented programming. Represents the logical AND operator; This represents the union operator for sets.

[0113] The system traverses all node gaps in the call path based on the above logical discrimination formula.

[0114] Specifically, before the algorithm logic is executed, the system will check the total number of nodes. Conduct boundary verification.

[0115] To handle special triggering conditions under different code architectures. Specifically, when a triggering condition is detected... When this occurs, it indicates that the extracted path features are an empty set. To avoid subsequent array out-of-bounds exceptions, the system directly deletes this set. The value assigned is false; When detected When this condition occurs, it indicates that the current code is a direct entry point vulnerability, meaning that externally controllable parameters directly trigger dangerous operations within the current entry function body without the need for cross-function execution flow transmission. In this scenario, the system directly sets its continuity check status to true through independent branch logic.

[0116] For detected The call chain, i.e. the sequence of nodes that satisfy the cross-function traversal conditions, is used by the system to calculate the formula for the directed graph traversal sequence.

[0117] The system determines that the call path is continuous and complete if and only if the result of the logical judgment formula is true, that is, if the entry point, caller, callee and target symbol in the call path are continuous and consistent in the fixed version code snapshot.

[0118] Based on the computational characteristics of logic and operations, if there is any false connection in the call path, the verification status of the entire path will be marked as broken.

[0119] S1033, after performing the above deterministic verification detached from the intelligent agent, the system uniformly collects the verification status and performs global downgrade marking processing.

[0120] The system has pre-defined multi-dimensional exception capture logic to address verification anomalies caused by model illusions or parsing failures.

[0121] If, during the state aggregation process, the system detects any of the following in the structured evidence: missing results, invalid fields, inconsistent source code references, broken call edge continuity checks, or contradictory declaration logic, then the exception interception routine will be triggered.

[0122] The system retains the underlying error stack logs that generated the anomalies for subsequent offline tracing, and marks the corresponding vulnerability candidates as failing the deterministic verification.

[0123] This defensive constraint design prevents invalid evidence containing forged features from flowing into subsequent judgment stages, providing a basic guarantee of data credibility for the entire vulnerability analysis and evaluation system.

[0124] In this embodiment, by performing the aforementioned deterministic verification detached from the intelligent agent, the system obtains cleaned structured evidence and eliminates erroneous features caused by model illusions.

[0125] For the final determination of vulnerability reachability, a single code feature hit state cannot be directly equated to the system's security level. Based on the combined consideration of multi-dimensional logical state parameters, the aforementioned step S104 constructs a multi-priority branch decision architecture to output standardized discrete conclusions.

[0126] See attached document Figure 6 The above step S104 specifically includes the following sub-steps S1041-S1044.

[0127] S1041, the system inputs the structured evidence that has undergone deterministic verification into the preset rule engine, extracts the various declaration states in the structured evidence, and maps them to the underlying Boolean logic state parameters.

[0128] Specifically, the mapping process described above is not an arbitrary state assignment, but rather corresponds to the verification feedback of each of the aforementioned exploration levels. For example, when the system fails to read a valid code snippet or returns a verification failure state in the preceding component existence level, the underlying state resolver will set the corresponding component non-existence flag to true.

[0129] Based on the above mapping mechanism, since complex business logic judgments require certain input factors, a state parser is deployed within the rule engine.

[0130] The state parser reads the verification results of the current vulnerability candidate at each exploration level and generates discrete flags such as interface usage status, component existence status, and link connectivity status.

[0131] The generation of the above logical state parameters establishes a standard computational benchmark for subsequent Boolean algebra operations, avoiding the technical defects of using natural language to make fuzzy decisions directly.

[0132] S1042 After obtaining the above logical state parameters, as a preferred method, the rule engine sets multi-level drill-down priority conditions based on the fault-tolerant design principle of the safety system failure safety.

[0133] Before performing numerical calculations, based on the general technical principles of Boolean logic control flow and state machine transitions, the system generates vulnerability accessibility adjudication results in four categories through conditional judgment logic gates according to the aforementioned priority conditions. These four categories are defined as accessible, potentially accessible, no evidence of accessibility, and uncertain.

[0134] The calculation process of the above multi-priority logical branches is mathematically expressed using the following piecewise Boolean function: ; in, This represents the final vulnerability accessibility ruling output by the rules engine; This represents an uncertain ruling; A ruling indicating the lack of evidence of accessibility; The outcome represents an attainable ruling; This represents a possible outcome of the ruling; This represents a status flag indicating that the aforementioned deterministic verification failed. This indicates that the aforementioned affected application programming interfaces are in an unknown state; A flag indicating that the affected application programming interface is not in use; A marker indicating a complete search scope; A flag indicating that the component does not exist; This flag indicates that the vulnerable version does not exist; This indicates that mitigation measures have been confirmed to have contained the virus. This indicates that the affected application programming interface has been confirmed for use. This is a flag indicating that the complete call path has been continuously verified; A sign indicating that the external entry point has been continuously verified; This indicates that the triggering condition has been continuously verified; Represents the logical OR operator; Represents the logical AND operator; This represents the logical NOT operator. All the input variables listed above can take Boolean values.

[0135] S1043, based on the definition of the above-mentioned piecewise Boolean function, the rule engine intercepts abnormal data in the highest priority branch.

[0136] When the system detects that an input variable fails a deterministic check, the affected application programming interface is in an unknown state, or the affected application programming interface is not used and the retrieval scope is incomplete, the rule engine outputs the indeterminate decision result.

[0137] The purpose of this design is to prevent the system from making any definitive security endorsements when the underlying analytical data is truncated or distorted, thereby preventing the risk of missed reports due to blind spots in the analysis.

[0138] Furthermore, after excluding outlier data, the rule engine filters blocking conditions in the second-highest priority branch. When the system detects that the input variable meets any of the following conditions: the component does not exist, the vulnerable version does not exist, the mitigation measures have been confirmed to block, or the affected application programming interface is not used and the search scope is complete, the rule engine outputs a ruling of no reachability evidence.

[0139] Based on the fundamental principles of software engineering, when the underlying operating environment supporting the triggering of vulnerabilities is missing or has been blocked by patches, subsequent execution flow analysis becomes meaningless. This branch design reduces the computational load of the system.

[0140] S1044, provided that the basic conditions for the vulnerability are met, the rule engine performs a refined downgrade judgment based on the specific call chain characteristics.

[0141] When the system detects that the affected application programming interface has been confirmed to be used, and the complete call path, external entry point, and triggering conditions have all been continuously verified, the rule engine outputs the reachable adjudication result.

[0142] This status indicates that the system has captured a complete connection link from the externally controllable node to the affected function, indicating that the current system has a complete code-level triggering channel.

[0143] Conversely, when the affected application programming interface is confirmed to be in use, and at least one of the complete call path, external entry point, or triggering condition is not fully verified, the rules engine rolls back in sequence and outputs the possible achievable ruling result.

[0144] By setting this buffer judgment state, the system retains the ability to issue early warnings for complex situations where the call graph is broken or indirect calls cannot be statically parsed, prompting that subsequent analysis processes need to introduce manual review or dynamic debugging for final confirmation.

[0145] In this embodiment, based on the standardized vulnerability accessibility adjudication results output by the aforementioned multi-priority rule engine, in order to verify the reliability of the entire agent analysis chain and quantify the deviations in the model generation process, the system further introduces a performance evaluation mechanism.

[0146] To provide a reproducible evaluation set that complements the analysis process and avoid the problem of the true value being affected by the model output due to manual sampling or direct use of the vulnerability number list, the aforementioned step S105 constructs an anti-pollution offline gold standard evaluation dataset and index comparison system.

[0147] See attached document Figure 7 The above step S105 specifically includes the following sub-steps S1051-S1053.

[0148] S1051, the system generates independent consumer items and code snapshots based on vulnerability announcements and preset counterfactual variants, and constructs an evaluation dataset.

[0149] Specifically, the base evaluation set generates at least seven variants for each vulnerability family: The component is unused, only a secure application programming interface is used, it is called directly, it is called indirectly through an external entry point, it is called only for testing, it is a patch version, and its dynamic nature is uncertain. Further extensions may include the first batch of extended variants that add multi-layered wrapper call chains, and the second batch of extended variants that cover independent challenges such as transitive module dependencies, path-sensitive conditions, build tag constraints, dispatch relationships, and decoy references.

[0150] Each sample has a fixed snapshot summary and vulnerability candidate inputs. The gold standard is written by the evaluation set generator based on the known source code structure, rather than by manual analysis and annotation, thus ensuring that the gold standard does not originate from the agent's output and is not rewritten by it.

[0151] S1052, within the aforementioned isolated environment, the offline run decision maker verifies the gold standard through construction or testing.

[0152] Specifically, the offline decision maker performs build and test decisions, checks whether expected execution flags appear or are prohibited, and verifies the fixed code snapshot summary and gold standard evidence citations.

[0153] To address the issues of fictitiousness and bias in feature extraction by intelligent agents, the system specifically sets up decoy references in the above variants. This involves setting up safe local functions with the same names as the affected application programming interfaces, packages not referenced by production entry points, and fake references in comments or strings as decoy features. The evaluation set generator records the decoy's location, and only records it as a decoy evidence hit when the agent mistakenly uses the decoy as evidence of the affected application programming interface, call path, or external entry point. Identifying and eliminating decoys is not considered an error.

[0154] The agent can only read code snapshots to perform analysis and is isolated to prevent it from coming into contact with or contaminating the gold standard.

[0155] S1053, the system uses an evaluation comparator to further open the sample snapshot, compare the actual ruling with the main ruling in the gold standard, and verify the consistency of the file path, line number, symbols, and content summary of the actual structured evidence.

[0156] The system calculates and outputs evaluation indicators based on the comparison results. The evaluation indicators include the acceptable ruling pass rate, the accuracy rate of each layer of evidence, the number of dangerous missed judgments, the number of fabricated evidence, and the number of decoy evidence hits.

[0157] When setting different input contracts or different agent versions, all trials use the same evaluation sample identifier and the same code snapshot, and output the metric difference relative to the baseline.

[0158] This independent evaluation system, based on preset variants, generator gold standards, and offline decision-makers, establishes a fair and reproducible verification mechanism, ensuring that the vulnerability accessibility analysis system can still be objectively and accurately quantified after the introduction of intelligent agents.

Claims

1. A vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making, characterized in that, Includes the following steps: Obtain a fixed version code snapshot and vulnerability candidates to be analyzed. Generate candidate identity identifiers based on the vulnerability identifier, component name, component version and package address contained in the vulnerability candidates. Bind the pre-acquired vulnerability context information to the candidate identity identifiers. The vulnerability context information includes the affected application programming interface. The authorized agent is invoked to perform hierarchical evidence exploration only on the fixed version code snapshot, and obtain the structured evidence output by the agent that is bound to the candidate identity. The structured evidence does not contain the final vulnerability reachability decision result. Perform deterministic verification detached from the agent on the structured evidence, the deterministic verification including at least source code reference verification and call edge continuity verification; The structured evidence that has passed the deterministic verification is input into a preset rule engine, which generates vulnerability accessibility adjudication results in four categories based on priority conditions. The vulnerability accessibility ruling and the structured evidence are compared with the gold standard for evaluation pre-set in the offline judgment environment to generate an evaluation report that includes the acceptable ruling pass rate and the evidence verification status.

2. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 1, characterized in that, The step of generating candidate identity identifiers based on the vulnerability identifier, component name, component version, and package address included in the vulnerability candidates includes: The vulnerability identifier, component name, component version, and package address are concatenated and hashed using a preset hash algorithm to generate a unique candidate identity identifier.

3. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 1, characterized in that, The invoked, permission-constrained agent performs hierarchical evidence exploration only on the fixed-version code snapshot, including: The vulnerability candidates are scheduled in batches according to their component relationships, and isolated agent running instances are created for each batch. Set a maximum computing resource threshold and read-only access permissions for the fixed version code snapshot for the agent running instance, and control the agent running instance to perform the hierarchical evidence exploration on the fixed version code snapshot.

4. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 1, characterized in that, The exploration levels of the layered evidence exploration are as follows: component existence, dependency relationship, existence of vulnerable code, usage of the affected application programming interface, call point, call path, external entry point, triggering condition, and mitigation measures; The structured evidence includes the relative source code paths, line number ranges, code symbols, and call path lists corresponding to each exploration level.

5. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 4, characterized in that, The determination of the structured evidence, detached from the agent, includes: The source code reference verification involves retrieving the relative path and line number range of the source code contained in the structured evidence from the fixed version code snapshot, and verifying the consistency between the code symbols contained in the structured evidence and the actual code content. The call edge continuity verification is as follows: For any call path in the call path list included in the structured evidence, based on the abstract syntax tree and cross-module call graph constructed from the fixed version code snapshot, it is verified whether there is a real control flow edge or data flow dispatch edge between any adjacent nodes in the call path; when the entry point, caller, callee, and target symbol in the call path are continuous and consistent in the fixed version code snapshot, the call path is determined to be continuous and complete.

6. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 5, characterized in that, After performing deterministic verification detached from the agent on the structured evidence, the method further includes: If the structured evidence has any of the following issues: missing results, invalid fields, inconsistent source code reference verification, broken call edge continuity verification, or contradictory declaration logic, then the underlying error stack log that caused the exception will be retained, and the corresponding vulnerability candidate will be marked as failing the deterministic verification.

7. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 6, characterized in that, The vulnerability accessibility determination results, categorized into four types, include accessible, potentially accessible, no evidence of accessibility, and uncertain; the generation of vulnerability accessibility determination results categorized into four types based on priority conditions includes: The decision result of the unreachability evidence is generated when any one of the following conditions is met: the component does not exist, the vulnerable version does not exist, the mitigation measures have been confirmed to block it, or the affected application programming interface is not used and the search scope is complete. When the affected application programming interface is confirmed to be in use, and the complete call path, external entry point, and triggering conditions are all continuously verified, the reachable adjudication result is generated. When the affected application programming interface is confirmed to be in use, and at least one of the complete call path, external entry point, or triggering condition is not fully verified, the potentially reachable adjudication result is generated. An indeterminate decision result is generated when any one of the following conditions is met: the deterministic verification fails, the affected application programming interface is in an unknown state, or the affected application programming interface is not used and the search scope is incomplete.

8. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 7, characterized in that, The fixed-version code snapshot to be analyzed and the evaluation gold standard are generated through the following setup process: Based on preset counterfactual variants, an independent set of evaluation snapshots is constructed in the offline judgment environment. The preset counterfactual variants include unused components, secure application programming interfaces only, direct calls, indirect calls via external entry points, test calls only, patched versions, and dynamic uncertainties. For any evaluation snapshot in the evaluation snapshot set, the gold standard evidence ladder and main ruling generated by the evaluation set generator based on the known source code structure are statically written as candidates for the gold standard evaluation. The evaluation snapshot is subjected to build and test determinations by an offline run decision-maker, and the expected execution flag is monitored to see whether it appears or is prohibited from appearing. If the dynamic monitoring results are consistent with the main decision in the gold standard candidate, then the evaluation snapshot will be used as the fixed version code snapshot to be analyzed, and the gold standard candidate will be used as the gold standard.

9. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 8, characterized in that, The setup process also includes a decoy feature injection step: When generating the evaluation snapshot, a decoy feature with the same name as the affected application programming interface is injected into the non-execution path or comment text; In the step of comparing the vulnerability accessibility determination result and the structured evidence with the evaluation gold standard set in the offline determination environment, it is detected whether the call path list contained in the structured evidence contains the decoy feature. If the decoy features are included, then the decoy evidence hit is recorded in the evaluation report.

10. The vulnerability analysis and evaluation method based on intelligent agents and deterministic decision-making according to claim 8, characterized in that, The step of comparing the vulnerability accessibility determination result and the structured evidence with the evaluation gold standard pre-set in the offline judgment environment includes: Compare the vulnerability accessibility ruling with the master ruling recorded in the gold standard evaluation; Verify the consistency between the relative source code paths, line number ranges, and code symbols in the structured evidence and the evidence references in the gold standard evaluation criteria; The acceptable decision pass rate and the evidence layer accuracy rate corresponding to each exploration level are calculated based on the comparison and verification results, and written into the evaluation report.