Zero-trust tool execution method based on a wasm micro-hypervisor and a federation interface agent
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- HANGZHOU TUBU ER TECHNOLOGY CO LTD
- Filing Date
- 2026-05-19
- Publication Date
- 2026-08-07
AI Technical Summary
然而,在实际部署中,工具代码往往运行于多租户、跨信任域的环境中,其执行过程涉及复杂的控制流跳转、频繁的对外接口访问以及动态的算力消耗,现有技术难以对其运行期行为进行持续、细粒度且可验证的安全约束
首先,本发明实现了对工具执行行为的全过程可验证控制,使控制流执行阶段、控制流跳转路径与执行状态之间形成确定的对应关系,避免了现有技术中仅依赖执行结果或单次校验而无法反映真实执行过程的问题,从而显著提升了工具执行过程的可验证性与可信度。
Smart Images

Figure CN122526705A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of zero-trust computing and zero-trust execution control technology, and in particular to a zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies. Background Technology
[0002] With the development of cloud computing, edge computing, and intelligent agent technologies, the dynamic invocation and remote execution of tool-level code in open environments has gradually become the norm. Lightweight execution technologies such as WebAssembly are widely used in function computing, plug-in services, and intelligent agent scenarios due to their cross-platform compatibility and high performance. However, in actual deployments, tool code often runs in multi-tenant, cross-trust domain environments. Its execution process involves complex control flow jumps, frequent access to external interfaces, and dynamic computing power consumption. Existing technologies struggle to provide continuous, fine-grained, and verifiable security constraints on its runtime behavior.
[0003] Existing execution security mechanisms mostly rely on static sandbox isolation, pre-configured permissions, or result-based log auditing. These methods typically focus on pre-execution permission verification or post-execution traceability, lacking effective characterization of the control flow evolution during execution. This makes it difficult to prevent issues such as control flow hijacking, unauthorized calls, and execution path tampering. Furthermore, some control flow integrity or remote verification technologies only verify a single execution path or the overall program state, failing to adapt to tool execution scenarios involving phased execution, dynamic branches, and multiple external interactions.
[0004] Furthermore, existing interface proxy and access control technologies typically exist as independent components, with their adjudication logic lacking a close connection to the actual control flow state of the program. Interface call results are unlikely to influence subsequent execution behavior, leading to a disconnect between interface governance and execution security. In addition, computing power quotas and resource governance are mostly based on static thresholds or coarse-grained statistics, lacking dynamic adjustment mechanisms integrated with execution behavior, making it difficult to form a zero-trust control loop that spans the entire execution lifecycle.
[0005] Therefore, how to provide a zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies is a problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0006] One objective of this invention is to propose a zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies. By introducing a phased control flow remote proof structure into the tool execution unit, the execution process of the WASM bytecode module is divided into phases, control flow jumps are collected and bound sequentially, enabling continuous remote proof of the control flow execution phases. This invention combines a security control parameter set, interface adjudication results, and actual instruction consumption statistics to dynamically update capability configuration and computing power consumption strategies during execution. It also generates deterministic execution control results through zero-trust evaluation processing, thereby implementing real-time constraints and scheduling on tool execution behavior. Simultaneously, the federated interface proxy binds interface calls to phased control flow proofs, ensuring that interface adjudication results are controlled by the current execution state. This method forms a closed-loop mechanism of control flow proof, parameter evolution, and execution control, improving the security, verifiability, and auditability of the tool execution process.
[0007] The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to embodiments of the present invention includes the following steps: Receive tool call requests from upper-layer intelligent agents, obtain the corresponding WASM bytecode modules, and construct a set of security control parameters; The execution environment orchestration task drives the transient WASM micro virtual machine engine to perform instantiation operations, builds tool execution units, loads WASM bytecode modules and builds static control flow structures, divides and processes the execution phases of the tool execution process, and obtains a set of control flow execution phases. The startup tool execution unit executes the WASM bytecode module, collects the actual control flow jump paths based on the control flow execution phase set, and processes them to obtain the phased control flow remote proof structure and actual instruction consumption statistics. When the tool execution unit triggers an external interface call, it pauses execution, extracts the phase control flow proof information, capability configuration and interface call description information and inputs them into the federated interface proxy, and performs joint verification processing to generate the interface adjudication result. Based on the phased control flow remote proof structure, interface adjudication results, and actual instruction consumption statistics, the updated security control parameter set is obtained. For the current control flow execution phase, perform zero-trust assessment processing to generate execution control results; After the tool finishes execution, the tool execution unit is destroyed, and the data is aggregated to generate a zero-trust audit log.
[0008] Optionally, the acquisition of the WASM bytecode module and the construction of the security control parameter set include: After receiving the tool call request from the upper-layer intelligent agent, the tool identifier in the tool call request is parsed, and the WASM bytecode module corresponding to the tool identifier is located. Based on the preset security policy, security policy matching processing is performed on the tool identifier and WASM bytecode module to generate initial capability configuration, computing power quota parameters and stage policy parameters, which constitute a set of security control parameters. Associate and encapsulate the security control parameter set with the WASM bytecode module; Write the associated encapsulated WASM bytecode module and security control parameter set into the execution environment orchestration task.
[0009] Optionally, the generation of the control flow execution phase set includes: The execution environment orchestration task triggers the transient WASM micro virtual machine engine to perform instantiation operations, creates a tool execution unit based on the WASM bytecode module, and allocates an independent linear memory space for the tool execution unit. After the tool execution unit is instantiated, the basic runtime library is loaded based on the copy-on-write memory snapshot mechanism and mapped to an independent linear memory space; The tool execution unit loads the WASM bytecode module to construct a static control flow structure, describing the function call relationships, basic block jump relationships, and control transfer boundary information in the WASM bytecode module; Based on the static control flow structure and the stage strategy parameters in the safety control parameter set, the execution stages of the tool execution process are divided and processed to generate a set of control flow execution stages; The generated set of control flow execution phases is written into the execution state of the tool execution unit.
[0010] Optionally, the generation of the staged control flow remote proof structure and actual instruction consumption statistics includes: The startup tool execution unit executes the WASM bytecode module, monitors the actual control flow jumps based on the control flow execution phase set, records instruction-level control transfer events one by one, and generates control flow jump paths; For each control flow execution phase, the control flow jump path is intercepted and merged based on the phase boundary to generate a set of control flow path segments for that phase. For each stage control flow path segment, stage identifier binding, control flow path order sorting within the stage, and control transfer feature extraction within the stage are performed sequentially to generate stage path summary information, construct stage control flow proof information, and aggregate to form a stage control flow proof information set, which is then written into the execution status. According to the sequential relationship of each control flow execution stage, the stage control flow proof information sets corresponding to adjacent control flow execution stages are sequentially bound to construct a staged control flow remote proof structure. During the execution of the tool execution unit, the number of instruction executions of the WASM bytecode module is statistically processed synchronously to generate actual instruction consumption statistics.
[0011] Optionally, the generation of the interface arbitration result includes: During execution, the tool execution unit pauses execution when it detects an external interface call trigger condition, extracts the stage control flow proof information corresponding to the current control flow execution stage, extracts the capability configuration from the security control parameter set, and obtains the corresponding interface call description information. Input the phase control flow proof information, capability configuration, and interface call description information into the federated interface agent, perform standardized parsing processing, whitelist verification processing, and data cleaning processing, and generate a standardized interface call request; The federated interface agent performs joint verification processing on the standardized interface call request based on the phase control flow proof information and capability configuration, and performs matching adjudication on the interface call description information according to the capability configuration to generate the interface adjudication result; Write the interface arbitration result and the corresponding return data back to the linear memory of the tool execution unit, and write the interface arbitration result to the execution status.
[0012] Optionally, updating the set of security control parameters includes: Read the staged control flow remote proof structure, interface adjudication results and actual instruction consumption statistics from the execution status to determine the staged control flow proof information corresponding to the current control flow execution stage. Based on the sequential continuity of the phase control flow proof information in the control flow execution phase set and the interface adjudication results, constraint update processing is performed on the handle set in the capability configuration; Based on the computing power quota parameters and actual instruction consumption statistics, the computing power consumption strategy is adjusted. The updated capability configuration, updated computing power consumption strategy, and the existing computing power quota parameters and phase strategy parameters are combined to form an updated set of security control parameters, which are then written into the execution status.
[0013] Optionally, the generation of the execution control result includes: Read the staged control flow remote proof structure, the updated security control parameter set, and the actual instruction consumption statistics corresponding to the current control flow execution stage from the execution status. Use the staged control flow proof information corresponding to the current control flow execution stage in the staged control flow remote proof structure as the evaluation input, and use the capability configuration, computing power quota parameters, and stage strategy parameters in the updated security control parameter set as the evaluation constraints. Based on a predefined set of zero-trust judgment rules, a joint judgment process is performed on the stage continuity status of the stage control flow proof information, the interface adjudication result association status, and the consumption status between the actual instruction consumption statistics and the computing power quota parameters, and a unique execution control result is output. The execution control result is a mutually exclusive result among the continue execution control instruction, the resource limit control instruction, and the terminate execution control instruction; When the execution control result is to continue executing the control instruction, the tool execution unit maintains the current execution state and enters the next control flow execution stage; When the execution control result is a resource restriction control instruction, the tool execution unit reduces the instruction execution rate and freezes the corresponding interface handle in the capability configuration based on the updated security control parameter set. When the execution control result is a termination control instruction, the tool execution unit performs an external interrupt termination operation; Write the execution control results into the staged control flow remote proof structure.
[0014] Optionally, the generation of the zero-trust audit log includes: In the tool execution unit, when the execution of the WASM bytecode module is completed and the execution is terminated based on the execution control result, the execution termination process is triggered, and the corresponding tool execution unit instance is destroyed. The control flow proof information, parameter evolution results, and computing power consumption results corresponding to each control flow execution stage are summarized and processed to construct a zero-trust audit record; The zero-trust audit records are output to the zero-trust audit core for centralized storage and management.
[0015] The beneficial effects of this invention are: First, this invention enables verifiable control over the entire process of tool execution, establishing a definite correspondence between the control flow execution stage, control flow jump path, and execution state. This avoids the problem in existing technologies that rely solely on execution results or single verifications and fail to reflect the actual execution process, thereby significantly improving the verifiability and reliability of the tool execution process.
[0016] Secondly, this invention combines a phased control flow remote proof structure with a dynamic update mechanism for the security control parameter set, enabling the capability configuration and computing power consumption strategy to continuously evolve with the execution state and interface adjudication results. This ensures that subsequent control flow execution phases are always controlled by the current trusted state, overcoming the problem that traditional static permission configuration and fixed resource limitations are difficult to adapt to complex execution scenarios, and enhancing the continuous effectiveness of the zero-trust execution strategy.
[0017] Furthermore, by binding the interface adjudication result with the phase control flow proof through the federated interface proxy, this invention achieves strong coupling between interface call behavior and control flow execution state, so that external interface access no longer exists independently of the execution context, effectively preventing security risks caused by interface abuse and unauthorized calls, while providing a reliable basis for subsequent zero-trust assessment processing and deterministic generation of execution control results.
[0018] Finally, after the tool execution is completed, the present invention generates a zero-trust audit record that corresponds one-to-one with the staged control flow remote proof structure, making the execution process traceable and verifiable, providing structured evidence support for post-event verification, audit analysis and liability determination, and further improving the integrity and engineering feasibility of the zero-trust tool execution system. Attached Figure Description
[0019] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings: Figure 1 This is an overall flowchart of a zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies proposed in this invention; Figure 2 This is a schematic diagram illustrating the construction of the staged control flow remote proof structure in this invention; Figure 3 This is a schematic diagram illustrating the collaborative operation of the federated interface proxy and zero-trust assessment in this invention. Detailed Implementation
[0020] The present invention will now be described in further detail with reference to the accompanying drawings. These drawings are simplified schematic diagrams, illustrating only the basic structure of the invention, and therefore only show the components relevant to the invention.
[0021] refer to Figure 1-3 The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies includes the following steps: Receive tool call requests from upper-layer intelligent agents, read tool identifiers and obtain WASM bytecode modules corresponding to tool identifiers, construct a set of security control parameters based on preset security policies, the set of security control parameters includes capability configuration, computing power quota parameters, and stage policy parameters, and write the WASM bytecode modules and the set of security control parameters into the execution environment orchestration task. The execution environment orchestration task drives the transient WASM micro virtual machine engine to perform instantiation operations, builds the tool execution unit, which is built based on the WASM bytecode module and allocated an independent linear memory space. The tool execution unit uses copy-on-write memory snapshot to load the basic runtime library. The tool execution unit loads the WASM bytecode module and builds a static control flow structure. Based on the static control flow structure and stage strategy parameters, the execution process of the tool execution flow is divided into stages to obtain a set of control flow execution stages. The set of control flow execution stages is written into the execution state of the tool execution unit. The tool execution unit executes the WASM bytecode module, collects the actual control flow jump paths for each control flow execution stage in the control flow execution stage set, performs stage merging processing on the control flow jump paths based on stage boundaries to obtain a stage control flow path fragment set, generates a stage control flow proof information set for the stage control flow path fragment set, performs sequential binding processing on adjacent stage control flow proof information to obtain a staged control flow remote proof structure, writes the staged control flow remote proof structure into the execution state, and simultaneously performs statistical processing on the number of WASM instruction executions during the execution of the tool execution unit to obtain actual instruction consumption statistics, writes the actual instruction consumption statistics into the execution state; During execution, the tool execution unit pauses execution when an external interface call is triggered. It extracts the stage control flow proof information, capability configuration, and interface call description information corresponding to the current control flow execution stage. The stage control flow proof information, capability configuration, and interface call description information are input into the federated interface proxy. The federated interface proxy performs standardized parsing on the interface call description information based on the interface description language mapping and performs whitelist verification and data cleaning. The federated interface proxy performs joint verification processing based on the stage control flow proof information and capability configuration, generates the interface adjudication result and the corresponding return data, and writes the interface adjudication result and the corresponding return data back to the linear memory of the tool execution unit. Based on the phased control flow remote proof structure, interface adjudication results, and actual instruction consumption statistics, the security control parameter set is updated. The update process includes: updating the handle set in the capability configuration according to the continuity results of the phased control flow proof information and the interface adjudication results; updating the computing power consumption strategy according to the computing power quota parameters and actual instruction consumption statistics; obtaining the updated security control parameter set; and writing the updated security control parameter set into the execution state to drive the execution of subsequent control flow execution phases. For the current control flow execution stage in the control flow execution stage set, zero-trust evaluation processing is performed based on the staged control flow remote proof structure, the updated security control parameter set, and the actual instruction consumption statistics. The zero-trust evaluation processing generates execution control results, which include continue execution control instructions, resource limit control instructions, and terminate execution control instructions. The tool execution unit performs operations such as continue running, reduce computing power consumption rate and freeze interface handles in the handle set, and external interrupt termination based on the execution control results, and writes the execution control results into the staged control flow remote proof structure. After the tool finishes execution or is terminated, the tool execution unit is destroyed and the differential memory pages generated by the copy-on-write memory snapshot are released. The phased control flow remote proof structure, the updated security control parameter set, and the actual instruction consumption statistics are summarized to generate zero trust audit records and output to the zero trust audit core.
[0022] In this embodiment, the acquisition of the WASM bytecode module and the construction of the security control parameter set include: After receiving the tool call request from the upper-layer intelligent agent, the tool identifier in the tool call request is parsed, and the WASM bytecode module corresponding to the tool identifier is located in the tool registry based on the tool identifier. The WASM bytecode module is then marked as the execution object for subsequent execution environment orchestration tasks. Based on a preset security policy, security policy matching processing is performed on the tool identifier and WASM bytecode module. The preset security policy includes at least policy rules for tool type, interface access scope and computing power usage constraints. The security policy matching processing generates initial capability configuration, computing power quota parameters and stage policy parameters, and binds the initial capability configuration, computing power quota parameters and stage policy parameters as components of the same data structure to form a security control parameter set. The security control parameter set is associated and encapsulated with the WASM bytecode module. The association and encapsulation are used to ensure that the security control parameter set maintains a consistent reference relationship during tool execution unit instantiation, control flow execution phase division, interface adjudication processing, and zero trust assessment processing. The associated and encapsulated security control parameter set is marked as an updatable parameter object so that the security control parameter set can be updated based on the phased control flow remote proof structure and interface adjudication results during subsequent control flow execution. The WASM bytecode module and security control parameter set that have been associated and encapsulated are written into the execution environment orchestration task. This enables the execution environment orchestration task to load the security control parameter set as the core control object throughout the entire tool execution process into the execution state of the tool execution unit when driving the transient WASM micro virtual machine engine to perform instantiation operations.
[0023] In this embodiment, the generation of the control flow execution phase set includes: The execution environment orchestration task triggers the transient WASM micro virtual machine engine to perform instantiation operations. Based on the WASM bytecode module written to the execution environment orchestration task, a tool execution unit is created. During the creation process of the tool execution unit, an independent linear memory space is allocated to the tool execution unit, so that the tool execution unit maintains a memory isolation relationship with other tool execution units during execution. After the tool execution unit is instantiated, it loads the basic runtime library based on the copy-on-write memory snapshot mechanism, maps the basic runtime library to an independent linear memory space, and records the memory write difference data generated during subsequent execution without modifying the original runtime library mapping, so as to support the resource release process after the tool execution ends. The tool execution unit loads the WASM bytecode module and constructs a static control flow structure based on the loaded WASM bytecode module. The static control flow structure is used to describe the function call relationship, basic block jump relationship and control transfer boundary information in the WASM bytecode module. The construction process of the static control flow structure includes: performing instruction sequence parsing processing on the loaded WASM bytecode module, parsing the opcode and control instruction type of each WASM instruction, identifying function definition boundaries, function entry positions, and function return positions, and establishing function-level instruction interval mapping relationships based on the function definition order; within each function-level instruction interval, parsing conditional jump instructions, unconditional jump instructions, and function call instructions, determining the start and end positions of basic blocks according to the instruction target address and control transfer rules, completing the basic block boundary division, and generating a basic block set; based on the jump relationships between basic blocks in the basic block set, constructing a basic block-level control transfer edge set to describe the sequential execution relationship, conditional branch relationship, and loop return edge relationship between basic blocks; simultaneously, within the function-level instruction interval, establishing a function call relationship mapping table based on function call instructions to describe the call direction and call hierarchy relationship between functions; finally, combining and associating the function-level instruction interval mapping relationship, basic block set, control transfer edge set, and function call relationship mapping table to form a complete static control flow structure, and writing the static control flow structure into the execution state of the tool execution unit for use in subsequent control flow execution stage division processing; Based on the stage strategy parameters in the static control flow structure and the set of safety control parameters, the execution process of the tool is divided into stages. The stage division process uses the function boundaries, basic block boundaries and call depth thresholds in the static control flow structure as the basis for determining the stage boundaries, so that each control flow execution stage forms a definite mapping relationship with the corresponding control region in the static control flow structure, and generates a set of control flow execution stages. The generated set of control flow execution stages is written into the execution status of the tool execution unit, so that the set of control flow execution stages is continuously referenced as the basis for stage identification in subsequent control flow jump path acquisition, generation of staged control flow remote proof structure, interface adjudication processing and zero trust assessment processing.
[0024] In this embodiment, the generation of the staged control flow remote proof structure and actual instruction consumption statistics includes: The tool execution unit is started to execute the WASM bytecode module. During the execution of the tool execution unit, the actual control flow jumps are monitored based on the control flow execution stage set. Instruction-level control transfer events are recorded one by one, control flow jump paths are generated, and the control flow jump paths are associated and marked with the corresponding control flow execution stages. For each control flow execution stage in the set of control flow execution stages, the control flow jump path is intercepted and merged based on the stage boundary. The control flow jump paths belonging to the same control flow execution stage are merged into a set of stage control flow path segments, and the set of control flow path segments of each stage is used as the input data for the control flow proof information set of the subsequent stage. For each stage control flow path segment in the stage control flow path segment set, stage identifier binding, intra-stage control flow path order arrangement, and intra-stage control transfer feature extraction are performed sequentially. During the intra-stage control flow path order arrangement, the sequential integrity and boundary consistency of the control transfer relationship are verified. The verified intra-stage control flow path order arrangement result and the intra-stage control transfer feature extraction result are deterministically combined to generate the stage path summary information of the corresponding control flow execution stage. Based on the stage identifier information and the stage path summary information, the stage control flow proof information of the corresponding control flow execution stage is constructed. The stage control flow proof information corresponding to each control flow execution stage is collected to form a stage control flow proof information set, and the stage control flow proof information set is written into the execution state. According to the sequential relationship of each control flow execution stage in the control flow execution stage set, the sequence binding process is performed on the stage control flow proof information set corresponding to adjacent control flow execution stages. The sequence binding process introduces the summary result of the stage control flow proof information corresponding to the previous control flow execution stage when generating the stage control flow proof information corresponding to the current control flow execution stage, so that the stage control flow proof information sets of adjacent stages form a unidirectional dependency relationship, thereby constructing a staged control flow remote proof structure. During the execution of the tool execution unit, the number of instruction executions of the WASM bytecode module is statistically processed synchronously to generate actual instruction consumption statistics. The actual instruction consumption statistics and the staged control flow remote proof structure are written into the execution status for use in subsequent security control parameter set updates and zero trust assessment processing.
[0025] In this embodiment, the generation of the interface arbitration result includes: During execution, the tool execution unit pauses execution when it detects an external interface call trigger condition, extracts the stage control flow proof information corresponding to the current control flow execution stage from the execution status, extracts the capability configuration from the security control parameter set, and obtains the interface call description information corresponding to the external interface call. The phase control flow proof information, capability configuration, and interface call description information are input into the federated interface agent. The federated interface agent performs standardized parsing processing on the interface call description information based on the interface description language mapping, and performs whitelist verification processing and data cleaning processing based on the parsing results to generate a standardized interface call request. The federated interface proxy is an independent logical proxy entity set up between the tool execution unit and external interface resources. The federated interface proxy runs in an execution context independent of the tool execution unit, has fixed interface access boundaries and internal state space, receives interface call description information from the tool execution unit through a predefined data structure, and establishes an interactive relationship with external interface resources in a unified data representation form. As an interface access intermediary in the zero-trust execution architecture, the federated interface proxy does not participate in the control flow execution of the tool execution unit, but only exists as a controlled proxy node in the interface interaction path. The interface description language mapping is a set of mapping rules structure maintained internally by the federated interface proxy. It is used to describe the correspondence between interface identifier, parameter name, parameter position, data type and access semantics in the interface call description information. The mapping rules are used to convert the interface call description information provided by the tool execution unit into a unified and standardized interface call request representation. The federated interface proxy performs joint verification processing on the standardized interface call request based on the phase control flow proof information and capability configuration. The joint verification processing limits the interface call request to be made only within the valid range of the phase control flow proof information corresponding to the current control flow execution phase. Based on the allowed set of interface handles and call constraints in the capability configuration, it performs matching adjudication on the interface call description information and generates the interface adjudication result corresponding to the current control flow execution phase. The federated interface agent writes the interface adjudication result and the corresponding return data back to the linear memory of the tool execution unit. At the same time, it writes the interface adjudication result into the execution status, so that the interface adjudication result is bound to the stage control flow proof information corresponding to the current control flow execution stage, for use in subsequent security control parameter set updates and control flow execution stage switching.
[0026] In this embodiment, the updating of the safety control parameter set includes: Read the staged control flow remote proof structure, interface adjudication results, and actual instruction consumption statistics from the execution status, determine the staged control flow proof information corresponding to the current control flow execution stage, and establish a correspondence between the staged control flow proof information and the interface adjudication results as the input basis for capability configuration updates; Based on the sequential continuity of the phase control flow proof information in the control flow execution phase set and the interface adjudication result, a constraint update process is performed on the handle set in the capability configuration. The constraint update process converges and adjusts the handle set within the range allowed by the interface adjudication result, so that the updated handle set does not exceed the allowed range of the handle set corresponding to the previous control flow execution phase. Based on the computing power quota parameters and actual instruction consumption statistics, the computing power consumption strategy is adjusted. When the actual instruction consumption statistics reach the threshold condition corresponding to the computing power quota parameters, the instruction execution rate of the subsequent control flow execution stage is restricted and constrained, and the adjusted computing power consumption strategy is maintained until the threshold condition is lifted. The updated capability configuration, the updated computing power consumption strategy, and the retained computing power quota parameters and phase strategy parameters are combined to form an updated security control parameter set. The updated security control parameter set is then written into the execution state, enabling it to participate in the generation of phase control flow proof information and the execution constraints of the tool execution unit in the subsequent control flow execution phase.
[0027] In this embodiment, the generation of the execution control result includes: Read the staged control flow remote proof structure, the updated security control parameter set, and the actual instruction consumption statistics corresponding to the current control flow execution stage from the execution status. Use the staged control flow proof information corresponding to the current control flow execution stage in the staged control flow remote proof structure as the evaluation input, and use the capability configuration, computing power quota parameters, and stage strategy parameters in the updated security control parameter set as the evaluation constraints. Based on a predefined set of zero-trust decision rules, a joint decision process is performed on the stage continuity status of the stage control flow proof information, the interface adjudication result association status, and the consumption status between the actual instruction consumption statistics and the computing power quota parameters. The joint decision process outputs a unique execution control result according to deterministic rules. The predefined set of zero-trust judgment rules is a set of rules and constraints pre-built based on the general security principles of "continuous verification, least privilege, and dynamic constraints" in the zero-trust security architecture. This set of rules and constraints is stored in the execution environment in the form of deterministic rules and is used to describe the legitimate combination relationship between the phased control flow remote proof structure, interface adjudication results, actual instruction consumption statistics, and security control parameter set. The predefined set of zero-trust judgment rules is composed of phase continuity constraint rules, interface authorization consistency constraint rules, and computing power consumption constraint rules as basic units. Each rule unit is defined with clear input conditions and definite judgment results, so that the zero-trust assessment process can output a unique and reproducible execution control result based on phased control flow proof information, capability configuration, computing power quota parameters, and actual instruction consumption statistics during the execution process. The execution control result is a mutually exclusive result among the continue execution control instruction, resource limit control instruction, and terminate execution control instruction, and each execution control result corresponds to a unique execution control action; When the execution control result is to continue executing the control instruction, the tool execution unit maintains the current execution state and enters the next control flow execution stage; When the execution control result is a resource restriction control instruction, the tool execution unit reduces the instruction execution rate and freezes the corresponding interface handle in the capability configuration based on the updated security control parameter set. When the execution control result is a termination control instruction, the tool execution unit performs an external interrupt termination operation; The execution control results are written into the staged control flow remote proof structure, so that the execution control results can be used as the evaluation conclusion of the current control flow execution stage to participate in the execution status constraints and audit record generation of subsequent control flow execution stages.
[0028] In this embodiment, the generation of the zero-trust audit log includes: In the tool execution unit, when the execution of the WASM bytecode module is completed and the execution is terminated based on the execution control result, the execution termination process is triggered, the corresponding tool execution unit instance is destroyed, and the difference memory pages generated by the copy-on-write memory snapshot during the execution process are released to clear the temporary running state and memory modification traces formed by the tool execution unit during execution. Based on the staged control flow remote proof structure, updated security control parameter set and actual instruction consumption statistics recorded in the execution state, the control flow proof information, parameter evolution results and computing power consumption results corresponding to each control flow execution stage are summarized and processed to construct a zero-trust audit record that corresponds one-to-one with the set of control flow execution stages. The zero-trust audit records are output to the zero-trust audit core for centralized storage and management, so that the zero-trust audit records serve as complete execution evidence of the tool execution process, which is used to support the verification of execution results, traceability of execution process and subsequent audit analysis based on the staged control flow remote proof structure.
[0029] Example 1: To verify the feasibility of this invention in practice, it was applied to an intelligent agent execution environment oriented towards multi-tool collaborative operation. In this scenario, the upper-layer intelligent agent needs to dynamically call multiple external tools to complete data processing, model inference, and result aggregation operations during the process of completing complex task inference. In existing technologies, tools are usually executed directly as scripts or containers, lacking a continuous verification mechanism for the internal control flow of the execution process. The interface calls and execution state are disconnected. Once a tool experiences control flow deviation, interface abuse, or abnormal resource consumption during execution, analysis can often only be performed afterward through logs, making it impossible to effectively constrain and control during execution, which easily introduces security risks and unauditable issues. This invention is designed to address the problems of unverifiable tool execution processes, lack of contextual constraints on interface calls, and insufficient zero-trust control during execution.
[0030] In this application scenario, after the agent initiates a tool invocation request, the system obtains the corresponding WASM bytecode module and constructs a set of security control parameters to uniformly describe the allowed capability configurations, computing power quota parameters, and phase policy parameters during tool execution. Subsequently, the execution environment constructs a tool execution unit through a transient WASM micro virtual machine engine, loads the WASM bytecode module into an independent linear memory space, and constructs a static control flow structure based on the bytecode content, dividing the tool execution process into phases to form a set of control flow execution phases. During tool execution, the system continuously collects the actual control flow jump paths and merges them into phase control flow path fragments according to phase boundaries, further generating phase control flow proof information and binding it according to the execution order to form a phased control flow remote proof structure. This structure reflects the real state of control flow evolution at each stage during tool execution, making the execution process verifiable.
[0031] When the tool triggers an external interface call during execution, the tool execution unit pauses execution and inputs the phase control flow proof information, capability configuration, and interface call description information corresponding to the current phase into the federated interface agent. The federated interface agent performs standardized parsing and verification of the interface call description information, and generates an interface adjudication result based on the phase control flow proof information and capability configuration. This adjudication result directly reflects whether the interface call is allowed in the current execution state and serves as an important basis for subsequent execution constraints. The system then updates the security control parameter set based on the phased control flow remote proof structure, the interface adjudication result, and actual instruction consumption statistics, enabling the capability configuration and computing power consumption strategy to evolve dynamically with the execution process. For the current control flow execution phase, the system further performs zero-trust assessment processing to generate execution control results, which are used to control the tool to continue running, restrict resource usage, or terminate execution. After the tool execution ends, the system destroys the tool execution unit and summarizes the phased control flow remote proof structure, security control parameter set, and actual instruction consumption statistics to generate a zero-trust audit record, providing a reliable basis for subsequent auditing and traceability.
[0032] In this embodiment, a comparative experiment was conducted between the method of the present invention and a traditional tool execution method. The traditional method uses direct script execution plus interface whitelist verification, without introducing a phased control flow remote proof and a zero-trust evaluation mechanism during execution. The experiment selected the same set of tool tasks and ran them multiple times under the same load conditions. The tool execution stability, abnormal interface interception capability, resource consumption controllability, and audit data integrity were statistically analyzed, and the following comparative results were obtained.
[0033] Table 1. Comparison of experimental data from different tool execution methods
[0034] As shown in Table 1, the average execution time of the tool slightly increases after introducing the method of this invention. This is due to the necessary overhead introduced during execution, including control flow acquisition, proof generation, and zero-trust evaluation. This overhead is within a reasonable range and does not have an unacceptable impact on the overall execution efficiency. Meanwhile, this invention demonstrates a significant advantage in control flow anomaly detection. Traditional methods lack a verification mechanism for the internal control flow during execution, making it impossible to identify control flow deviations. In contrast, this invention, through a staged remote proof structure for control flow, enables the identification of abnormal control flows during execution, achieving a high detection rate.
[0035] Regarding interface security, traditional methods rely solely on static whitelists for verification, resulting in low correlation between interface calls and the current execution state. Consequently, unauthorized interface calls still sometimes go undetected. This invention binds interface adjudication results to stage control flow proof information and capability configurations, subjecting interface calls to execution context constraints and significantly improving the interception rate of unauthorized interface calls. In terms of resource consumption, traditional methods exhibit significant deviations in instruction consumption, easily leading to uncontrolled resource usage. This invention, however, dynamically updates computing power consumption strategies based on actual instruction consumption statistics, making resource consumption more stable and controllable.
[0036] Furthermore, this invention demonstrates a significant advantage in auditing capabilities. Traditional methods, lacking a unified execution-period proof structure, generate incomplete audit data, making it difficult to support subsequent traceability analysis. This invention, through a phased control flow remote proof structure and a unified aggregation of security control parameter sets, can generate complete zero-trust audit records after each tool execution, achieving traceability throughout the entire tool execution process. The increased proportion of abnormal tasks being forcibly aborted during execution reflects the invention's ability to promptly identify and address potentially risky tasks during execution, thereby preventing further escalation of risks.
[0037] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any equivalent substitutions or modifications made by those skilled in the art within the scope of the technology disclosed in the present invention, based on the technical solution and inventive concept of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies, characterized in that, Includes the following steps: Receive tool call requests from upper-layer intelligent agents, obtain the corresponding WASM bytecode modules, and construct a set of security control parameters; The execution environment orchestration task drives the transient WASM micro virtual machine engine to perform instantiation operations, builds tool execution units, loads WASM bytecode modules and builds static control flow structures, divides and processes the execution phases of the tool execution process, and obtains a set of control flow execution phases. The startup tool execution unit executes the WASM bytecode module, collects the actual control flow jump paths based on the control flow execution phase set, and processes them to obtain the phased control flow remote proof structure and actual instruction consumption statistics. When the tool execution unit triggers an external interface call, it pauses execution, extracts the phase control flow proof information, capability configuration and interface call description information and inputs them into the federated interface proxy, and performs joint verification processing to generate the interface adjudication result. Based on the phased control flow remote proof structure, interface adjudication results, and actual instruction consumption statistics, the updated security control parameter set is obtained. For the current control flow execution phase, perform zero-trust assessment processing to generate execution control results; After the tool finishes execution, the tool execution unit is destroyed, and the data is aggregated to generate a zero-trust audit log.
2. The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to claim 1, characterized in that, The acquisition of the WASM bytecode module and the construction of the security control parameter set include: After receiving the tool call request from the upper-layer intelligent agent, the tool identifier in the tool call request is parsed, and the WASM bytecode module corresponding to the tool identifier is located. Based on the preset security policy, security policy matching processing is performed on the tool identifier and WASM bytecode module to generate initial capability configuration, computing power quota parameters and stage policy parameters, which constitute a set of security control parameters. Associate and encapsulate the security control parameter set with the WASM bytecode module; Write the associated encapsulated WASM bytecode module and security control parameter set into the execution environment orchestration task.
3. The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to claim 1, characterized in that, The generation of the control flow execution phase set includes: The execution environment orchestration task triggers the transient WASM micro virtual machine engine to perform instantiation operations, creates a tool execution unit based on the WASM bytecode module, and allocates an independent linear memory space for the tool execution unit. After the tool execution unit is instantiated, the basic runtime library is loaded based on the copy-on-write memory snapshot mechanism and mapped to an independent linear memory space; The tool execution unit loads the WASM bytecode module to construct a static control flow structure, describing the function call relationships, basic block jump relationships, and control transfer boundary information in the WASM bytecode module; Based on the static control flow structure and the stage strategy parameters in the safety control parameter set, the execution stages of the tool execution process are divided and processed to generate a set of control flow execution stages; The generated set of control flow execution phases is written into the execution state of the tool execution unit.
4. The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to claim 1, characterized in that, The generation of the staged control flow remote proof structure and actual instruction consumption statistics includes: The startup tool execution unit executes the WASM bytecode module, monitors the actual control flow jumps based on the control flow execution phase set, records instruction-level control transfer events one by one, and generates control flow jump paths; For each control flow execution phase, the control flow jump path is intercepted and merged based on the phase boundary to generate a set of control flow path segments for that phase. For each stage control flow path segment, stage identifier binding, control flow path order sorting within the stage, and control transfer feature extraction within the stage are performed sequentially to generate stage path summary information, construct stage control flow proof information, and aggregate to form a stage control flow proof information set, which is then written into the execution status. According to the sequential relationship of each control flow execution stage, the stage control flow proof information sets corresponding to adjacent control flow execution stages are sequentially bound to construct a staged control flow remote proof structure. During the execution of the tool execution unit, the number of instruction executions of the WASM bytecode module is statistically processed synchronously to generate actual instruction consumption statistics.
5. The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to claim 1, characterized in that, The generation of the interface arbitration result includes: During execution, the tool execution unit pauses execution when it detects an external interface call trigger condition, extracts the stage control flow proof information corresponding to the current control flow execution stage, extracts the capability configuration from the security control parameter set, and obtains the corresponding interface call description information. Input the phase control flow proof information, capability configuration, and interface call description information into the federated interface agent, perform standardized parsing processing, whitelist verification processing, and data cleaning processing, and generate a standardized interface call request; The federated interface agent performs joint verification processing on the standardized interface call request based on the phase control flow proof information and capability configuration, and performs matching adjudication on the interface call description information according to the capability configuration to generate the interface adjudication result; Write the interface arbitration result and the corresponding return data back to the linear memory of the tool execution unit, and write the interface arbitration result to the execution status.
6. The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to claim 1, characterized in that, The update of the safety control parameter set includes: Read the staged control flow remote proof structure, interface adjudication results and actual instruction consumption statistics from the execution status to determine the staged control flow proof information corresponding to the current control flow execution stage. Based on the sequential continuity of the phase control flow proof information in the control flow execution phase set and the interface adjudication results, constraint update processing is performed on the handle set in the capability configuration; Based on the computing power quota parameters and actual instruction consumption statistics, the computing power consumption strategy is adjusted. The updated capability configuration, updated computing power consumption strategy, and the existing computing power quota parameters and phase strategy parameters are combined to form an updated set of security control parameters, which are then written into the execution status.
7. The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to claim 1, characterized in that, The generation of the execution control result includes: Read the staged control flow remote proof structure, the updated security control parameter set, and the actual instruction consumption statistics corresponding to the current control flow execution stage from the execution status. Use the staged control flow proof information corresponding to the current control flow execution stage in the staged control flow remote proof structure as the evaluation input, and use the capability configuration, computing power quota parameters, and stage strategy parameters in the updated security control parameter set as the evaluation constraints. Based on a predefined set of zero-trust judgment rules, a joint judgment process is performed on the stage continuity status of the stage control flow proof information, the interface adjudication result association status, and the consumption status between the actual instruction consumption statistics and the computing power quota parameters, and a unique execution control result is output. The execution control result is a mutually exclusive result among the continue execution control instruction, the resource limit control instruction, and the terminate execution control instruction; When the execution control result is to continue executing the control instruction, the tool execution unit maintains the current execution state and enters the next control flow execution stage; When the execution control result is a resource restriction control instruction, the tool execution unit reduces the instruction execution rate and freezes the corresponding interface handle in the capability configuration based on the updated security control parameter set. When the execution control result is a termination control instruction, the tool execution unit performs an external interrupt termination operation; Write the execution control results into the staged control flow remote proof structure.
8. The zero-trust tool execution method based on WASM microvirtual machines and federated interface proxies according to claim 1, characterized in that, The generation of the zero-trust audit log includes: In the tool execution unit, when the execution of the WASM bytecode module is completed and the execution is terminated based on the execution control result, the execution termination process is triggered, and the corresponding tool execution unit instance is destroyed. The control flow proof information, parameter evolution results, and computing power consumption results corresponding to each control flow execution stage are summarized and processed to construct a zero-trust audit record; The zero-trust audit records are output to the zero-trust audit core for centralized storage and management.