Tegoby Attention SpanBlogBook a demo

One issue title could hijack Cline's CI agent

Strict rules refuse key steps

In February 2026, the security researcher Adnan Khan showed that a crafted GitHub issue title could steer Cline’s AI triage agent, which ran in GitHub Actions, into installing a package and so running an attacker’s code on the build machine. With strict rules, Tego would refuse the package download: the agent can only reach the hosts you list. We reproduced the incident's steps under these rules to confirm it. A later rogue release used a leaked token outside Tego, and Tego can’t see that part.

What happened?

Cline makes an open-source AI assistant that writes code. From 21 December 2025, its GitHub issue triage workflow, an automated job that sorts new issues, ran a Claude Code agent on every new issue from any GitHub user (allowed_non_write_users: "*"). The agent could run shell commands, read and edit files, and search the web. A comment in the file said security was "enforced by GitHub permissions above".

The raw issue title went into the agent's instructions. The security researcher Adnan Khan showed that a crafted title could make the agent run npm install from an imposter commit. A package can carry an install script, a program that runs as it installs, so the attacker's code would run on the machine. He reproduced it in a mirror of the repository and reported it privately on 1 January 2026.

From there, he describes a pivot. GitHub keeps a shared cache of files that a repository's jobs reuse between runs. Code on the triage machine could poison that cache, and the nightly release jobs restored it while holding the tokens that publish Cline to npm, the JavaScript package registry. Cline's post-mortem says an attacker "could" plant poisoned cache entries. It does not say this path was used.

The researcher disclosed publicly on 9 February. Cline removed the workflows "within 30 minutes" and began rotating credentials, but "the wrong token was deleted while the exposed one remained active."

On 17 February at 3:26 AM PT, an unauthorized cline@2.3.0 reached npm. Its only change was an install script that installed the openclaw package globally, for the whole machine. Cline says the CLI was byte-identical to the last release and "No malicious code was delivered". By 11:23 AM PT it had published 2.4.0, deprecated 2.3.0 and revoked the token. The VS Code and JetBrains extensions were not affected. The Hacker News cites StepSecurity's figure of roughly 4,000 downloads in those eight hours.

How was the token obtained? The researcher's update says a different actor found his proof of concept and used it against Cline. Cline's post-mortem does not say.

Why didn't the usual safety catch it?

The usual safety was GitHub's token permissions, and they held. The job's GitHub token could only read code and write issues, so it could not push code. But the attack never needed to push code. It went through the machine.

The agent read text any stranger could write, and it ran on a GitHub-hosted Linux runner, the virtual machine GitHub lends each job, where the job user can run anything as administrator through sudo, with no password. Its environment held ANTHROPIC_API_KEY and that GitHub token. Nothing limited what the machine could do: install packages, reach any host, or write to the shared cache.

How Tego handles it

Tego puts rules around an agent and enforces them from outside it, with the Linux kernel. The workflow would start the same agent under tego run instead of the hosted action. That works without administrator rights, in the mode Tego's modes page names for hosted runners. Tego has no ready-made CI setup: you add the step to the workflow and write its contract yourself (Tego's feature list, item I9).

Tego does not stop the injection itself. The model still reads the title, because Tego never reads prompts or calls a model (README). Whatever the job is allowed to do, a hijacked agent can still do. With permission to write issues, it can post misleading comments, apply wrong labels, or paste the API key and GitHub token from its environment into a public comment (Tego's known limits, item A1). Tego does not keep real keys out of the agent's hands (operations guide).

Tego also could not have stopped the 17 February publish. That used a live npm token outside any Tego run, and Tego does not manage registry tokens or GitHub's cache (Tego's known limits, item A5).

How it could have been prevented

You don't need to guess the attacker's title to prevent this. The habit: when an agent reads text strangers write, decide in advance what its machine may do, and make everything else fail. A triage agent needs to read the code, talk to GitHub's API and keep a scratch folder. It doesn't need to install packages, reach other hosts or touch the cache.

Tego's strict setup does exactly that. The agent can connect only to its model and api.github.com, so the package download and the cache service are refused. It can change files only in its scratch folder, so writes to the installed packages, the checkout and the runner's copies of the job's steps fail. After one watch-only run, Tego can also list the programs the job really started and refuse every other one, so npm, curl and sudo don't even start. sudo does not work inside a Tego run in any case (Tego's known limits, item A7).

Tego's strict setup is three built-in rule sets: the agent can't read your secrets, can only reach the hosts you list, and can only change files in the folders you name.

In Tego's rules file, that's:

YAML
extends: [tego/no-secrets, tego/no-prod, tego/repo-only-writes]
fs:
  write: ["./.claude-state/"]     # the agent's scratch folder
net:
  allow: ["api.github.com:443"]   # the triage job's one host

Claude Code is a Node program, so node must be allowed to start, and it could run npm's own script. The install still fails at the download and at the write to the packages folder. Every refusal is written into Tego's record of the run. Without administrator rights, that record holds programs, writes and connections, not file reads. It stays on the runner's disk, so have a later step keep it.

The honest limit: the shell stays allowed, so attacker shell code still runs inside it with the job's own tokens and its access to api.github.com.

The lesson

GitHub's token permissions held, and the attack went around them through the machine. If an agent reads text strangers write, scope the runner too: the programs, the folder and the hosts. And check that a rotation revoked the right credential: Cline's post-mortem now asks for that, and Cline has moved npm publishing to OIDC, short-lived credentials GitHub issues per run, with no long-lived tokens.

Sources (20 links)

Checked on 5 November 2026.