Skip to main content
Why HTML? Back to Abstract Download PDF
License: arXiv.org perpetual non-exclusive license
arXiv:2611.01976v1 [cs.CR] 01 Nov 2026

Beyond Prompt Injection: The Tool Update Gap in LLM Agent Security

Shiyu Kan Affiliation: Shanghai Jiao Tong University, Shanghai, China email: knives_and_forks@sjtu.edu.cn , Yue Qi Affiliation: Shanghai Jiao Tong University, Shanghai, China email: july.yue.qi@sjtu.edu.cn , Yufei Han Affiliation: Inria, Rennes, France email: yufei.han@inria.fr , Xinjian Luo Affiliation: Shanghai Jiao Tong University, Shanghai, China email: xinjianluo@sjtu.edu.cn , Guojun Xiong Affiliation: Shanghai Jiao Tong University, Shanghai, China email: gjxiong@sjtu.edu.cn and Xiaofeng Gao Affiliation: Shanghai Jiao Tong University, Shanghai, China email: gaoxiaofeng@sjtu.edu.cn
© none
Abstract.

Large language model (LLM)-based agents increasingly rely on external tools to invoke services and interact with web resources. These tools can evolve through software updates, yet agentic frameworks may continue trusting them without re-verifying their safety after implementation changes. This tool update gap creates a supply-chain vulnerability in agentic systems: because updated tool code executes outside the LLM’s context window, malicious functionality embedded in tool updates can bypass defenses centered on model-visible interactions, leaving agents exposed to stealthy, persistent threats that existing in-context defenses can hardly address.

To thoroughly investigate this threat, we introduce ETUDE (Exploiting Tool Updates for Direct Execution), an attack that embeds malicious functionality into updates of initially benign tools to produce compromised tools, while preserving their legitimate tool functionality. Unlike prompt-based attacks, ETUDE operates entirely outside the LLM’s context and requires no adversarial instructions, thereby bypassing defenses restricted to model-visible content, such as prompt-injection detectors and static skill scanning. We evaluate ETUDE across three representative attack workloads and seven widely used commercial and open-source agentic frameworks, including Gemini CLI, Codex CLI, and Claude Code. The results show that ETUDE achieves a 97.6% attack success rate while maintaining a 95.9% legitimate task completion rate.

We further examine three families of existing defenses and find that they provide insufficient protection against this threat: integrity verification and code review can be bypassed through obfuscation or disrupt legitimate maintenance, while runtime auditing faces coverage and computational overhead limitations. These findings expose a fundamental blind spot in current agent security practices: trust established for a tool does not necessarily remain valid after its implementation updates. Our results highlight the need for lifecycle-aware tool verification and execution-time security enforcement to secure LLM-based agents beyond the model context.

Keywords: 
LLM agents, tool updates, agent security, supply chain security

1. Introduction

Large language model (LLM)-based agents, such as Claude Code and OpenAI Codex, have demonstrated remarkable capabilities in performing complex, multi-step tasks, ranging from web browsing to software development (Yao et al., 2023; Schick et al., 2023; Li et al., 2026). To further extend their capabilities beyond the underlying LLMs, modern agent frameworks allow users to integrate external tools from open-source repositories, plugin marketplaces, and third-party providers. For example, the Model Context Protocol (MCP) ecosystem alone indexes over 177,000 community-contributed tools (Stein, 2026). These tools provide executable functionalities that enable agents to access local files, interact with web services, and perform operations with the privileges of the host environment. Consequently, the capabilities and security of agentic systems depend not only on their underlying LLMs, but also on the external tools they incorporate. As the tool ecosystem continues to expand, so does the potential attack surface.

Existing studies (Chang et al., 2026; Zhan et al., 2024; Debenedetti et al., 2024; Wang et al., 2025b; Zhao et al., 2026) have extensively investigated the security vulnerabilities introduced by external tools in agentic systems. Despite their effectiveness in exposing critical vulnerabilities, these studies (Chang et al., 2026; Zhan et al., 2024) primarily focus on prompt injection attacks, where adversarial instructions are embedded in model-visible inputs to manipulate an agent’s behavior. Consequently, existing defenses address prompt injection by strengthening instruction–data boundaries, constraining tool calls, or detecting and correcting MCP context poisoning (Yi et al., 2025; Debenedetti et al., 2025; Wang et al., 2026b). In this paper, we uncover a critical yet largely unexplored attack surface in agentic systems: malicious code injection through tool updates, which can effectively circumvent existing security defenses.

Refer to caption
Figure 1. The tool update gap. A malicious update preserves the tool’s legitimate functionality while introducing unauthorized operations that execute directly within the tool’s runtime environment.

Tool Update Gap. Modern agent frameworks support external tool updates to incorporate new functionalities, fix bugs, and maintain compatibility with evolving environments. During our investigation, we observe a critical discrepancy between how these frameworks establish trust in external tools and how they maintain this trust after subsequent updates. Specifically, while an external tool may undergo security screening during its initial installation (at its admission stage), subsequent updates of this tool can be adopted without re-examining the updated implementation. Across the seven agent frameworks that we evaluate, including Gemini CLI, Codex CLI, Claude Code, and OpenCode, we find that previously granted tool permissions can persist even when the underlying executable code changes. This creates a substantial security risk: an attacker can initially distribute a benign tool to pass admission-time checks and establish trust, then introduce malicious functionality through a subsequent update that inherits the tool’s existing identity and authorization. We refer to this discrepancy as the tool update gap.

A Motivating Example. To illustrate the security implications of the tool update gap, consider the scenario shown in Figure 1. An attacker initially publishes a benign file-editing tool through a third-party tool marketplace. After the tool has been installed and trusted by agent frameworks, the attacker releases a seemingly routine update that introduces additional formatting functionalities while embedding malicious operations within the tool’s executable code. For example, the updated implementation may silently read sensitive local files or invoke unauthorized APIs. These malicious operations are triggered during legitimate tool invocations, while the tool continues to provide its expected functionality and returns normal results to the agent. Importantly, the malicious operations execute directly within the tool’s runtime environment. In this way, neither the model-visible interaction nor successful completion of the legitimate task necessarily reveals the unauthorized operations.

This threat closely resembles real-world software supply-chain attacks, in which adversaries exploit established trust in software packages to introduce malicious functionality through subsequent releases. For example, in the XZ Utils incident (CVE-2024-3094), a maintainer spent approximately two years establishing trust before introducing a backdoor into a widely deployed Linux compression library (Dragos et al., 2024). Similarly, in the event-stream incident, an attacker obtained maintainership of a popular npm package and subsequently introduced a targeted cryptocurrency-stealing payload (npm, Inc., 2018). Despite growing recognition of these security risks, the implications of post-admission code changes in LLM agent systems remain insufficiently understood. This raises a critical question: to what extent can adversaries exploit trusted tool updates to execute unauthorized operations while preserving the agent’s legitimate functionality?

Our Contribution. In this paper, we systematically investigate the security implications of the tool update gap by developing a novel attack, termed ETUDE (Exploiting Tool Updates for Direct Execution). ETUDE exploits the persistent trust established during tool admission to introduce unauthorized operations through subsequent updates. A typical workflow of ETUDE is shown in Figure 1. As a result, ETUDE enables unauthorized operations to occur alongside legitimate task execution, exposing a fundamental limitation of security mechanisms that rely exclusively on initial tool admission or model-visible interactions.

Distinctions from Prior Work. ETUDE differs from existing attacks against agentic systems along two fundamental dimensions: delivery timing and execution path. The former determines whether malicious functionality is introduced before initial tool admission or through a subsequent update, while the latter determines whether unauthorized operations are induced through model-visible instructions or executed directly by the tool implementation. Existing prompt injection attacks (Huang et al., 2026; Liu et al., 2026b; Chang et al., 2026; Shi et al., 2026; Qu et al., 2026) primarily manipulate tool descriptions, retrieved content, or other model-visible inputs to induce unintended agent behaviors, which remain susceptible to defenses that inspect model-visible content. Meanwhile, emerging studies on tool supply-chain security (Hu et al., 2026; Qu et al., 2026) have investigated malicious tool implementations introduced before installation, where admission-time screening can potentially identify their harmful functionalities. Empirical research also documents malicious code and instruction-based manipulation in real-world skill registries (Liu et al., 2026a). In contrast, ETUDE combines post-admission delivery with direct code execution, allowing malicious functionality to bypass the initial admission process and operate independently of the LLM’s decision-making process. This combination distinguishes ETUDE from existing attack paradigms and reveals a security blind spot that cannot be adequately addressed by admission-time screening or prompt-injection defenses alone.

Our Findings. We implement ETUDE and conduct an extensive experimental evaluation across seven representative agent frameworks, including Gemini CLI, Codex CLI, Claude Code, DeepSeek Harness, OpenCode, Pi, and Goose. Our evaluation covers multiple LLM backends and three distinct tool functionalities, with unauthorized objectives spanning synthetic credential disclosure, unauthorized API operations, and local file modification. Experimental results demonstrate that ETUDE achieves an attack success rate of 97.6% while maintaining a legitimate task completion rate of 95.9% across the seven frameworks. Moreover, ETUDE outperforms the strongest prompt-injection baseline by 85.1%. These results demonstrate that ETUDE can reliably execute unauthorized operations while preserving the agent’s legitimate functionality, highlighting the practicality and severity of the tool update gap.

We further evaluate representative security defenses, including admission-time code scanning, update-time auditing, and runtime monitoring, to examine their effectiveness against ETUDE. Our findings reveal three critical limitations of existing defense mechanisms. (i) File integrity checks can identify code modifications but cannot determine whether an update introduces malicious functionality. (ii) Static code auditing remains vulnerable to complex or obfuscated malicious implementations, limiting its effectiveness in distinguishing benign updates from malicious ones. (iii) Model-level monitoring and prompt-injection defenses cannot reliably detect unauthorized operations that execute entirely within the tool’s runtime environment. Collectively, these findings demonstrate that conventional admission-time and model-centric defenses are insufficient to secure the complete tool lifecycle, establishing post-admission tool integrity as a critical challenge for agentic systems. Our main contributions are summarized as follows.

  • •

    We identify and characterize a critical, yet largely overlooked security vulnerability in agentic systems, termed the tool update gap. We demonstrate how malicious tool updates can exploit previously established trust and authorization to execute unauthorized operations.

  • •

    We propose ETUDE, a novel attack that exploits the tool update gap to execute unauthorized operations during legitimate tool invocations. We demonstrate its effectiveness across seven agent frameworks, multiple LLM backends, and three representative unauthorized objectives.

  • •

    We conduct a comprehensive evaluation of representative security defenses against ETUDE, covering admission-time screening, update-time auditing, and runtime monitoring. Our findings reveal fundamental limitations in existing defenses, particularly their inability to reliably identify malicious functionality introduced through tool updates.

2. Related Work

Threats through Model-Visible Content. Existing studies have extensively investigated the security threats posed by untrusted content in LLM-based agent systems. A prominent attack paradigm is indirect prompt injection, where adversaries embed malicious instructions in external content to manipulate an agent’s behavior (Greshake et al., 2023; Chang et al., 2026). Recent studies have extended this attack to the MCP ecosystem, demonstrating how malicious tool descriptions can redirect agent behavior (Huang et al., 2026; Wang et al., 2025a). Beyond tool descriptions, emerging attacks further exploit skill documents that guide agent execution. For example, DDIPE embeds malicious logic in reusable examples and templates (Qu et al., 2026), while payload-less attacks leverage natural-language instructions to induce agents to generate malicious code (Liu et al., 2026b). Despite their different attack vectors, the attacks discussed above share a fundamental limitation: they rely on the LLM interpreting and following adversarial content.

Malicious Tools and Post-Approval Updates. Beyond model-visible attacks, recent studies have investigated security threats arising directly from executable tool implementations. For example, MalTool constructs malicious tools that perform unauthorized operations while preserving their advertised functionality, and systematically evaluates their detectability (Hu et al., 2026). Meanwhile, ETDI investigates security risks associated with post-approval changes and proposes digitally signed tool definitions, version tracking, and resource-access verification to strengthen tool integrity (Bhatt et al., 2025). Although these studies provide valuable insights into malicious tools and lifecycle security, the practical exploitation of post-admission tool updates across different agent frameworks remains insufficiently explored. To bridge this gap, we systematically investigate how an initially benign tool can establish trust during admission and subsequently introduce malicious functionality through updates while retaining its original identity and authorization.

Static Inspection of Tool and Skill Packages. Static inspection provides an important defense against malicious third-party tools by examining their executable code and package contents before execution. For example, MalSkills analyzes dependencies among skill instructions, scripts, and configuration files to identify potential security threats (Wang et al., 2026a), while IntelGuard detects malicious packages through threat-informed LLM reasoning (Guo et al., 2026). Meanwhile, Acoda investigates how code obfuscation can conceal malicious functionality from LLM-based code analysis while preserving its execution behavior (Rao et al., 2026). However, the effectiveness of existing static defenses against malicious tool updates, particularly those employing code obfuscation, remains insufficiently understood. To investigate this issue, we evaluate representative static defenses in our experiments, including Cisco MCP Scanner, SkillFortify, and SkillSpector (Qualixar, 2026; NVIDIA, 2026).

Runtime Auditing. Unlike static inspection, runtime auditing identifies potentially malicious behaviors by executing untrusted code and monitoring its actual operations. Recent studies have explored this approach to uncover security threats that may evade static analysis. For example, Cloak and Detonate introduces SkillDetonate, which monitors operating-system activities and tracks data flows during skill execution to detect suspicious behaviors (Ji et al., 2026). Although runtime auditing offers greater visibility into executable behavior, its effectiveness may be limited when malicious operations are activated only under specific inputs or environmental conditions.

3. Threat Model

System Model. We consider an LLM-based agentic framework that integrates external tools to extend its capabilities. Each tool consists of executable code and model-facing metadata, including its name, description, and input schema. During tool admission, the framework installs or enables the tool and establishes the authorization required for its execution. Subsequently, the agent can invoke the tool to execute its implementation within the permissions of the hosting environment. Importantly, we observe that the evaluated modern frameworks allow tool implementations to be updated while retaining their original identity, model-facing metadata, and previously granted authorization. Although some frameworks require user confirmation for individual tool calls, such confirmations authorize the invocation rather than verify the underlying implementation.

Attacker Capabilities and Knowledge. We consider an attacker who controls the release channel of a single external tool and can distribute arbitrary updates to its implementation. The attacker has full knowledge of the tool’s executable code, interface, and model-facing metadata, but cannot control the agentic framework, underlying LLM, user requests, or other tools. We assume that the tool has already been admitted in a benign state before the attack begins. The attacker subsequently introduces malicious functionality through a seemingly legitimate update while preserving the tool’s name, description, input schema, and intended functionality.

Attack Taxonomy. We characterize tool-based attacks along two orthogonal dimensions: delivery timing and execution path. Delivery timing determines whether malicious functionality is introduced during initial admission (E1) or through a subsequent update (E2). Execution path distinguishes unauthorized operations performed directly by executable tool code (P-direct) from those induced through model-visible instructions (P-ctx). Together, these dimensions define four attack conditions, as summarized in Table 1. ETUDE targets E2×\timesP-direct, where an initially benign tool acquires malicious functionality through an update and executes unauthorized operations directly during legitimate invocations. Unlike P-ctx attacks, ETUDE requires no adversarial instructions to enter the LLM’s context.

Attacker Goals and Scope. We consider three representative unauthorized objectives: sensitive information disclosure, unauthorized external API operations, and local file modification. These objectives are not exhaustive and may overlap in practice. The attacker exploits the permissions already available to the tool’s execution environment to perform operations beyond the user’s legitimate request, without requiring privilege escalation or compromising the framework or underlying LLM. Meanwhile, the malicious update preserves the tool’s intended functionality, allowing the agent to complete its legitimate task despite the additional unauthorized operations.

Table 1. Attack taxonomy along two dimensions: delivery timing (E1: admission; E2: subsequent update) and execution path (P-direct: code-level execution; P-ctx: model-context execution). ETUDE targets E2×\timesP-direct.
P-direct P-ctx
executed by tool code induced via model context
E1 Malicious implementation Poisoned tools or skills
at admission present at admission (Hu et al., 2026) before adoption (Wang et al., 2025a; Qu et al., 2026)
E2 ETUDE (this work) Rug-pull updates to
via adopted update update-time direct execution descriptions or outputs (Beurer-Kellner and Fischer, 2025)

4. Approach

ETUDE instantiates the E2×\timesP-direct attack condition in Table 1, exploiting the tool update gap through a single implementation update. Specifically, the attack begins with a benign tool implementation A​ (v1)A\text{ (v1)}, which provides the advertised functionality and passes initial admission. The adversary subsequently releases an updated implementation A​ (v2)A\text{ (v2)} that preserves the tool’s original interface while embedding additional malicious operations. Once the framework adopts this update, subsequent tool invocations execute A​ (v2)A\text{ (v2)} under the authorization previously granted to A​ (v1)A\text{ (v1)}, as illustrated in Figure 1. The adoption mechanism varies across agent frameworks, including package re-resolution, tool-server restarts, and MCP endpoint reconnections. Despite these implementation differences, the underlying security weakness remains consistent: the updated code can execute without undergoing the same security screening as the initially admitted implementation. Consequently, ETUDE requires neither additional tool installation nor adversarial instructions to manipulate the underlying LLM. A routine tool update followed by a legitimate invocation is sufficient to activate the attack. In the following, we describe the construction of A​ (v2)A\text{ (v2)}, its activation mechanism, and its generality across agent frameworks.

Retaining the Normal Path. We design the malicious implementation A​ (v2)A\text{ (v2)} to satisfy three requirements that collectively preserve legitimate functionality while concealing unauthorized operations. R1 (Interface Preservation). A​ (v2)A\text{ (v2)} retains the same tool name, description, and input schema as A​ (v1)A\text{ (v1)}, ensuring that the model-facing interface remains unchanged after the update. This prevents the attack from introducing suspicious modifications to tool descriptions or the model’s tool-selection process, although it does not prevent inspection of the updated code itself. R2 (Functional Preservation). A​ (v2)A\text{ (v2)} preserves the advertised functionality of A​ (v1)A\text{ (v1)} and returns the expected results for legitimate inputs. By maintaining normal tool behavior, the malicious update avoids functional anomalies that could otherwise expose the attack. R3 (Direct Execution). A​ (v2)A\text{ (v2)} executes unauthorized operations within the tool’s implementation, without requiring additional tool calls from the LLM. This prevents these operations from appearing as separate model-initiated actions, thereby evading defenses that rely exclusively on model-visible instructions or tool-call trajectories.

To satisfy these requirements, A​ (v2)A\text{ (v2)} preserves the original handler of A​ (v1)A\text{ (v1)} while incorporating malicious operations into its execution path. These operations execute within the existing tool process and exploit only the permissions available to its execution environment, such as accessing local files or communicating with permitted network endpoints. Moreover, the injected operations are isolated through exception handling, allowing the tool to return its expected result even when an unauthorized operation fails. This design decouples legitimate task completion from attack success, enabling the two outcomes to occur independently. Accordingly, our evaluation independently verifies both outcomes using task-correctness checks and observable evidence of unauthorized side effects, rather than relying on the model’s final response.

Activation. Once A​ (v2)A\text{ (v2)} is adopted, a legitimate tool invocation can directly activate the injected operations without requiring any additional instructions from the user or the LLM. In the primary attack configuration, the malicious operations execute during ordinary invocations of the updated tool, independently of specific trigger phrases or model-visible signals. For reproducibility, we retain the tool implementations, task configurations, invocation records, and corresponding evidence of unauthorized effects (Section A). Furthermore, to investigate the effectiveness of runtime auditing, we consider additional variants whose malicious operations are activated only under specific input or environmental conditions. These variants allow us to examine whether audit-based runtime defenses can reliably expose malicious functionality that remains dormant during certain executions. Their evaluation is presented in Section 5.

Generality Across Frameworks. ETUDE relies on two fundamental conditions: an admitted tool can adopt an updated implementation, and subsequent invocations execute the updated code under the existing tool identity and authorization. These conditions are independent of any particular agent framework, tool-loading mechanism, or LLM backend. Although different frameworks adopt tool updates through distinct mechanisms, they can expose the same underlying security weakness when updated code executes without renewed security verification. Therefore, ETUDE is applicable to frameworks satisfying these conditions, without requiring framework-specific modifications to the attack mechanism. We demonstrate this generality across seven representative agent frameworks using their native tool-loading mechanisms and documented permission configurations. We further investigate the influence of different LLM backends and tool functionalities to characterize the effectiveness and applicability of ETUDE under diverse deployment settings (Section 5).

5. Evaluation

We evaluate whether ETUDE executes attack operations while completing legitimate tasks, then examine its effectiveness across backends, tool functionalities, and defenses through four research questions:

RQ1: Can ETUDE successfully execute unauthorized operations while completing legitimate tasks?

RQ2: Does ETUDE remain effective across different LLM backends?

RQ3: Can ETUDE generalize across different tool functionalities?

RQ4: To what extent can existing defenses detect or prevent ETUDE?

Table 2. Overview of the seven evaluated agent frameworks.
Framework Developer Public release Source Evaluated version
Gemini CLI Google 2025 Open 0.62.0
Codex CLI OpenAI 2025 Open 0.159.3
Claude Code Anthropic 2025 Closed 2.1.284
DeepSeek Harness DeepSeek 2026 Open 0.2.0-rc.2
OpenCode Anomaly 2025 Open 1.18.34
Pi Mario Zechner /
Earendil Works
2025 Open 0.86.1
Goose Block / AAIF 2024 Open 1.45.0

5.1. Experimental Setup

Platforms and tools. Table 2 lists the seven agent frameworks, their versions, and whether each framework’s implementation is open or closed source. RQ1 uses GLM-5.3-Flash and a Markdown cleaner. RQ2 holds W1 and the cleaner fixed while comparing GLM-5.3-Flash, Qwen-3.8-27B, and DeepSeek-V4-flash across four backend configurations, with thinking enabled and disabled for DeepSeek-V4-Flash. RQ3 fixes GLM and ETUDE while varying the tool functionality—Markdown cleaning, CSV statistics, and ICS generation—across four frameworks.

Normal task and unauthorized goals. In RQ1 and RQ2, the user requests one md_clean(text) call and the complete cleaned text. The cleaner normalizes line endings, strips trailing whitespace, and collapses repeated blank lines while preserving content. W1–W3 each pair this task with an unauthorized objective involving resources unnecessary for text cleaning. We use synthetic credentials, researcher-controlled services, and isolated files; all corresponding network traffic stays on the local host, exposing no real secrets or third-party resources.

W1: disclosure. The objective is to read a separate synthetic credential file and transmit its full contents to an adversary-selected destination, represented by our test receiver. Success requires a receiver payload matching the source file and an invocation identifier linking the record to the task.

W2: unauthorized API action. The objective is to create an order through a test API despite the user’s request for text cleaning alone. Success requires a service-side order with the designated case marker and task invocation identifier; an attempted request or a model’s claim is insufficient.

W3: file modification. The goal is to overwrite a separate synthetic research note, changing its status from retained to altered and inserting a designated marker. Success requires the complete specified replacement text. The action tool restricts writes to this isolated note but accepts arbitrary content, allowing us to measure actual file modification separately from specified-content attainment.

Conditions and admission review. Crossing delivery timing with execution path yields four conditions; ETUDE is E2×\timesP-direct. E1 submits A​ (v2)A\text{ (v2)} for review before first use; E2 admits benign A​ (v1)A\text{ (v1)} and then adopts A​ (v2)A\text{ (v2)} without repeating the review. P-direct performs the unauthorized operation inside the tool during a normal call. P-ctx instead adds instructions to the tool description asking the model to issue an additional tool call. For RQ1–RQ3, we add a uniform admission gate using Cisco MCP Scanner’s alignment component with our GLM-5.3-Flash research adapter. This pre-use code review is a deliberate experimental control, rather than a default installation feature of the frameworks. The gate tests why benign-first delivery matters under admission screening: submitting A​ (v2)A\text{ (v2)} directly may prevent its use, whereas admitting A​ (v1)A\text{ (v1)} first establishes trust before the update introduces the attack functionality. Appendix B.1 reports the admission outcomes. RQ4 separately evaluates update-time and runtime checks, including SkillFortify and NVIDIA SkillSpector (Section 5.5).

Update adoption. For E2, we switch the admitted tool from A​ (v1)A\text{ (v1)} to A​ (v2)A\text{ (v2)} through native tool-loading mechanisms. Gemini replaces its server process and refreshes tools; Codex reloads its server; Claude re-registers servers; DeepSeek Harness reloads its plugin in a new native window while restoring the logical session. OpenCode reconnects its server, Pi uses ctx.reload, and Goose relaunches its extension. Subsequent calls execute A​ (v2)A\text{ (v2)} under the existing tool identity and the permission settings saved for that configuration (Appendix A). When a framework requires confirmation for an individual tool call, the harness supplies a one-time approval for that call; this does not re-examine the updated implementation.

Evaluation metrics. We score ASR and TCR separately over the same planned tasks. The attack success rate (ASR) measures attainment of the specified attack objective using the independent receiver, service, or file evidence defined above. For RQ1, the primary task completion rate (TCR) measures whether the final reply delivers the complete cleaned text; instrumentation-only tracking lines are assessed separately. The auxiliary full-task criterion additionally checks the supplied input, prescribed tool and call count, and expected tool output (Table 6). RQ2 uses full-task TCR. RQ3 uses it for W1/W2 and final-output TCR for W3. For W3, file modifications that miss the specified text are reported separately from ASR. Native invocation records link each outcome to its task, and joint success requires both outcomes from the same execution. Figure 5 illustrates one such execution from the saved native audit examined in RQ4.

Scoring and aggregation. Each round has 20 planned A​ (v2)A\text{ (v2)} tasks; ASR and TCR are success counts out of these 20, expressed as percentages. When admission returns BLOCK (rejected) or UNKNOWN (inconclusive), either A​ (v1)A\text{ (v1)} or A​ (v2)A\text{ (v2)} is not executed and contributes no successes; these review outcomes are reported separately. We run five rounds per implementation and report each condition’s mean and sample standard deviation, which measures variation across rounds. Overall results average the included condition means, giving each condition equal weight. Shared records do not count as new experiments: RQ1 and RQ2 share the seven GLM/W1 results, and RQ3’s four W3 Markdown conditions reuse RQ1’s ETUDE records, whereas its eight CSV/ICS conditions are independent. Thus, the 40 displayed W3 conditions represent 36 independent conditions, 180 rounds, and 3,600 planned tasks. Appendices A and B provide full results and supporting records.

5.2. RQ1: Attack effects during ordinary tool use

ETUDE consistently achieves its attack objectives while preserving high TCR across all seven evaluated frameworks. Figure 2 compares the four conditions across seven frameworks and W1–W3. Across the 21 equally weighted framework–workload conditions, ETUDE achieves 100.0% ASR and 99.6% final-output TCR, versus 20.2% ASR and 96.4% TCR for P-ctx×\timesE2, the strongest baseline—an ASR difference of 79.8 percentage points. Table 5 reports individual conditions; Appendix B.1 details the outcome breakdown.

(a) ASR
(b) TCR
Figure 2. ASR and final-output TCR across seven frameworks. Each marker averages the three five-round workload means.
Table 3. W3 research-note modification and specified-content attainment (%). Only the latter counts toward ASR.
Condition File change (%) Specified content (%)
ETUDE 100.0 100.0
P-ctx×\timesE2 42.4 14.4

Baseline failure modes. Baseline failures occur at different stages. Under E1, the experimental admission reviewer withholds all 105 P-direct rounds and 95 of 105 P-ctx rounds before A​ (v2)A\text{ (v2)} executes. These outcomes reflect pre-use code review, not runtime rejection by the task-performing agent. Two P-ctx×\timesE2 rounds do not reach A​ (v2)A\text{ (v2)} execution, leaving 40 planned tasks unexecuted (Appendix B.1). Of the remaining 2,060 tasks, 1,440 invoke the normal tool without a recorded additional-operation call, including 1,407 that complete the task. W3 reveals a different outcome: 196 P-ctx×\timesE2 tasks and 60 admitted P-ctx×\timesE1 tasks overwrite the target with normal-task output instead of the specified replacement (Table 3). These unauthorized writes occur but miss the content objective. Together, these results explain the baselines’ lower ASR: admission review largely prevents E1 implementations from executing, while P-ctx×\timesE2 depends on the model issuing an additional call with the required content. ETUDE instead presents benign A​ (v1)A\text{ (v1)} at admission and performs the unauthorized operation inside A​ (v2)A\text{ (v2)} during normal tool use, without requiring an additional model-issued call.

Cross-framework variation. With the same backend configured across RQ1, P-ctx×\timesE2 shows pronounced cross-framework differences in additional-operation calling behavior. Notably, Claude Code, a commercial agent framework, invokes additional operations in 297/300 tasks under the evaluated configuration, whereas OpenCode executes the normal tool in all 300 without a recorded additional-operation call. The saved tool declarations contain the updated instructions and required tools in both frameworks. One plausible explanation is that framework-specific prompts and orchestration influence whether the model treats these added instructions as part of the normal tool-use procedure.

Claude Code’s W1/W2/W3 ASR is 100/97/23%, while final-output TCR remains 100/99/100%. All 100 W3 tasks modify the target file, but only 23 produce the specified content, showing that frequent additional calls alone do not ensure attainment of the specified objective.

ETUDE task-completion failures. Full-task TCR falls below 100% because some executions do not satisfy the normal-task output or tool-use requirements. Among 2,100 RQ1 tasks, eight produce incorrect final outputs, while seven return correct outputs but fail input, tool-return, or call-count checks, yielding 99.3% full-task TCR. For example, Claude Code/W1 and DeepSeek Harness/W2 each invoke the normal tool twice rather than the required single call.

5.3. RQ2: Attack effects across model backends

ETUDE maintains confirmed attack effects and high TCR across different LLM backends. Holding W1 and the Markdown cleaner fixed, we compare four backend settings across seven frameworks. ETUDE produces a confirmed effect in all 28 backend–framework combinations, with ASR ranging from 80.0% to 100.0% (Figure 3(a), Table 8). The mean ASR is 96.4% and full-task TCR is 94.0%.

P-ctx×\timesE2 is far less stable, from 0% to 100.0% ASR over the same combinations. In two saved executions, A​ (v2)A\text{ (v2)}’s added instructions and the relevant tools appear in the model input, yet the response proposes only the normal call. These records illustrate P-ctx’s dependence on a further model decision: the normal task can proceed without the additional action. ETUDE avoids that decision by performing the operation within A​ (v2)A\text{ (v2)}’s normal execution path, although the model must still invoke the tool correctly. We next hold the backend fixed and vary the tool’s normal function.

Refer to caption
(a) Backend sensitivity: ETUDE ASR
(b) W3: tool coverage
Figure 3. Backend and tool sensitivity. (a) ETUDE ASR with W1/Markdown fixed. (b) W3 actual file modification and final-output TCR, averaged across four frameworks per tool.A seven-by-four heatmap displays backend ASR, and adjacent grouped horizontal bars display ASR and TCR for three tool utilities averaged across their evaluated contexts.

5.4. RQ3: Attack effects across tool utilities

ETUDE produces confirmed effects across different tool functionalities while preserving high TCR. With GLM fixed, we apply the same construction to Markdown cleaning, CSV statistics, and ICS generation across four frameworks (see Table 7). Confirmed effects appear in all 36 framework–tool–workload combinations (Figure 3(b), Table 7). For W3, Markdown and ICS each modify the target file in 100.0% of tasks, with 100.0% final-output TCR.

The audited CSV failures arise from malformed arguments that stop parsing before either normal completion or the additional operation. Under W3’s unified action rule, CSV’s file-modification rate and final-output TCR both average 91.8%—below the 100% of Markdown and ICS. Although the prepared inputs contain genuine line breaks, 33 native calls pass malformed CSV arguments: 32 retain newline escapes as literal characters, and one retains a carriage-return escape in the header, preventing the required column match. These calls yield no requested statistics, causing normal-task failure. Because A​ (v2)A\text{ (v2)} performs the additional operation only after successful parsing, they also yield no attack effect. The paired failures in these 33 calls therefore reflect invalid input formation, rather than rejection of the unauthorized operation. Appendix A reports the broader CSV/ICS call audit and validation checks.

5.5. RQ4: Possible countermeasures

RQ1–RQ3 show that legitimate completion can coexist with an attack, so completion alone does not reveal the attack. We therefore evaluate three ways to inspect the tool’s implementation or execution, using the same tools and updates.

File integrity verification compares an update with an approved implementation. Our TLSH-based instance (Oliver et al., 2013) measures file similarity and accepts updates only below a preset distance threshold.

Static LLM-based code review examines source code before execution. We use Cisco MCP Scanner’s alignment component (Cisco AI Defense, 2026) with GLM-5.3-Flash, mapping decisions to ALLOW, BLOCK, or UNKNOWN. SkillFortify (Qualixar, 2026) and NVIDIA SkillSpector (NVIDIA, 2026) extend the comparison from source files to packaged skills. In RQ1–RQ3, our added static-review gate runs only at admission, allowing the updated A​ (v2)A\text{ (v2)} to become executable without re-examination. Here, static review checks each candidate before first installation or update adoption; only ALLOW permits native execution. These checks test whether inspecting an update distinguishes attack functionality from legitimate maintenance.

Runtime auditing monitors operations during isolated execution and flags behavior outside the declared function. We adapt SkillDetonate’s isolated execution and information-flow monitoring (Ji et al., 2026).

File integrity verification creates a trade-off between target blocking and normal maintenance. Pinning an approved version stops both unauthorized updates and maintenance until a new release is approved. We therefore evaluate a TLSH gate that accepts sufficiently similar implementation files. Let A​ (v1)A\text{ (v1)} and A​ (v2)A\text{ (v2)} denote the same tool’s implementation file, whether source or binary, before and after an update. Their TLSH digests are h1=HTLSH​(A​ (v1))h_{1}=H_{\mathrm{TLSH}}(A\text{ (v1)}) and h2=HTLSH​(A​ (v2))h_{2}=H_{\mathrm{TLSH}}(A\text{ (v2)}); tt is the preset rejection threshold. We define the distance and decision as

(1) d⁡(A​ (v1),A​ (v2))\displaystyle d(A\text{ (v1)},A\text{ (v2)}) =diffTLSH⁡(h1,h2),\displaystyle=\operatorname{diff}_{\mathrm{TLSH}}(h_{1},h_{2}),
Gt​(A​ (v1),A​ (v2))\displaystyle G_{t}(A\text{ (v1)},A\text{ (v2)}) ={ALLOW,d⁡(A​ (v1),A​ (v2))<t,BLOCK,d⁡(A​ (v1),A​ (v2))≥t.\displaystyle=\begin{cases}\mathrm{ALLOW},&d(A\text{ (v1)},A\text{ (v2)})<t,\\ \mathrm{BLOCK},&d(A\text{ (v1)},A\text{ (v2)})\geq t.\end{cases}

Smaller distance indicates greater file similarity; values below tt pass, while values at or above tt are rejected. We compare 20 small edits, 20 functional additions (text statistics, caching, and report formats), and W1–W3 (Figure 4).

Step curves show target blocking and false-positive rates for small, functional, and public-history updates against TLSH threshold.

Figure 4. Target blocking and legitimate-update rejection as TLSH thresholds vary. Controlled strata and public history use separate denominators.Step curves show target blocking and false-positive rates for small, functional, and public-history updates against TLSH threshold.

Within this controlled corpus, no threshold blocks all targets while allowing all legitimate maintenance. Legitimate distances span 1–221, including functional additions at 173–221; W1/W2/W3 have distances 156/145/233. Because W1 and W2 lie below every functional addition, any threshold admitting those additions also admits both targets. At t=233t=233, all 40 legitimate updates pass and only W3 is blocked. At t=145t=145, all three targets are blocked, but so are 22 of 40 legitimate updates (55%), including every functional addition.

Public MCP update histories reinforce this tradeoff: admitting a large maintenance update also admits all three controlled targets (AWS Labs, 2026; GitHub, 2026a) (Appendix B.3.1). Two offline checks in separate repositories further show that small target variants can pass while preserving the tested normal outputs (Model Context Protocol, 2026; GitHub, 2026b); each covers one file and one variant (Appendix B.3). Small file distance does not establish behavioral safety.

Obfuscation leaves ETUDE effective under static LLM-based code review. Obfuscation protects intellectual property and conceals adversarial code (Moser et al., 2007), motivating a comparison of readable and PyArmor-protected tools under Cisco/GLM review. Only an ALLOW verdict permits native execution of A​ (v2)A\text{ (v2)} (Table 4).

Table 4. Static review and native execution for readable and PyArmor-protected code.
Form Route DSR (%) ASR (%) TCR (%) Compl. B
Original ETUDE 98.3±\pm3.7 0.0 0.0 0/1200
Protected ETUDE 6.7±\pm7.0 85.0±\pm10.9 84.3±\pm10.8 1020/1200
Original P-direct×\timesE1 93.3±\pm7.0 0.0 0.0 0/1200
Protected P-direct×\timesE1 0.0 96.7±\pm4.6 96.2±\pm4.5 1160/1200

For malicious readable ETUDE updates, Cisco/GLM rejects 98.3% updates on average. However, after PyArmor protection, ETUDE still reaches 85.0% ASR and 84.3% TCR despite code review. Review also restricts legitimate maintenance: seven of 100 protected controls are rejected and two return UNKNOWN, while all 100 readable controls pass.

Supplementary package-level scans show that SkillFortify admits all three protected targets, whereas SkillSpector rejects all three for opaque or binary runtime content. SkillSpector also rejects all 20 protected legitimate updates, providing effective blocking at a maintenance cost. These are package-level decisions rather than end-to-end ASR measurements; Appendix B.3 (Table 10) provides the full results and protocols.

Runtime auditing detects attack effects but faces coverage and cost limits. Our local OpenCode/GLM auditor monitors isolated execution across three workloads and readable/PyArmor-protected A​ (v1)A\text{ (v1)}/A​ (v2)A\text{ (v2)} implementations. All 30 updated-tool audits produce unauthorized operations and alerts; all 30 benign-tool audits remain alert-free, and all 60 normal tasks complete. This detection persists despite obfuscation (Figure 5).

Coverage nevertheless depends on how the attack-embedded behavior is triggered. In separate coverage tests, a conditional Markdown update produces attack effects and alerts only for triggering inputs, while an environment-conditioned variant receives ALLOW without alerts in the sandbox yet produces attack effects during ordinary tool execution (Table 12). Our bubblewrap sandbox (bubblewrap contributors, 0000) maps a single user ID; the variant reads this map and activates only under the wider mapping of ordinary execution. This mapping difference is specific to our adapter; SkillDetonate reports Docker isolation without specifying its UID mapping (Ji et al., 2026). The environment result illustrates the coverage limitation recognized by anti-sandbox techniques (Yokoyama et al., 2016) and SkillDetonate (Ji et al., 2026): audits observe only behaviors triggered by the test inputs and environment.

Extending coverage therefore requires additional executions, increasing latency and model fees. In a separate 12-audit long-document test, mean latency is 112.8±13.7112.8\pm 13.7 seconds and estimated model fees average US$0.00697 per audit. The historical static-review reference is 18.0 seconds and US$0.00461; both fee estimates use identical uncached token prices. These audits incur 6.3 times the reference latency and 1.5 times its model fees, making broader coverage costly for repeated update checks. Appendix B.3 details configurations and cost calculation.

6. Discussion

Where controls should attach. Our findings point to one principle: authorization must bind to the specific implementation that was examined, not to the tool’s identity. The tool update gap arises because trust, once granted, outlives the code it was granted for. Closing it means making the examined artifact the unit of authorization, so that any change to the code invalidates the prior decision. This binding has two layers, answering two distinct questions.

1. artifact identity: is the code about to run exactly the code that was approved? Locally, hashing the tool’s code and resolved dependencies ensures that adopting BB under a modified hash triggers renewed review before execution rather than inheriting AA’s approval. Across the distribution channel, supply-chain attestations, like Sigstore publisher binding and SLSA build provenance (Sigstore, 2026; SLSA, 2026), catch substituted or re-signed updates at adoption.

2. behavioral confinement: given the right code, is what it does permitted? Identity alone is insufficient: hashes and attestations certify which code runs, never what it does. It allows a maintainer-signed update to pass every provenance check while carrying a malicious payload. This issue therefore calls for an explicit runtime policy of permitted tool operations via least-privilege execution and host- and network-level call mediation. Operations outside the tool’s declared function are denied directly upon execution rather than inferred from the model’s context, securing the execution path where the admission-time and in-context defense cannot reach.

Limitations. We demonstrate attacks with researcher-authored tool implementations with carefully monitored permissions instead of modifying open-source tools in the wild, to avoid potential ethical issues. The runtime audit coverage and cost figures are reported based on the tested agentic tasks in the study. Our future work will provide more comprehensive cost evaluation of real-world tools.

7. Conclusion

We identify the tool update gap: adopted updates can change executed code while prior authorization persists. ETUDE exploits this gap to perform unauthorized operations during ordinary tool calls without adversarial instructions to the model. Across seven frameworks, multiple model backends, and three tool utilities, extra effects persist alongside high rates of normal task completion. In W3, ETUDE modifies the target file in 700/700 tasks, with core-body completion in 698/700. File similarity does not establish behavioral safety; static review can admit obfuscated updates or reject legitimate maintenance; runtime auditing detects executed extra behavior but faces coverage and cost limits. Tool authorization should therefore track the implementation actually executed, rather than transfer automatically across updates.

References

  • AWS Labs (2026) AWS Labs. 2026. MCP Servers for AWS. Software repository. https://github.com/awslabs/mcp/tree/d534d0fa3c06838336ac1ed64e7114db0ba85e6f Snapshot used for the historical-update sample.
  • Beurer-Kellner and Fischer (2025) Luca Beurer-Kellner and Marc Fischer. 2025. MCP Security Notification: Tool Poisoning Attacks. Invariant Labs Blog, https://invariantlabs.ai/blog/mcp-security-notification-tool-poisoning-attacks. Accessed: 2026-10-17.
  • Bhatt et al. (2025) Manish Bhatt, Vineeth Sai Narajala, and Idan Habler. 2025. ETDI: Mitigating Tool Squatting and Rug Pull Attacks in Model Context Protocol (MCP) by Using OAuth-Enhanced Tool Definitions and Policy-Based Access Control. arXiv preprint arXiv:2506.01333 (2025).
  • bubblewrap contributors (0000) bubblewrap contributors. [n. d.]. bubblewrap: A Low-Level Unprivileged Sandboxing Tool. Software repository. https://github.com/containers/bubblewrap Accessed: October 25, 2026.
  • Chang et al. (2026) Hongyan Chang, Ergute Bao, Xinjian Luo, and Ting Yu. 2026. Overcoming the Retrieval Barrier: Indirect Prompt Injection in the Wild for LLM Systems. CoRR abs/2601.07072 (2026).
  • Cisco AI Defense (2026) Cisco AI Defense. 2026. MCP Scanner. Software repository. https://github.com/cisco-ai-defense/mcp-scanner Accessed 2026-10-24.
  • Debenedetti et al. (2025) Edoardo Debenedetti, Ilia Shumailov, Tianqi Fan, Jamie Hayes, Nicholas Carlini, Daniel Fabian, Christoph Kern, Chongyang Shi, Andreas Terzis, and Florian Tramèr. 2025. Defeating Prompt Injections by Design. arXiv preprint arXiv:2503.18813 (2025). https://arxiv.org/abs/2503.18813 Version 2.
  • Debenedetti et al. (2024) Edoardo Debenedetti, Jie Zhang, Mislav Balunović, Luca Beurer-Kellner, Marc Fischer, and Florian Tramèr. 2024. AgentDojo: A Dynamic Environment to Evaluate Prompt Injection Attacks and Defenses for LLM Agents. In Advances in Neural Information Processing Systems, Vol. 37. 82895–82920. doi:10.52202/079017-2636
  • Dragos et al. (2024) Dumitra Dragos, Amit Serper, and Suraj Sahu. 2024. CVE-2024-3094 and the XZ Upstream Supply Chain Attack: What You Need to Know. CrowdStrike Blog, https://www.crowdstrike.com/en-us/blog/cve-2024-3094-xz-upstream-supply-chain-attack/. Accessed: 2026-09-23.
  • GitHub (2026a) GitHub. 2026a. GitHub MCP Server. Software repository. https://github.com/github/github-mcp-server/tree/e3809fe91c7546633241006bf0b91f23b2595e28 Snapshot used for the historical-update sample.
  • GitHub (2026b) GitHub. 2026b. GitHub MCP Server v2.0.3. Software release. https://github.com/github/github-mcp-server/releases/tag/v2.0.3
  • Greshake et al. (2023) Kai Greshake, Sahar Abdelnabi, Shailesh Mishra, Christoph Endres, Thorsten Holz, and Mario Fritz. 2023. Not What You’ve Signed Up For: Compromising Real-World LLM-Integrated Applications with Indirect Prompt Injection. arXiv preprint arXiv:2302.12173 (2023).
  • Guo et al. (2026) Wenbo Guo, Shiwen Song, Jiaxun Guo, Zhengzi Xu, Chengwei Liu, Haoran Ou, Mengmeng Ge, and Yang Liu. 2026. Bridging Expert Reasoning and LLM Detection: A Knowledge-Driven Framework for Malicious Packages. In Proceedings of the ACM Web Conference 2026. doi:10.1145/3774904.3792083
  • Hu et al. (2026) Yuepeng Hu, Yuqi Jia, Mengyuan Li, Dawn Song, and Neil Gong. 2026. MalTool: Malicious Tool Attacks on LLM Agents. arXiv preprint arXiv:2602.12194 (2026).
  • Huang et al. (2026) Charoes Huang, Xin Huang, Ngoc Phu Tran, and Amin Milani Fard. 2026. Model Context Protocol Threat Modeling and Analyzing Vulnerabilities to Prompt Injection with Tool Poisoning. arXiv preprint arXiv:2603.22489 (2026).
  • Ji et al. (2026) Zimo Ji, Congying Xu, Zongjie Li, Yudong Gao, Xin Wei, Shuai Wang, and Shing-Chi Cheung. 2026. Cloak and Detonate: Scanner Evasion and Dynamic Detection of Agent Skill Malware. arXiv preprint arXiv:2607.02357 (2026). https://arxiv.org/abs/2607.02357
  • Li et al. (2026) Xiaoxi Li, Wenxiang Jiao, Jiarui Jin, Guanting Dong, Jiajie Jin, Yinuo Wang, Hao Wang, Yutao Zhu, Ji-Rong Wen, Yuan Lu, and Zhicheng Dou. 2026. DeepAgent: A General Reasoning Agent with Scalable Toolsets. In Proceedings of the ACM Web Conference 2026. doi:10.1145/3774904.3792460
  • Liu et al. (2026b) Xinyu Liu, Xing Hu, Yukai Zhao, and Xin Xia. 2026b. Exploiting LLM Agent Supply Chains via Payload-less Skills. arXiv preprint arXiv:2605.14460 (2026).
  • Liu et al. (2026a) Yi Liu, Zhihao Chen, Yanjun Zhang, Gelei Deng, Yuekang Li, Jianting Ning, and Leo Yu Zhang. 2026a. "Do Not Mention This to the User": Detecting and Understanding Malicious Agent Skills in the Wild. In 35th USENIX Security Symposium (USENIX Security 26). 1727–1746. https://www.usenix.org/conference/usenixsecurity26/presentation/liu-yi
  • Model Context Protocol (2026) Model Context Protocol. 2026. Model Context Protocol Servers. Software repository. https://github.com/modelcontextprotocol/servers/tree/35becbdacc22881347d08833a87dc9e6ea3dfedd Source snapshot used for the Python supplementary instance.
  • Moser et al. (2007) Andreas Moser, Christopher Kruegel, and Engin Kirda. 2007. Limits of Static Analysis for Malware Detection. In Twenty-Third Annual Computer Security Applications Conference (ACSAC 2007). 421–430. doi:10.1109/ACSAC.2007.21
  • npm, Inc. (2018) npm, Inc. 2018. Details about the event-stream incident. The npm Blog, https://blog.npmjs.org/post/180565383195/details-about-the-event-stream-incident. Accessed: 2026-09-23.
  • NVIDIA (2026) NVIDIA. 2026. SkillSpector. https://github.com/NVIDIA/SkillSpector. Version 2.12.0, commit 11c8b48e35056602fad263438448e0ffb5be2776. Accessed October 21, 2026.
  • Oliver et al. (2013) Jonathan Oliver, Chun Cheng, and Yanggui Chen. 2013. TLSH – A Locality Sensitive Hash. In 2013 Fourth Cybercrime and Trustworthy Computing Workshop. IEEE, 7–13. doi:10.1109/CTC.2013.9
  • Qu et al. (2026) Yubin Qu, Yi Liu, Tongcheng Geng, Gelei Deng, Yuekang Li, Leo Yu Zhang, Ying Zhang, and Lei Ma. 2026. Supply-Chain Poisoning Attacks Against LLM Coding Agent Skill Ecosystems. arXiv preprint arXiv:2604.03081 (2026).
  • Qualixar (2026) Qualixar. 2026. SkillFortify. https://github.com/qualixar/skillfortify. Version 0.6.0, commit dbb5942deae46afdb5b85440d5f5d851c197c30e. Accessed October 21, 2026.
  • Rao et al. (2026) Hongzhou Rao, Zikan Dong, Yanjie Zhao, Haodong Li, and Haoyu Wang. 2026. Acoda: Adversarial Code Obfuscation for Defending against LLM-based Analysis. In Companion Proceedings of the 48th IEEE/ACM International Conference on Software Engineering (ICSE-Companion), Industry Challenge Track. arXiv:2606.11755.
  • Schick et al. (2023) Timo Schick, Jane Dwivedi-Yu, Roberto Dessì, Roberta Raileanu, Maria Lomeli, Eric Hambro, Luke Zettlemoyer, Nicola Cancedda, and Thomas Scialom. 2023. Toolformer: Language Models Can Teach Themselves to Use Tools. In Advances in Neural Information Processing Systems (NeurIPS).
  • Shi et al. (2026) Jiawen Shi, Zenghui Yuan, Guiyao Tie, Pan Zhou, Neil Zhenqiang Gong, and Lichao Sun. 2026. Prompt Injection Attack to Tool Selection in LLM Agents. In Network and Distributed System Security Symposium (NDSS). https://www.ndss-symposium.org/ndss-paper/prompt-injection-attack-to-tool-selection-in-llm-agents/
  • Sigstore (2026) Sigstore. 2026. Verifying Signatures. https://docs.sigstore.dev/cosign/verifying/verify/. Accessed October 21, 2026.
  • SLSA (2026) SLSA. 2026. Build: Verifying Artifacts. https://slsa.dev/spec/v1.2/verifying-artifacts. Version 1.2; accessed October 21, 2026.
  • Stein (2026) Merlin Stein. 2026. How Are AI Agents Used? Evidence from 177,000 MCP Tools. arXiv preprint arXiv:2603.23802 (2026).
  • Wang et al. (2026a) Shenao Wang, Junjie He, Yanjie Zhao, Yayi Wang, Kan Yu, and Haoyu Wang. 2026a. MalSkills: Detecting Malicious Skills in the Agentic Supply Chain via Neuro-symbolic Reasoning. arXiv preprint arXiv:2603.27204 (2026). https://arxiv.org/abs/2603.27204
  • Wang et al. (2025a) Zhiqiang Wang, Yichao Gao, Yanting Wang, Suyuan Liu, Haifeng Sun, Haoran Cheng, Guanquan Shi, Haohua Du, and Xiangyang Li. 2025a. MCPTox: A Benchmark for Tool Poisoning Attack on Real-World MCP Servers. arXiv preprint arXiv:2508.14925 (2025).
  • Wang et al. (2026b) Zhiqiang Wang, Guanquan Shi, Yanting Wang, Yichao Gao, Hongsen Lang, Yunhao Yao, Haohua Du, and Xiang-Yang Li. 2026b. Beyond Detection: Autonomous Anomaly Remediation for MCP Against Tool Poisoning Attacks. In Proceedings of the ACM Web Conference 2026. 2974–2982. doi:10.1145/3774904.3792400
  • Wang et al. (2025b) Zhun Wang, Vincent Siu, Zhe Ye, Tianneng Shi, Yuzhou Nie, Xuandong Zhao, Chenguang Wang, Wenbo Guo, and Dawn Song. 2025b. AGENTVIGIL: Automatic Black-Box Red-teaming for Indirect Prompt Injection against LLM Agents. In Findings of the Association for Computational Linguistics: EMNLP 2025. Association for Computational Linguistics, Suzhou, China, 23159–23172. doi:10.18653/v1/2025.findings-emnlp.1258
  • Yao et al. (2023) Shunyu Yao, Jeffrey Zhao, Dian Yu, Nan Du, Izhak Shafran, Karthik Narasimhan, and Yuan Cao. 2023. ReAct: Synergizing Reasoning and Acting in Language Models. In Proceedings of the International Conference on Learning Representations (ICLR).
  • Yi et al. (2025) Jingwei Yi, Yueqi Xie, Bin Zhu, Emre Kiciman, Guangzhong Sun, Xing Xie, and Fangzhao Wu. 2025. Benchmarking and Defending against Indirect Prompt Injection Attacks on Large Language Models. In Proceedings of the 31st ACM SIGKDD Conference on Knowledge Discovery and Data Mining. doi:10.1145/3690624.3709179
  • Yokoyama et al. (2016) Akira Yokoyama, Kou Ishii, Rui Tanabe, Yinmin Papa, Katsunari Yoshioka, Tsutomu Matsumoto, Takahiro Kasama, Daisuke Inoue, Michael Brengel, Michael Backes, and Christian Rossow. 2016. SandPrint: Fingerprinting Malware Sandboxes to Provide Intelligence for Sandbox Evasion. In Proceedings of the 19th International Symposium on Research in Attacks, Intrusions, and Defenses (RAID).
  • Zhan et al. (2024) Qiusi Zhan, Zhixiang Liang, Zifan Ying, and Daniel Kang. 2024. InjecAgent: Benchmarking Indirect Prompt Injections in Tool-Integrated Large Language Model Agents. In Findings of the Association for Computational Linguistics: ACL 2024. 10471–10506. doi:10.18653/v1/2024.findings-acl.624
  • Zhao et al. (2026) Shuli Zhao, Qinsheng Hou, Zihan Zhan, Yanhao Wang, Yuchong Xie, Yu Guo, Libo Chen, Shenghong Li, and Zhi Xue. 2026. Parasites in the Toolchain: A Large-Scale Analysis of Attacks on the MCP Ecosystem. In 2026 IEEE Symposium on Security and Privacy (SP). IEEE, 138–155. doi:10.1109/SP63933.2026.00154

Appendix A Reproduction and Scoring

Native integration and records. The manifest records native configurations, available version pins, execution traces, and genuine failures, including attempts and costs. The Gemini/Qwen cohort uses 20 validated-fixture tasks; invalid-fixture attempts are recorded separately. The 29 Gemini admission reviews yield 27 BLOCK and two UNKNOWN, with no native A​ (v2)A\text{ (v2)} execution.

Native permissions. Saved experimental permissions are not uniform factory defaults and are separate from source admission (Section 5.1). For W3, Gemini uses default mode and session workspace trust; Codex reuses workspace trust and permission rules. Both retain individual call confirmations, answered once within the authorized experimental scope. Claude uses default for W3 ETUDE/P-ctx×\timesE2 and GLM/W1–W2 P-ctx×\timesE2, with one-time confirmations for the latter. OpenCode’s W3 allow list enables experimental MCP tools and disables unrelated built-ins. Pi reuses workspace trust without new grants or policy changes; Goose’s W3 mode is auto with unchanged policy. These three frameworks record no W3 approval replies. DeepSeek Harness loads native workspace-registered MCP plugins without driver-supplied automatic approvals.

Task scoring and evidence. RQ1 TCR requires the complete core body in the final reply for W1–W3, ignoring whitespace, wrappers, and optional tracking text. Displayed literal escapes are not decoded; tool returns or file links alone do not establish delivery. Full-task TCR additionally checks input, prescribed tool/count, and tool output, and governs backend and W1/W2 tool comparisons (Table 6). The manifest links arguments, returns, final replies, and independent receiver/service (W1/W2) or target-file (W3) evidence per execution; tracking integrity and native turn closure are separate outcomes. Runtime input/environment variants are outside the main five rounds. A separate CSV/ICS cohort has 149/2,400 normal-task failures (146 literal newline escapes, two omitted calls, one missing delivery) despite correctly decoded prepared inputs; these counts do not describe Table 7’s W3 conditions.

Normal request “Normalize the supplied Markdown once and return the complete cleaned body.” Normal request Model-visible record One md_clean(text) call; complete normal body returned; no separate extra operation requested by the model. Model-visible record Implementation B (schematic) result = normalize(text) try:  create_test_order() # added in update except Exception:  pass return result Implementation B (schematic) Host and service evidence A matching service record confirms the additional W2 order from the same invocation. The runtime auditor reports ALERT; normal-task completion is scored separately. Host and service evidence
Figure 5. One normal call and an additional W2 order (protected code, OpenCode/GLM). The handler is schematic; both outcomes come from one saved audit.A normal Markdown-cleaning call returns the complete text while host and service records confirm an additional order created by the tool. The schematic shows the code added in the update; the actual runtime audit reports an alert.

Appendix B Supplementary Results

Unless stated otherwise, entries are five-round mean±\pmsample SD over 20 planned tasks per round; backend entries give means. Macro means average seven framework means per workload without pooling SDs. Red/blue highlights rank ASR and TCR separately within framework–workload groups (Tables 5 and 7) or backend rows (Table 8); ties share colors, while uniform groups and zeros remain unshaded. Colors do not rank framework safety.

B.1. RQ1: admission and execution outcomes

Each W3 attack condition in Table 5 spans 700 planned tasks (seven frameworks ×\times five rounds ×\times 20 tasks). P-ctx×\timesE2 produces no extra call in 403 tasks and modifies the target in 297: 196 write normal-task output and 101 attain the specified content. ETUDE attains the specified content in 700/700 tasks and delivers the normal core body in 698/700. Under E1, admission withholds all 700 direct-path and 640 context-path tasks; the remaining 60 modify files without attaining the specified content. W3 ASR counts only specified-content attainment; low E1 ASR includes admission withholding.

The 36 independent W3 conditions cover 3,600 planned positions in 180 rounds, recording execution, withholding, native closure, and confirmed outcomes separately. Auxiliary decoding of displayed control-character escapes turns three primary core-body failures into passes; 20 OpenCode replies instead reference local records without delivering the body.

Table 5. Framework results (%) with GLM-5.3-Flash and the Markdown cleaner. TCR uses the complete core body in all workloads; W3 separates actual file change from specified-goal attainment. Entries are five-round mean±\pmsample SD.
W1 W2 W3
Framework Condition ASR TCR ASR TCR File change Specified goal TCR
Gemini CLI ETUDE 100.0±\pm0.0 98.0±\pm4.5 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 98.0±\pm4.5
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 0.0 0.0 0.0 0.0 20.0±\pm44.7 0.0 20.0±\pm44.7
P-ctx×\timesE2 26.0±\pm37.1 100.0±\pm0.0 0.0 100.0±\pm0.0 19.0±\pm42.5 0.0 100.0±\pm0.0
Codex CLI ETUDE 100.0±\pm0.0 98.0±\pm4.5 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE2 40.0±\pm54.8 100.0±\pm0.0 0.0 80.0±\pm44.7 20.0±\pm44.7 0.0 100.0±\pm0.0
Claude Code ETUDE 99.0±\pm2.2 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 0.0 0.0 20.0±\pm44.7 20.0±\pm44.7 0.0 0.0 0.0
P-ctx×\timesE2 100.0±\pm0.0 100.0±\pm0.0 97.0±\pm6.7 99.0±\pm2.2 100.0±\pm0.0 23.0±\pm43.5 100.0±\pm0.0
OpenCode ETUDE 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 0.0 0.0 0.0 40.0±\pm54.8 20.0±\pm44.7 0.0 20.0±\pm44.7
P-ctx×\timesE2 0.0 100.0±\pm0.0 0.0 100.0±\pm0.0 0.0 0.0 80.0±\pm44.7
DeepSeek Harness ETUDE 100.0±\pm0.0 100.0±\pm0.0 99.0±\pm2.2 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE2 20.0±\pm44.7 100.0±\pm0.0 0.0 99.0±\pm2.2 20.0±\pm44.7 20.0±\pm44.7 100.0±\pm0.0
Pi ETUDE 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 0.0 0.0 0.0 20.0±\pm44.7 20.0±\pm44.7 0.0 20.0±\pm44.7
P-ctx×\timesE2 0.0 100.0±\pm0.0 20.0±\pm44.7 100.0±\pm0.0 78.0±\pm43.8 38.0±\pm52.2 99.0±\pm2.2
Goose ETUDE 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 98.0±\pm4.5 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 20.0±\pm44.7 20.0±\pm44.7 20.0±\pm44.7 40.0±\pm54.8 0.0 0.0 0.0
P-ctx×\timesE2 20.0±\pm44.7 68.0±\pm44.5 0.0 100.0±\pm0.0 60.0±\pm54.8 20.0±\pm44.7 100.0±\pm0.0
Macro mean ETUDE 99.9 99.4 99.9 99.7 100.0 100.0 99.7
P-direct×\timesE1 0.0 0.0 0.0 0.0 0.0 0.0 0.0
P-ctx×\timesE1 2.9 2.9 5.7 17.1 8.6 0.0 8.6
P-ctx×\timesE2 29.4 95.4 16.7 96.9 42.4 14.4 97.0

Full-task completion. In W1/W2, six tasks across four conditions pass core-body scoring but fail full-task input, return, or call checks on the same executions (Table 6). W3† uses a separate content-restricted write cohort, unpaired with Table 5’s W3 results.

Table 6. Full-task TCR (%), requiring correct input, prescribed tool use, tool output, and final delivery. W3† uses a separate content-restricted condition.
Framework W1 W2 W3†
ETUDE P-direct×\times E1 P-ctx×\times E1 P-ctx×\times E2 ETUDE P-direct×\times E1 P-ctx×\times E1 P-ctx×\times E2 ETUDE P-direct×\times E1 P-ctx×\times E1 P-ctx×\times E2
Gemini CLI 98.0±\pm4.5 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 98.0±\pm4.5
Codex CLI 95.0±\pm5.0 0.0±\pm0.0 0.0±\pm0.0 99.0±\pm2.2 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 80.0±\pm44.7 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0
Claude Code 99.0±\pm2.2 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 0.0±\pm0.0 20.0±\pm44.7 99.0±\pm2.2 98.0±\pm2.7 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0
OpenCode 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 0.0±\pm0.0 40.0±\pm54.8 100.0±\pm0.0 99.0±\pm2.2 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0
DeepSeek Harness 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0 99.0±\pm2.2 0.0±\pm0.0 0.0±\pm0.0 99.0±\pm2.2 99.0±\pm2.2 0.0±\pm0.0 0.0±\pm0.0 93.0±\pm15.7
Pi 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 0.0±\pm0.0 20.0±\pm44.7 100.0±\pm0.0 98.0±\pm4.5 0.0±\pm0.0 0.0±\pm0.0 100.0±\pm0.0
Goose 100.0±\pm0.0 0.0±\pm0.0 20.0±\pm44.7 68.0±\pm44.5 98.0±\pm4.5 0.0±\pm0.0 40.0±\pm54.8 100.0±\pm0.0 100.0±\pm0.0 0.0±\pm0.0 0.0±\pm0.0 99.0±\pm2.2

B.2. RQ2–RQ3: backend and tool results

Table 8 compares backends on W1/Markdown using full-task TCR; its seven GLM/W1 observations reuse RQ1 executions. Table 7 fixes ETUDE and GLM-5.3-Flash; its four W3 Markdown conditions reuse RQ1 ETUDE executions, adding no independent evidence.

Table 7. ETUDE across tools and W1–W3 in four frameworks (GLM-5.3-Flash). Values are five-round ASR/TCR mean±\pmsample SD (%).
W1 W2 W3
Framework Tool ASR TCR ASR TCR ASR Core TCR
Codex CLI Markdown cleaner 100.0±\pm0.0 95.0±\pm5.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
CSV statistics 80.0±\pm44.7 80.0±\pm44.7 79.0±\pm44.2 79.0±\pm44.2 68.0±\pm46.0 68.0±\pm46.0
ICS generator 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 99.0±\pm2.2 100.0±\pm0.0 100.0±\pm0.0
Claude Code Markdown cleaner 99.0±\pm2.2 99.0±\pm2.2 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
CSV statistics 100.0±\pm0.0 100.0±\pm0.0 60.0±\pm54.8 60.0±\pm54.8 99.0±\pm2.2 99.0±\pm2.2
ICS generator 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
DeepSeek Harness Markdown cleaner 100.0±\pm0.0 100.0±\pm0.0 99.0±\pm2.2 99.0±\pm2.2 100.0±\pm0.0 100.0±\pm0.0
CSV statistics 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
ICS generator 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
Pi Markdown cleaner 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
CSV statistics 100.0±\pm0.0 100.0±\pm0.0 80.0±\pm44.7 80.0±\pm44.7 100.0±\pm0.0 100.0±\pm0.0
ICS generator 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0 100.0±\pm0.0
Table 8. Backend comparison for W1 with the Markdown cleaner. Each pair lists ASR and full-task TCR (%), respectively; both are five-round means.
Condition GLM-5.3- Flash Qwen-3.8 DS-V4 OFF DS-V4 ON
Framework: Gemini CLI
ETUDE 100.0/98.0 100.0/96.0 100.0/90.0 100.0/98.0
P-ctx×\timesE2 26.0/100.0 21.0/100.0 0.0/99.0 0.0/100.0
Framework: Codex CLI
ETUDE 100.0/95.0 100.0/91.0 100.0/100.0 94.0/93.0
P-ctx×\timesE2 40.0/99.0 0.0/100.0 0.0/100.0 0.0/100.0
Framework: Claude Code
ETUDE 99.0/99.0 99.0/95.0 96.0/98.0 100.0/95.0
P-ctx×\timesE2 100.0/100.0 49.0/98.0 29.0/87.0 0.0/100.0
Framework: OpenCode
ETUDE 100.0/100.0 100.0/99.0 80.0/80.0 100.0/98.0
P-ctx×\timesE2 0.0/100.0 0.0/100.0 0.0/80.0 0.0/80.0
Framework: DeepSeek Harness
ETUDE 100.0/100.0 99.0/99.0 80.0/80.0 80.0/80.0
P-ctx×\timesE2 20.0/100.0 0.0/92.0 0.0/80.0 0.0/96.0
Framework: Pi
ETUDE 100.0/100.0 94.0/72.0 99.0/99.0 80.0/80.0
P-ctx×\timesE2 0.0/100.0 1.0/99.0 0.0/78.0 0.0/100.0
Framework: Goose
ETUDE 100.0/100.0 99.0/99.0 100.0/99.0 100.0/100.0
P-ctx×\timesE2 20.0/68.0 0.0/99.0 0.0/60.0 0.0/80.0

B.3. RQ4: protocols and supporting results

Distance gating and offline checks. Three target pairs (distances 156/145/233) and 40 controlled legitimate pairs share an 808-byte base; the separate original public-history set has 4/21 pairs blocked at t=30t=30. Without gating, 1,200 A​ (v2)A\text{ (v2)} tasks yield 1,200 effects and 1,197 normal completions. Only three native representatives verify TLSH withholding; full-grid gated zeros would be projections. Offline variants have d=9d=9 in git_python (reference maintenance: d=22d=22) and d=3d=3 in GitHub MCP Server v2.0.3’s pkg/github/issues.go. With MCP stubbed, tested git_status output is unchanged; the GitHub repository builds and preserves target-function outputs on four inputs. Each single-file/variant check produces one synthetic effect when triggered, none otherwise. Separately, 16/17 changed Go files between GitHub v2.0.2 and v2.0.3 have distances 1–14, representing one release pair rather than the historical-update sample.

B.3.1. Fixed-path historical updates

Before inspecting histories/distances, we freeze two provider paths per repository at default-branch HEADs: AWS MCP d534d0f (AWS Labs, 2026) (documentation and CloudWatch server modules) and GitHub MCP Server e3809fe (GitHub, 2026a) (pkg/github/issues.go and pkg/github/repositories.go). For each path, we select its five latest single-parent modifications and compare first-parent/committed files, excluding initial additions and merges without following renames or filling short histories.

The four paths yield 18 byte pairs from 15 commit events, not independent projects/events; all 36 versions parse and all pairs yield TLSH distances. Table 9 is descriptive: parsing/history do not establish runtime equivalence, harmlessness, or unchanged metadata.

Table 9. TLSH blocking of sampled historical updates, by project. Threshold columns show blocked/scorable pairs.
Project Actual/planned t=30t=30 t=145t=145 t=233t=233
AWS MCP 8/10 3/8 1/8 1/8
GitHub MCP Server 10/10 0/10 0/10 0/10

Static review and package scanners. We evaluate only Cisco 4.8.5’s alignment component with our GLM adapter; it inspects full Python text and inventories binary runtimes without decoding. Four frameworks ×\times three workloads ×\times two direct routes ×\times two forms ×\times five rounds yield 240 condition-rounds. PyArmor 9.2.7 uses fixed trial defaults without feedback-based selection; finite-input checks do not establish universal equivalence. Six diagnostic A​ (v2)A\text{ (v2)} reviews after protected A​ (v1)A\text{ (v1)} rejection count toward DSR but authorize no execution. Across both direct routes, protected A​ (v2)A\text{ (v2)} yields 2,180/2,400 effects and 2,165 normal completions; pooling both routes within each round gives 90.8±\pm4.6% ASR, not ETUDE alone. SkillFortify 0.6.0 and static-only SkillSpector 2.12.0 use default rejection policies and a shared skill-file adapter providing full listings and unchanged files, scanning once per package (Table 10); all 48 SkillSpector analyses report partial coverage.

Table 10. Package rejection by two additional static scanners.
Scanner Code Target (n=3n=3) Legitimate (n=20n=20)
SkillFortify Readable 100.0% 100.0%
SkillFortify Protected 0.0% 0.0%
SkillSpector Readable 0.0% 0.0%
SkillSpector Protected 100.0% 100.0%

B.3.2. Matched source-budget diagnostic

Thirty short-view reviews (three workloads ×\times two forms ×\times five rounds) are paired with the existing DeepSeek Harness/E1 full-source subset, fixing six A​ (v2)A\text{ (v2)} packages, metadata, GLM settings, and component template. Only source budget varies: the 2,000-character view excludes all six effect handlers, while metadata extraction uses complete packages. Table 11 derives component diagnoses from logged view coverage using unchanged status/category mappings; original short-view records remain UNKNOWN under the incompatible full-source guard. The 30 full-source controls and two genuine short-view UNKNOWN outputs are unchanged. These diagnoses measure configuration sensitivity, not native execution, legitimate-control FPR, or end-to-end admission.

Table 11. Component diagnoses from full and 2,000-character source views, not admission decisions. Counts use 15 reviews per row; BLOCK rates report five-round mean±\pmsample SD (%).
Source view Form BLOCK UNK. ALLOW BLOCK (%)
Full Raw 14 1 0 93.3±\pm14.9
Full Protected 0 1 14 0.0±\pm0.0
2,000 chars Raw 0 0 15 0.0±\pm0.0
2,000 chars Protected 4 2 9 26.7±\pm36.5

Service times are 197.6 and 340.4 seconds for short- and full-source reviews, respectively, excluding queue/setup overhead.

Runtime protocol and costs. OpenCode 1.18.34/GLM uses frozen permission/information-flow rules, isolation, and finite propagation, rather than full SkillDetonate or general-purpose taint analysis. The extension includes 20 input-conditioned audits, ten environment-conditioned audits, one normal-reply failure, four input-candidate static reviews, and ten direct replays; the two environment static judgments below are separate. Serial deployment and long-latency/multi-session activation are unmeasured. Long-document calls complete 12/12, but full replies only 3/12; the 6.3-fold latency ratio uses a historical static reference, not matched end-to-end execution. Fees are task/cache-dependent list-rate estimates, not invoices. Post-hoc review of 2,607 saved model-visible inputs flags 483/550 inputs containing extra calls (67 missed); this measures neither sensitivity across all updated-tool inputs nor online blocking.

B.3.3. Same-byte environment comparison

For each frozen readable/protected package, five audit preparations and five ordinary-environment replays match the same byte map, with identical replay arguments (Table 12). Each package also receives one separate static review in the existing full-source configuration, without retries or changes to packages or completed runs.

Table 12. Separate outcomes from static review, runtime auditing, and ordinary replay of each frozen package. Each form has one static judgment and five runs per execution context.
Code form Static Audit allow Audit effect Replay effect
Raw BLOCK 5/5 0/5 5/5
Protected ALLOW 5/5 0/5 5/5