- Home
- The Thinking Wire
- Copilot Approved It. The Scanner Passed It. An AI Attacker Exploited It in Five Days.
Copilot Approved It. The Scanner Passed It. An AI Attacker Exploited It in Five Days.
Five days. That is how long a critical script-injection vulnerability lived in a Snowflake repository before an autonomous AI attacker found it and exploited it. The pull request that introduced it, PR #1218, merged on June 18, 2026, with GitHub Copilot listed as co-author and reviewer. Copilot marked it all-clear. GitHub Advanced Security scanned the final revision and raised nothing. On June 23, Wiz’s autonomous Red Agent identified the flaw, wrote an exploit, and pulled credentials off the CI runner. Snowflake patched the same day. Wiz disclosed the incident on August 17.
One workflow file. AI on both sides. The defensive AI approved the vulnerability; the offensive AI weaponized it. This is the incident that turns the AI-security asymmetry from a trend argument into a dated, numbered case study.
What Actually Happened
The vulnerability lived in jira_issue.yml, a GitHub Actions workflow in Snowflake’s repository. The workflow interpolated the GitHub issue title into a shell echo statement. Issue titles are attacker-controlled input: anyone who can open an issue against the repository controls that string. A single quote in the title broke out of the echoed string and turned the rest of the title into arbitrary commands executed on the Actions runner.
This is a known vulnerability class, and GitHub’s own hardening documentation warns against interpolating event data directly into run blocks. It is exactly the kind of flaw a security review layer exists to catch.
Two layers had the chance. Copilot participated in the PR as co-author and reviewer and approved it. GitHub Advanced Security, the scanning product built by the company that publishes that hardening documentation, processed the final revision without a flag. Wiz notes it is unclear whether the vulnerable change itself was written with AI assistance; Copilot’s confirmed role is reviewer, not necessarily author. The caveat matters less than it seems. Whoever typed the line, the AI review layer looked at a textbook injection and said yes.
The Attacker Adapted in Seconds
Five days after the merge, Wiz’s Red Agent, an autonomous offensive security system, was pointed at the repository. It identified the injection, constructed a payload, and delivered it through the issue title.
The first payload failed on a bash syntax error.
What happened next is the detail worth sitting with. The agent read the failure, adapted its payload autonomously, and received credentials within seconds. No human operator debugged the exploit. The loop from broken payload to working exploit closed at machine speed.
The prize was a Jira API token scoped with read access to Snowflake’s engineering, security compliance, and bug bounty projects. Think about what a bug bounty project contains: a curated list of known, sometimes unpatched, vulnerabilities in the target’s own systems. The exploit leaked a credential that opened a map of other doors.
We wrote in AI offense rewrites open source that autonomous discovery was compressing the timeline between vulnerability and exploitation across the ecosystem. That was the trend. This is the instance: named repository, named workflow file, a five-day window, and an attacker that recovered from its own bug without help.
Why the Review Layer Lost
The instinctive response to this incident is to add a better reviewer. If Copilot missed it, use a stronger model. If one AI review passed it, require two. That response misreads the structure of the problem.
Review is probabilistic. Every reviewer, human or machine, catches some fraction of flaws and passes the rest. Stacking reviewers raises the fraction but never reaches one, and the economics degrade as you stack: each additional layer costs attention and latency while catching a thinner slice of what earlier layers missed. We saw the same shape in the verification gate for AI-generated patches: AI output that looks correct sails through checks designed for human failure patterns.
Offense is not probabilistic in the same way. An attacker needs the review stack to fail once, on one file, in one repository. The defender’s review must succeed on every merge, forever. When both sides run AI, the defender’s error rate compounds across every merged PR while the attacker’s agent retries, adapts, and only needs a single hit. The Red Agent’s failed first payload illustrates the point: its errors cost it seconds. The defense’s single error cost a live credential.
There is a second, quieter problem. An AI reviewer that approves a PR does not just fail to catch the flaw. It actively manufactures confidence. A green check from Copilot and a clean scan from Advanced Security are signals humans downstream treat as evidence of safety. The review layer that misses a vulnerability is worse than no layer, because it converts an unknown risk into a certified one.
The Control That Works Is Structural
The vulnerability class in jira_issue.yml does not survive contact with structural controls, and none of them involve a smarter reviewer.
Injection-safe workflow patterns eliminate the class. Untrusted context values, issue titles, branch names, PR bodies, comments, never belong inside a run block through direct interpolation. Passed through an intermediate environment variable and quoted, the same issue title is inert data. This is a mechanical, greppable property of a workflow file. A linter can enforce it deterministically. No judgment call, no probabilistic catch rate, no model upgrade required.
Secret scoping bounds the blast radius when a workflow is compromised anyway. The token the Red Agent obtained could read security compliance and bug bounty projects. A workflow that files Jira issues needs write access to specific projects and little else. The distance between what the workflow needed and what its credential could do is the difference between an incident and a breach. Short-lived, narrowly scoped credentials turn a successful injection into a small event.
This is the same conclusion the defensive side is converging on from the other direction. Ramp’s defensive agent team treats AI as a tool that operates inside structural guardrails, with humans owning the boundaries. The lesson from both directions agrees: AI belongs inside the control structure, executing within constraints. It cannot be the control structure.
Do This Now
Audit your GitHub Actions workflows for untrusted interpolation this week. The check is concrete: grep every workflow for ${{ expressions inside run blocks, and flag any that reference github.event fields an outsider can influence, including issue titles, PR titles and bodies, comments, and branch names. Rewrite each hit to pass the value through an environment variable. Then pull the credentials your workflows hold and answer one question per secret: if this leaked today, what could the holder read? Scope down everything whose answer surprises you.
Do it before adding any new AI review tooling. The five-day window in this incident was closed by a patch, and the next one will open in a workflow file somewhere else. A review layer might catch it. A structural control makes it a non-event. Between a defense that usually works and a defense that mechanically works, the choice is not close.
This analysis synthesizes Wiz Red Agent identifies and exploits vulnerability in Snowflake CI/CD pipeline (Wiz Research, August 2026).
Victorino Group helps engineering organizations replace probabilistic AI review with structural pipeline controls that hold under autonomous attack. Let’s talk.
All articles on The Thinking Wire are written with the assistance of Anthropic's Opus LLM. Each piece goes through multi-agent research to verify facts and surface contradictions, followed by human review and approval before publication. If you find any inaccurate information or wish to contact our editorial team, please reach out at editorial@victorinollc.com . About The Thinking Wire →
If this resonates, let's talk
We help companies implement AI without losing control.
Schedule a Conversation