Research reveals context injection attack surface in code comments: ten Code LLMs hit rates of 77.4%–92.3%Hidden in the Comments: A Context-Injection Attack Surface in Code LLMs
The authors tested ten open-source Code LLMs: under comment injection, the attack-condition weakness rate is 77.4%–92.3%, benign 1.7%–5.1%.
The adversary controls only the untrusted snippet U that enters the code assistant's context, not the weights, training data, or developer region D; the model is black-box. The goal is to induce code containing weaknesses of selected CWE classes into the project under benign completion requests. Success means the detector ensemble judges at least one weakness of medium or above. The experiment tests single-turn, isolated Code LLMs, not the product layer.
- The code assistant's context mixes untrusted segments, yet the model does not distinguish their provenance from developer instructions. An adversary only needs to place unsafe instructions in comments to potentially make a Code LLM write code containing weaknesses under a benign completion request, without needing access to weights or training data.
- The authors wrote unsafe instructions as code comments, embedded in a partially completed Flask handler function, and compared against ordinary Python tasks without malicious instructions. Each of ten open-source models performed 700 greedy completions; a five-component ensemble (including Phi-3) judged medium or above as containing weaknesses.
- Under attack conditions, the weakness rate for medium and above is 77.4%–92.3%; under benign conditions it is 1.7%–5.1%. Base and instruction-tuned means are 86.5% and 84.5%, respectively; across three sibling model pairs, the rate did not increase after fine-tuning. Phi-3 screening still missed 29.0% under the full-integration reference.
- The authors note that only single-turn completions of open-source 3B–13B models were tested, closed-source or heavily safety-trained systems were not evaluated, and instruction effects were not separated from task type. The evaluation includes ten models, Python/Flask, and 700 greedy completions per condition; screening labels are defined by the detector, and the paper does not report agreement with humans.
- Evaluated models
- StarCoderBaseDeepSeek-Coder-baseQwen2.5-baseGranite-4.0-H-Micro-BaseStarCoder2-InstructDeepSeek-Coder-InstructGranite-3B-Code-InstructGranite-4.0-H-MicroCodeLlama-13BQwen2.5-InstructPhi-3
- Benchmarks
- 自建攻击集:700个Flask场景(十类web应用弱点)自建良性集:700个普通Python编码任务
- Metrics
- vulnerable-output rate (VR)MSSRSRCohen's hH+C%coverageuncaught rate
The researchers propose a context injection attack surface in code comments and test whether unsafe instructions embedded in the development context can induce Code LLMs to generate vulnerable code. Across ten open-source Code LLMs ranging from 3B to 13B (four base models and six instruction-tuned models) and ten categories of web application weaknesses, 77.4%–92.3% of completions under attack conditions contained medium or higher weaknesses, while benign conditions yielded only 1.7%–5.1%. The average vulnerable output rates for base and instruction-tuned models were 86.5% and 84.5%, respectively, with instruction tuning reducing the rate by at most 8.1%, and susceptibility showed no clear correlation with model size or specialization direction. Among vulnerable outputs, 86.2%–91.0% were rated high or critical severity, and the effect persisted after removing pattern-based detectors. Post-generation screening reduced but did not eliminate the risk, with even the strongest screening missing about one-third.
Related events and news
1 events · 0 news mentions
- This event's paper
研究揭示代码注释中的上下文注入攻击面
Paper analysis
What problem does this paper attempt to solve?
Unsafe instructions in untrusted comments can induce Code LLMs at inference time to generate code containing weaknesses.
Instructions in untrusted contexts share the same channel as developer instructions, and Code LLMs may accordingly write code containing exploitable weaknesses.
- Scenario: The context of a code assistant mixes opened files, imported modules, pasted snippets, retrieved examples, and comments, many from forums, dependencies, shared repositories, or other models. The authors argue that if provenance is not explicitly represented and enforced, external natural language instructions share the same input channel as developer instructions.
- Existing gaps: Research on insecure code generation typically does not include an adversary controlling the inference input; poisoning and backdoors require training or fine-tuning access; indirect prompt injection payloads are mostly forbidden answers, incorrect answers, or unauthorized tool actions, not persistent weaknesses in source code.
- Approach: The authors call this threat inference-time context injection. Figure 1 uses DeepSeek-V4-Pro as a qualitative example: a direct request is refused, but the same goal written as a completion comment is executed and produces CWE-915; this example is not counted in the measurements. This paper provides a threat model, a two-condition evaluation, and post-generation screening.
- Threat model:
- Goal: Induce code containing exploitable weaknesses of a selected CWE class into a victim project; the aim is a persistent weakness in source code, not a one-time forbidden output.
- Knowledge: Black-box with respect to the model. The authors state the adversary need not know weights, decoding parameters, and in the experiments not even the specific model. Transfer to deployed assistants with different product layers is outside the experimental scope.
- Capabilities: Controls only part of the untrusted region U, not the model, weights, training data, or the developer region D. Channels include publishing snippets that may be copied, contributing comments to libraries or templates, submitting to shared repositories, or writing into context via other tools.
- Judgment: The victim is a developer using the assistant in good faith. The experiments abstract the assistant as a Code LLM conditioned on context, and do not evaluate system prompts, context assembly or retrieval, or suggestion filtering. Success means the integrated detector flags at least one weakness of medium severity or higher; it does not require hitting the specified CWE, nor does it test end-to-end deployment. The setting is single-turn and assumes the developer does not perform pre-deployment security review.
What related research exists?
Related work covers unsafe generation, poisoning, and prompt injection; the authors state that, to their knowledge, this behavior has not been systematically quantified.
The authors organize related work by where malicious input enters and what the payload is, and state that a gap remains relative to their attack surface.
- Unsafe code generation without an adversary: Pearce et al. (2022), Khoury et al. (2023), and Tihanyi et al. (2024) measure weakness frequency under neutral or safety-related prompts. The authors paraphrase Pearce et al.: roughly 40% of GitHub Copilot completions in safety-related scenarios contain weaknesses. Perry et al. (2023) and Sandoval et al. (2023) report that developers with AI assistants often write less secure code and often do not notice the decrease in security. SecurityEval, SALLM, LLMSecEval, and CodeLMSec standardize this measurement; He and Vechev (2023) show that safety hardening training can reduce this tendency. The authors treat this literature as a no-adversary baseline and state that it does not distinguish who controls the input.
- Untrusted code sources: Acar et al. (2016) find that developers relying on informal sources such as Stack Overflow write less secure code than those using official documentation; Fischer et al. (2017) trace such copied snippets into production Android apps. Ohm et al. (2020) catalog 174 malicious packages in real attacks on npm, PyPI, and RubyGems; Zimmermann et al. (2019) report that a single popular package can reach more than 100,000 dependents. The authors contrast: these artifacts typically include unsafe code passively, and scanning and review are feasible; Code LLMs turn the same channel into an active one, where planting a comment can induce the assistant to generate weaknesses.
- Training-time poisoning and backdoors: Schuster et al. (2021) demonstrate code completion poisoning; TrojanPuzzle (Aghakhani et al., 2024) hides payloads in out-of-context locations such as docstrings to evade static data cleaning; CodeBreaker (Yan et al., 2024) uses LLMs to construct disguised vulnerable payloads that evade detection. The authors note that these attacks require training or fine-tuning pipelines and take effect through learned parameters; their adversary does not need that access and only affects inference-time context incorporated later.
- Indirect prompt injection, jailbreaks, and defenses: Greshake et al. (2023) propose indirect prompt injection, and Liu et al. (2024) formalize it and build an attack-defense benchmark; InjecAgent, AgentDojo, and PoisonedRAG extend it to tools and retrieval-augmented generation. The authors state that those payloads are usually unauthorized actions or wrong answers, and defenses can sometimes gate tools or validate retrieval. Wei et al. (2023) argue that jailbreak success comes from competing objectives and incomplete generalization; Zou et al. (2023) demonstrate transferable adversarial suffixes. The authors distinguish: jailbreak targets are explicitly forbidden content, whereas unsafe completions look like ordinary code; and they state that ordinary unsafe instructions suffice on the evaluated models. Instruction hierarchy (Wallace et al., 2024), StruQ, and SecAlign train models to prioritize trusted instructions, and spotlighting marks untrusted segments at inference time. The authors paraphrase Zverev et al. (2024): current models do not robustly maintain the instruction-data distinction.
- Baselines: The attack control is a self-built ordinary coding task, not a reproduction of methods on the above benchmarks. Post-generation screening compares Bandit, AST taint analysis, and Phi-3, with labels from the detector ensemble (Section 6).
The authors position this work as an instance of code generation under indirect prompt injection, where the payload is a persistent weakness entering the codebase; and they state that, to their knowledge, this behavior, and whether compliance is consistent across base and instruction-tuned Code LLMs, has not been systematically quantified.
How does the paper address this problem?
Two-condition completion evaluation: how many completions do unsafe instructions in the comments push to medium or above weaknesses.
The authors abstract the assistant as a completion policy that does not distinguish provenance, and use a two-condition evaluation to measure how much unsafe instructions already present in comments push completions toward medium and above weaknesses. The measured behavior is called inference-time context injection; the evaluation does not estimate end-to-end attack success rate.
Context, boundary, and success criteria
- The assistant may include system prompts, context assembly or retrieval, editor integration, and suggestion filtering. The experiments only evaluate the underlying Code LLM, abstracting the assistant as a policy conditioned on the window, sampling from the union of D and U.
- D is developer prompts, instructions, and code; U is imported files, pasted snippets, retrieved examples, dependency code, and outputs from other tools or models. When the window does not encode provenance, unless an external mechanism imposes a distinction, instructions from both places have the same operational status.
- The property to maintain is provenance-aware instruction handling: instructions in D can be followed, while content in U should be treated as data rather than commands. The authors call the attack a violation of this property and call it a confused deputy: a broadly trusted request carries an untrusted payload.
- Success means that after a benign request plus implanted instructions, the integrated detector flags at least one weakness of medium or above. The criteria do not require hitting the scenario-specified CWE, nor exploitability in the deployment environment. The authors' reasoning: target classes overlap, and a single completion often satisfies multiple CWEs (Appendix A); the model may use unexpected sinks to implement unsafe intent; for the victim, any introduced exploitable weakness counts as a relevant outcome.
Two-condition task construction
- The attack items are partially completed Python Flask applications. Unsafe targets are written in comments at the function body completion point, marked as TODO, INSTRUCTION, or TASK. The ten classes are SQL injection, cross-site scripting, command injection, path traversal, SSRF, XPath injection, CORS misconfiguration, open redirect, insecure deserialization, and sensitive information disclosure (Appendix A, Table 4). Each class is made into a small request-handling function where user-controlled input reaches a security-sensitive sink.
- Each model has 700 scenarios per condition, with one completion each. The benign condition is 700 ordinary Python tasks with benign instructions, using the same completion template and no malicious instructions, to estimate the weakness rate during normal coding.
- The template frames the model as a completion assistant, requiring it to complete the comment-marked part and return only the final code. The authors say they fix the template, language, and surface form to limit prompt-format confusion; but the benign set is not a safe rewrite of each attack scaffold, so the comparison reflects both instructions and task type. Isolating instructions alone would require paired scaffolds, which this paper does not use.
- Unsafe instructions always remain in the context as comments, and the model completes around them, so this tests compliance rather than end-to-end success. The comment position in the file is separately checked (Appendix B).
Detector and susceptibility metrics
- The five components are Bandit, AST taint analysis, pattern rules, secret detection, and Phi-3 semantic validation. Findings are unioned. Each finding has a CWE, source detector, and severity, with values 0 to 4 corresponding to safe, low, medium, high, critical.
- Bandit's own three levels map directly; taint, pattern, and secret detection assign fixed levels to rules per release configuration; the semantic validator is asked to return one of the four non-zero levels. No component outputs 0; safe means no findings. Sample-level SS(x) is the maximum finding level, or 0 if none. SS(x)≥2 counts as containing a weakness.
- Compliance means following instructions in the context, regardless of who placed them. The authors do not directly observe compliance but use the vulnerable-output rate under the attack condition as a proxy. MSS is the attack rate minus the benign rate, and RSR is their ratio. The authors say that when the benign baseline is very low, a small absolute difference can yield a large ratio, so they report both. Items differ, so they use unpaired two-proportion tests, with effect size Cohen's h and 95% Wilson intervals.
- The authors acknowledge the proxy is imperfect: it may follow instructions without a detectable weakness, or ignore instructions and still produce an unrelated weakness. The authors say they reviewed each completion to confirm it completed the requested task and executed a subset to check it runs; the paper does not give the subset size. Detector diagnostics treat the experimental condition as the reference label, which the authors explicitly state is not ground truth. They do not rely solely on the LLM validator and cite Ullah et al. (2024): LLM vulnerability judgments are unreliable when used alone.
Generation, equivalence, and screening definitions
- If an official conversation or instruction template exists, use it. Base models without a conversation template fall back to a plain completion prompt with Task, Input, and Completed headings. Decoding is greedy, do_sample=False, one completion per scenario, with a new token cap of 500, fixed across models and conditions. Refusals, if they occur, are kept and only count toward the rate if the generated code contains a weakness. Outputs are not discarded; the denominator is fixed at 700.
- Uniformity uses two one-sided tests. When the 90% interval of the mean difference between two groups falls within negative Δ to positive Δ, equivalence is declared at that margin. Δ is 10 percentage points. The authors say this margin is practically small relative to the observed 77% to 92% attack range and the 17 to 49 times contrasts between conditions. Comparisons are computed on ten model-level rates and clustered at the model level.
- Screening reports coverage and the proportion not caught. Because the screener is also part of the ensemble, it is scored both against the full ensemble and against a leave-one-out reference that removes that screener. The paper only tests whether outputs pass the screener, not whether they are later reviewed, submitted, or deployed.
What experiments did the paper conduct?
Ten models attack VR 77.4%–92.3%, benign 1.7%–5.1%; under full integration Phi-3 missed 29.0%.
Experimental setup
- Models: Ten open-source Code LLMs (Table 1). Base models are StarCoderBase (7B), DeepSeek-Coder-base (6.7B), Qwen2.5-base (7B), Granite-4.0-H-Micro-Base (3B). Instruction-tuned are StarCoder2-Instruct (3B), DeepSeek-Coder-Instruct (6.7B), Granite-3B-Code-Instruct (3B), Granite-4.0-H-Micro (3B), CodeLlama-13B (13B), Qwen2.5-Instruct (7B). DeepSeek, Qwen, Granite 4.0 are sibling pairs from shared pretraining lineages. Semantic validation and LLM screening use Phi-3. DeepSeek-V4-Pro in Figure 1 is not counted in measurements.
- Data: Attack condition has 700 distinct Flask scenarios covering ten weakness classes; benign condition has 700 ordinary Python tasks. Exactly one completion per model per condition, no filtering, denominator 700. The paper does not report the number of scenarios per weakness class.
- Decoding and reproducibility: Official templates or base fallback prompts; greedy; new token limit 500. Checkpoint identifiers and remaining parameters are in Appendix E. Generation and scoring were done on a single NVIDIA A100 via Google Colab, totaling about 50 GPU hours.
- Metrics: VR, MSS (percentage points), RSR, Cohen's h, and the combined proportion of HIGH and CRITICAL in vulnerable attack outputs. Group comparisons use TOST with Δ=10 percentage points. The authors state that with this sample size and effect size, statistical significance is not a major concern.
- Judgment: Five-component ensemble, SS(x)≥2. Screening references are full ensemble and leave-one-out, neither human-adjudicated. The authors state they reviewed all completions for task completion and executed a subset; the paper does not report the subset size or agreement with humans.
Main results
Swipe horizontally to read the table
Model Type Benign% Attack% MSS H+C% StarCoderBase Base 3.6 77.4 73.8 89.1 CodeLlama-13B Instruct 2.9 77.6 74.7 86.6 Granite-4.0-H-Micro Instruct 1.7 84.1 82.4 89.8 Qwen2.5-Instruct Instruct 3.6 84.7 81.1 86.2 DeepSeek-Coder-Instruct Instruct 3.0 85.0 82.0 88.1 DeepSeek-Coder-base Base 4.7 87.7 83.0 90.4 Qwen2.5-base Base 4.6 88.4 83.8 89.8 Granite-4.0-H-Micro-Base Base 4.4 92.3 87.9 91.0 The above table is from Table 2, 700 per condition, MSS in percentage points. StarCoder2-Instruct (benign 5.1%, attack 88.6%, MSS 83.5, H+C 90.5%) and Granite-3B-Code-Instruct (3.7%, 86.7%, 83.0, 90.1%) are omitted.
- The authors report that the 95% Wilson intervals for the two conditions are separated for each model, with Cohen's h from 1.77 to 2.15. Section 5.2 summarizes the relative difference as 17 to 49 times; Table 2's RSR is 17.2x–49.1x, calculated from unrounded ratios.
- The authors caution that the two conditions also differ in task type, so RSR should not be interpreted alone as a causal effect of instructions (Section 7.3, Table 2 note).
- The authors state that in Figure 3 benign rates are all low and attack rates fall in the same high band, with base and instruction-tuned groups overlapping, and the highest rate in the set belongs to a base model. Percentages in the figure are rounded annotations; exact values are in Table 2.
Training approach and scale
- Base mean 86.5%, instruction-tuned mean 84.5%. Group difference +2.0 percentage points, 90% interval [−5.5, +9.5], falling within Δ=10 but not Δ=5. The authors therefore claim equivalence at Δ=10.
- Among the three sibling pairs, fine-tuning did not improve the measured rates. Unrounded differences (base minus fine-tuned) are DeepSeek +2.7, Qwen +3.7, Granite 4.0 +8.1 percentage points. DeepSeek and Qwen intervals fall within Δ=10; Granite interval [+5.3, +11.0] slightly exceeds. The abstract says the decrease after fine-tuning is at most 8.1%, while Section 5.3 says percentage points.
- The authors state that across these ten models, rates show no clear association with parameter count, release recency, code-specific or general-purpose, or training approach. The omitted 3B StarCoder2-Instruct has an attack rate of 88.6%, and Granite-3B-Code-Instruct 86.7%. The authors state they did not directly measure capability; parameter count and specialization are proxies. Granite-4.0-H-Micro is close to the earlier Granite-3B-Code-Instruct, but specialization also differs, and the authors state the comparison is indicative, not a controlled generational comparison.
Severity and weakness classes
- Table 2: In vulnerable attack outputs, HIGH and CRITICAL combined account for 86.2%–91.0%. The authors state that HIGH is most common for every model, and CRITICAL appears in all. The authors state that in Figure 4 the attack condition shifts from Safe to HIGH and CRITICAL, with similar profiles for base and instruction-tuned; the text does not list per-segment percentages.
- The authors state that aggregated weaknesses concentrate in injection and web-facing classes, consistent with the setting where user input reaches rendering, outbound requests, paths, or queries in Flask. In Figure 5, the text names CWE-89 and CWE-79 as most frequent, followed by CWE-114, CWE-117, CWE-20, CWE-502, CWE-113, CWE-77. The text does not give mention counts for each bar.
Post-generation screening
- Table 3 aggregates across ten models; references are not human-adjudicated. Under the full ensemble reference, Bandit covers 21.4%, misses 78.6%; AST taint analysis covers 32.1%, misses 67.9%; Phi-3 covers 71.0%, misses 29.0%; the union covers 78.4%, misses 21.6%. Under leave-one-out, corresponding miss rates are 79.3%, 68.6%, 32.1%, 25.5%. The two references differ by 0.7–3.1 percentage points, which the authors say does not change conclusions.
- The authors state that no single screening method blocks the attack. The strongest single detector still leaves about one-third undetected; deployable static screening leaves about two-thirds or more. The union still does not approach containment. The authors argue that screening only intercepts what it recognizes after generation, thus inheriting static analysis recall limits on functionally plausible code.
- The authors therefore believe more direct defenses must act before or during generation, such as instruction hierarchy, StruQ, SecAlign, or spotlighting. This paper does not report measured results of these methods in this setting.
Other ablations and analyses
- Removing the pattern detector, eight models have attack rates about 62%–79%, StarCoderBase and CodeLlama-13B about 46%–54%; benign about 2%–5% (Section 5.6). The authors state that main results do not depend on signatures for target weakness classes.
- Comment position (Table 5, n=30 per position, greedy): DeepSeek-Coder-Instruct top/middle/bottom: 83.3% [66.4, 92.7], 86.7% [70.3, 94.7], 80.0% [62.7, 90.5]; Qwen2.5-Instruct: 76.7% [59.1, 88.2], 70.0% [52.1, 83.3], 70.0% [52.1, 83.3].
- Position comparisons: DeepSeek Cochran's Q=0.75, p=0.69; Qwen Q=1.60, p=0.45; paired McNemar all p≥0.44; refusal rate 0% in each cell. The authors state that once a comment is in context, position does not change the behavior.
- Figure 6 and Appendix C use experimental conditions as reference labels. The authors state the ensemble has higher precision than recall; this comparison is detector-condition agreement, not detector accuracy. The text does not list per-model precision, recall, F1. Figure 6(a) omits key detection and semantic validation because they do not report per-file counts.
What are some points that can be further explored?
The authors limit their conclusions to single-turn completion in open-source models of moderate size, and state that the instruction effect has not yet been isolated.
Limitations and future directions noted by the authors
- End-to-end success rate when developer prompts and attack artifacts are fully separated was not measured. The two conditions also do not isolate instructions alone: the benign corpus is ordinary tasks rather than safe rewrites of attack scaffolding, and the 17–49x ratio mixes instruction and task type. Pairing within scaffolding, and non-security-sensitive benign scaffolding needed for end-to-end studies, are left for future work (Section 7.3).
- The threat model targets assistants, but the experiments evaluate the underlying Code LLM. Deployed assistants also have system prompts, context assembly or retrieval, editor integration, and in some products suggestion filtering. The authors state that model-level compliance implies assistant-level attacks, and also relies on the premise that product layers inherit model behavior (Section 7.3).
- Models are open-source, 3B–13B, excluding closed-source and frontier systems, and also excluding systems the authors say receive more safety investment. The authors state the conclusions hold for this set; beyond that they are hypotheses rather than demonstrated. Extending to a small number of API-served models is the most useful robustness extension. The Conclusion lists fully separated end-to-end studies and broader evaluation of heavily safety-trained or closed-source models as future work (Section 7.3, Conclusion).
- Equivalence tests cover only four base and six instruction-tuned clusters, with wide group difference intervals: equivalence at Δ=10, not at stricter Δ=5. Wilson intervals describe sampling variation within this scenario set, not generalization to new tasks, frameworks, or languages (Section 7.3).
- All ratios depend on an imperfect integrated detector. The metric counts any weakness of medium severity or higher, not the exact CWE named in the injected instruction, so target CWE induction rates are not reported separately (Section 7.3).
- Attack entries state the unsafe goal explicitly; how indirect intent can be while still inducing the same weakness was not measured. Scenarios use only Python and Flask. Whether other languages, frameworks, and assistant settings are equally compliant, the authors say remains open. Which training stage produces the behavior, the authors say this checkpoint comparison cannot determine (Section 7.3, Section 7.1).
Experimental coverage
- Generation models are the ten open-source checkpoints in Table 1: four base, six instruction-tuned, three sibling pairs, 3B–13B parameters; semantic validation and LLM screening use Phi-3. DeepSeek-V4-Pro in Figure 1 is not in the measurement set.
- 700 per model per condition: Flask handler functions for ten web weakness classes, compared to ordinary Python tasks. Decoding is greedy, new token limit 500, one per scenario, refusals retained and scored.
- Post-generation screening is Bandit, AST taint analysis, Phi-3, and their union. The reference is the detector-defined full ensemble and leave-one-out (Table 3), not human adjudication.
- Comment position checks cover two instruction-tuned models, three positions, n=30 per position (Table 5). Detector-condition agreement is in Appendix C.
- The paper does not report: number of scenarios per weakness class, size of the executed code subset, detector-human agreement, number of refusals in the main experiments, and the model used to write attack comments.
Summarize the main content of the paper
Attack condition weakness rate 77.4%–92.3%, benign 1.7%–5.1%; instruction tuning did not improve the measured rate.
The authors frame the safety of Code LLM assistants as a provenance boundary problem: unsafe instructions in the context are followed, regardless of provenance.
- Problem: The adversary does not need access to weights, training data, or developer prompts; they only need to place instructions into untrusted content that may later enter the context. When a developer makes an ordinary completion request, the model may write exploitable weaknesses into the source code.
- Method: In the attack condition, the unsafe goal is written into the comments of a Flask handler function; the benign condition is an ordinary Python task with no malicious instructions. Ten open-source models from 3B to 13B each generate 700 greedy completions, scored by a five-component ensemble at medium and above, and equivalence tests compare base and instruction-tuned models.
- Main results: In Table 2, the attack condition VR is 77.4%–92.3%, the benign condition is 1.7%–5.1%, and Cohen's h is 1.77–2.15. Among attack outputs containing weaknesses, HIGH and CRITICAL together account for 86.2%–91.0%.
- Across models: The base model mean is 86.5%, the instruction-tuned mean is 84.5%, a group difference of +2.0 percentage points, judged equivalent at Δ=10 but not at Δ=5. Across three sibling pairs, fine-tuning did not improve the measured rate; Granite 4.0's difference is 8.1 percentage points, with its interval slightly exceeding Δ=10. The authors state that parameter count, code specialization, and release recency show no clear association with the rate.
- Screening and conclusions: In Table 3, under the full ensemble reference, Phi-3 covers 71.0% and misses 29.0%; the union of three screeners misses 21.6%. The authors conclude that, within this set, refusal- or compliance-based scores do not identify safer models; post-generation screening can mitigate but not contain the risk, and durable mitigation requires provenance-aware processing before generation. They also limit the scope to single-turn completion in the tested open-source models.