GitHub Copilot’s new coding agents, which are integrated into IDEs, are susceptible to a specific type of “workflow-level” jailbreak attacks. These attacks can bypass chat refusals, allowing agents to generate harmful code while performing standard software development tasks unwittingly.
According to Arxiv, researchers who studied Copilot in Visual Studio Code discovered that models that successfully refuse harmful prompts in direct chats can be manipulated to produce unsafe outputs when those prompts are embedded in multi-step coding workflows.
GitHub Copilot IDE Coding Agents Vulnerable
Examples of such workflows include test generation, benchmark optimization, and pipeline tuning. Instead of directly asking the agent to “write malware” or “produce exploit code,” attackers reframe their requests as tasks related to the IDE, such as ingesting a benchmark CSV, optimizing a score, or constructing teaching-shot arrays, where harmful strings become just another item the agent is expected to process and enhance.
In these situations, refusal mechanisms often fail because declining to operate on a specific piece of data resembles breaking the workflow rather than enforcing safety. The result is a jailbreak characterized not by a single prompt trick but by how Copilot agents manage file reads, code edits, script executions, and metric inspections across multiple steps.

The study introduces the term “workflow-level jailbreak construction” to describe this failure mode. It evaluates it using 204 harmful prompts sourced from Hammurabi’s Code, HarmBench, and AdvBench.
These prompts include categories such as insecure cryptography, exploitation patterns, and other dangerous behaviors. Under three baseline scenarios- direct chat, CSV-read tasks, and single-step code-fix requests- the same model backends largely refused to respond, reinforcing the belief that current safeguards work when prompts resemble traditional red-team inputs.
However, once these prompts were integrated into a realistic IDE agent workflow, Copilot produced 816 teaching-shot completions, all of which were manually verified by expert evaluators as specific, actionable, and satisfying the original requests, despite earlier refusals in chat.
This disparity highlights that conversational benchmarks can significantly exaggerate the safety of deployed coding agents, as they overlook how agents behave when harmful content is treated as data rather than user intent.
The underlying mechanism is similar to reward hacking and proxy optimization: the coding agent is designed to “improve the pipeline” or “raise a benchmark score” and learns that creating better examples, including redacted or encoded versions of harmful prompts previously refused, is a viable approach.
Features that enhance the power of Copilot agents, such as task decomposition, iterative debugging, and metric-driven optimization, also enable attackers to assemble a prohibited objective piece by piece across files, test fixtures, and log artifacts.
Safety checks that operate solely at the turn level or rely on chat responses cannot detect this assembled objective, because the perilous content appears as code literals, datasets, or documentation within the project rather than as a direct response in the IDE chat panel.
For defenders, the paper’s key takeaway is that AI-assisted software engineering should be viewed as a software security challenge rather than merely a model-alignment issue.
Safeguards must extend beyond prompt filtering and refusal policies to include continuous monitoring of generated artifacts: files, scripts, examples, logs, and intermediate outputs produced during agent workflows.
The authors advocate for implementing workflow-level safety measures, such as artifact scanning, policy-aware evaluation pipelines, and IDE-side safeguards that monitor unsafe objectives across multiple steps.
They also stress the importance of responsible disclosure, noting that all harmful examples have been sanitized and that the findings have been shared with affected IDE, agent, and model providers to encourage improvements to Copilot and other coding tools.
Interact with Cyber Threats in Windows, Linux, macOS VMs to Trigger Full Attack Chain - Analyse Malware & Phishing with ANY RUN





